diff options
| author | Oliver Upton <[email protected]> | 2023-10-30 20:21:19 +0000 |
|---|---|---|
| committer | Oliver Upton <[email protected]> | 2023-10-30 20:21:19 +0000 |
| commit | 53ce49ea75602b51a1feb3844d535ced42b2d8c2 (patch) | |
| tree | e454a1245943f9d7927a786cb343f946ab03525a /arch/arm64/include/asm/kvm_arm.h | |
| parent | Merge branch kvm-arm64/writable-id-regs into kvmarm/next (diff) | |
| parent | KVM: arm64: Expose MOPS instructions to guests (diff) | |
| download | kernel-53ce49ea75602b51a1feb3844d535ced42b2d8c2.tar.gz kernel-53ce49ea75602b51a1feb3844d535ced42b2d8c2.zip | |
Merge branch kvm-arm64/mops into kvmarm/next
* kvm-arm64/mops:
: KVM support for MOPS, courtesy of Kristina Martsenko
:
: MOPS adds new instructions for accelerating memcpy(), memset(), and
: memmove() operations in hardware. This series brings virtualization
: support for KVM guests, and allows VMs to run on asymmetrict systems
: that may have different MOPS implementations.
KVM: arm64: Expose MOPS instructions to guests
KVM: arm64: Add handler for MOPS exceptions
Signed-off-by: Oliver Upton <[email protected]>
Diffstat (limited to 'arch/arm64/include/asm/kvm_arm.h')
| -rw-r--r-- | arch/arm64/include/asm/kvm_arm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h index 5882b2415596..2186927b1d21 100644 --- a/arch/arm64/include/asm/kvm_arm.h +++ b/arch/arm64/include/asm/kvm_arm.h @@ -102,7 +102,9 @@ #define HCR_HOST_NVHE_PROTECTED_FLAGS (HCR_HOST_NVHE_FLAGS | HCR_TSC) #define HCR_HOST_VHE_FLAGS (HCR_RW | HCR_TGE | HCR_E2H) -#define HCRX_GUEST_FLAGS (HCRX_EL2_SMPME | HCRX_EL2_TCR2En) +#define HCRX_GUEST_FLAGS \ + (HCRX_EL2_SMPME | HCRX_EL2_TCR2En | \ + (cpus_have_final_cap(ARM64_HAS_MOPS) ? (HCRX_EL2_MSCEn | HCRX_EL2_MCE2) : 0)) #define HCRX_HOST_FLAGS (HCRX_EL2_MSCEn | HCRX_EL2_TCR2En) /* TCR_EL2 Registers bits */ |
