]> xenbits.xensource.com Git - people/julieng/linux-arm.git/commitdiff
KVM: arm/arm64: extend arch CAP checks to allow per-VM capabilities
authorAndre Przywara <andre.przywara@arm.com>
Fri, 10 Jul 2015 14:21:40 +0000 (15:21 +0100)
committerJulien Grall <julien.grall@citrix.com>
Mon, 28 Sep 2015 11:05:12 +0000 (12:05 +0100)
KVM capabilities can be a per-VM property, though ARM/ARM64 currently
does not pass on the VM pointer to the architecture specific
capability handlers.
Add a "struct kvm*" parameter to those function to later allow proper
per-VM capability reporting.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Vadim Lomovtsev <Vadim.Lomovtsev@caviumnetworks.com>
arch/arm/include/asm/kvm_host.h
arch/arm/kvm/arm.c
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/reset.c

index e896d2c196e63b79365e6f637c7b697c56c48f71..56cac05c0fa64ac8678cf67b546be0d05c744598 100644 (file)
@@ -213,7 +213,7 @@ static inline void __cpu_init_hyp_mode(phys_addr_t boot_pgd_ptr,
        kvm_call_hyp((void*)hyp_stack_ptr, vector_ptr, pgd_ptr);
 }
 
-static inline int kvm_arch_dev_ioctl_check_extension(long ext)
+static inline int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext)
 {
        return 0;
 }
index bc738d2b83929e6a05762ea8b73af6ec1ed86837..7c65353bcae873ab9fb2dc968fc0a48d50c81983 100644 (file)
@@ -196,7 +196,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
                r = KVM_MAX_VCPUS;
                break;
        default:
-               r = kvm_arch_dev_ioctl_check_extension(ext);
+               r = kvm_arch_dev_ioctl_check_extension(kvm, ext);
                break;
        }
        return r;
index 2709db2a7eac78a49fc75c072810b9ac41cc9e0a..8d78a72dc32bb188ce6cbce79042ae5e536dd5fb 100644 (file)
@@ -47,7 +47,7 @@
 
 int __attribute_const__ kvm_target_cpu(void);
 int kvm_reset_vcpu(struct kvm_vcpu *vcpu);
-int kvm_arch_dev_ioctl_check_extension(long ext);
+int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext);
 
 struct kvm_arch {
        /* The VMID generation used for the virt. memory system */
index 0b43265789858cbe71f761eebbc48927834b7fe8..866502ba3b429afc315638acab0338ce7fe3b217 100644 (file)
@@ -56,7 +56,7 @@ static bool cpu_has_32bit_el1(void)
        return !!(pfr0 & 0x20);
 }
 
-int kvm_arch_dev_ioctl_check_extension(long ext)
+int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext)
 {
        int r;