projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f617d3
)
KVM: arm64: Force HCR_EL2.E2H when ARM64_KVM_HVHE is set
author
Marc Zyngier
<maz@kernel.org>
Fri, 9 Jun 2023 16:21:53 +0000
(17:21 +0100)
committer
Oliver Upton
<oliver.upton@linux.dev>
Mon, 12 Jun 2023 23:17:23 +0000
(23:17 +0000)
Obviously, in order to be able to use VHE whilst at EL2, we need
to set HCR_EL2.E2H. Do so when ARM64_KVM_HVHE is set.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link:
https://lore.kernel.org/r/20230609162200.2024064-11-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/arm.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/arm64/kvm/arm.c
b/arch/arm64/kvm/arm.c
index 14391826241c8ca689232506144d681295482996..c12276dd2cf436656ddc20659774a2c06c83fe2f 100644
(file)
--- a/
arch/arm64/kvm/arm.c
+++ b/
arch/arm64/kvm/arm.c
@@
-1676,6
+1676,8
@@
static void __init cpu_prepare_hyp_mode(int cpu, u32 hyp_va_bits)
params->hcr_el2 = HCR_HOST_NVHE_PROTECTED_FLAGS;
else
params->hcr_el2 = HCR_HOST_NVHE_FLAGS;
+ if (cpus_have_final_cap(ARM64_KVM_HVHE))
+ params->hcr_el2 |= HCR_E2H;
params->vttbr = params->vtcr = 0;
/*