summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/mmio.c
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2022-03-11 20:39:47 +0300
committerMarc Zyngier <maz@kernel.org>2022-03-18 17:02:33 +0300
commit06394531b425794dc56f3d525b7994d25b8072f7 (patch)
tree8476992b49f955ad0693faa13db536bfbaa11f41 /arch/arm64/kvm/mmio.c
parent9872e6bc08d6ef6de79717ff6bbff0f297c134ef (diff)
downloadlinux-06394531b425794dc56f3d525b7994d25b8072f7.tar.xz
KVM: arm64: Generalise VM features into a set of flags
We currently deal with a set of booleans for VM features, while they could be better represented as set of flags contained in an unsigned long, similarily to what we are doing on the CPU side. Signed-off-by: Marc Zyngier <maz@kernel.org> [Oliver: Flag-ify the 'ran_once' boolean] Signed-off-by: Oliver Upton <oupton@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220311174001.605719-2-oupton@google.com
Diffstat (limited to 'arch/arm64/kvm/mmio.c')
-rw-r--r--arch/arm64/kvm/mmio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/kvm/mmio.c b/arch/arm64/kvm/mmio.c
index 3e2d8ba11a02..3dd38a151d2a 100644
--- a/arch/arm64/kvm/mmio.c
+++ b/arch/arm64/kvm/mmio.c
@@ -135,7 +135,8 @@ int io_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa)
* volunteered to do so, and bail out otherwise.
*/
if (!kvm_vcpu_dabt_isvalid(vcpu)) {
- if (vcpu->kvm->arch.return_nisv_io_abort_to_user) {
+ if (test_bit(KVM_ARCH_FLAG_RETURN_NISV_IO_ABORT_TO_USER,
+ &vcpu->kvm->arch.flags)) {
run->exit_reason = KVM_EXIT_ARM_NISV;
run->arm_nisv.esr_iss = kvm_vcpu_dabt_iss_nisv_sanitized(vcpu);
run->arm_nisv.fault_ipa = fault_ipa;