diff options
author | Marc Zyngier <maz@kernel.org> | 2024-02-14 14:18:25 +0100 |
---|---|---|
committer | Oliver Upton <oliver.upton@linux.dev> | 2024-02-19 18:13:02 +0100 |
commit | 84de212d739ecd16c6289ec4ed47e27b0080bac6 (patch) | |
tree | b2341700361fed65e6f8e9874e9a1d8ec9a28e78 /arch/arm64/include/asm/kvm_host.h | |
parent | KVM: arm64: Make AMU sysreg UNDEF if FEAT_AMU is not advertised to the guest (diff) | |
download | linux-84de212d739ecd16c6289ec4ed47e27b0080bac6.tar.xz linux-84de212d739ecd16c6289ec4ed47e27b0080bac6.zip |
KVM: arm64: Make FEAT_MOPS UNDEF if not advertised to the guest
We unconditionally enable FEAT_MOPS, which is obviously wrong.
So let's only do that when it is advertised to the guest.
Which means we need to rely on a per-vcpu HCRX_EL2 shadow register.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Link: https://lore.kernel.org/r/20240214131827.2856277-25-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'arch/arm64/include/asm/kvm_host.h')
-rw-r--r-- | arch/arm64/include/asm/kvm_host.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 968a997b3f02..3feabde9c926 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -584,6 +584,7 @@ struct kvm_vcpu_arch { /* Values of trap registers for the guest. */ u64 hcr_el2; + u64 hcrx_el2; u64 mdcr_el2; u64 cptr_el2; |