arm/arm64: KVM: Enable 32 bits kvm vcpu events support
authorDongjiu Geng <gengdongjiu@huawei.com>
Fri, 12 Oct 2018 16:12:49 +0000 (00:12 +0800)
committerMarc Zyngier <marc.zyngier@arm.com>
Thu, 18 Oct 2018 09:14:03 +0000 (10:14 +0100)
The commit 539aee0edb9f ("KVM: arm64: Share the parts of
get/set events useful to 32bit") shares the get/set events
helper for arm64 and arm32, but forgot to share the cap
extension code.

User space will check whether KVM supports vcpu events by
checking the KVM_CAP_VCPU_EVENTS extension

Acked-by: James Morse <james.morse@arm.com>
Reviewed-by : Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/kvm/reset.c
virt/kvm/arm/arm.c

index 337d2fbc2f0661df1350ca2be2a41d7aee1a1f4c..b72a3dd562044584355bc94fce99efb95e694484 100644 (file)
@@ -86,7 +86,6 @@ int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext)
                break;
        case KVM_CAP_SET_GUEST_DEBUG:
        case KVM_CAP_VCPU_ATTRIBUTES:
-       case KVM_CAP_VCPU_EVENTS:
                r = 1;
                break;
        case KVM_CAP_ARM_VM_IPA_SIZE:
index 7c9d7b51ce892b0300a7e878370b196d311e8194..11b98b2b04868ccfafec37ab68401bb8ab85ae94 100644 (file)
@@ -213,6 +213,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
        case KVM_CAP_READONLY_MEM:
        case KVM_CAP_MP_STATE:
        case KVM_CAP_IMMEDIATE_EXIT:
+       case KVM_CAP_VCPU_EVENTS:
                r = 1;
                break;
        case KVM_CAP_ARM_SET_DEVICE_ADDR: