]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
KVM: arm: Handle VCPU device attributes in guest.c
authorChristoffer Dall <cdall@linaro.org>
Tue, 2 May 2017 13:17:59 +0000 (15:17 +0200)
committerChristoffer Dall <cdall@linaro.org>
Thu, 8 Jun 2017 14:59:55 +0000 (16:59 +0200)
As we are about to support VCPU attributes to set the timer IRQ numbers
in guest.c, move the static inlines for the VCPU attributes handlers
from the header file to guest.c.

Signed-off-by: Christoffer Dall <cdall@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/include/asm/kvm_host.h
arch/arm/kvm/guest.c

index 00ad56ee6455a78ed0bc0407077a0a47cca4b923..127e2dd2e21ce12c7daa21e682ce72d36f6b1afd 100644 (file)
@@ -291,20 +291,12 @@ static inline void kvm_arm_init_debug(void) {}
 static inline void kvm_arm_setup_debug(struct kvm_vcpu *vcpu) {}
 static inline void kvm_arm_clear_debug(struct kvm_vcpu *vcpu) {}
 static inline void kvm_arm_reset_debug_ptr(struct kvm_vcpu *vcpu) {}
-static inline int kvm_arm_vcpu_arch_set_attr(struct kvm_vcpu *vcpu,
-                                            struct kvm_device_attr *attr)
-{
-       return -ENXIO;
-}
-static inline int kvm_arm_vcpu_arch_get_attr(struct kvm_vcpu *vcpu,
-                                            struct kvm_device_attr *attr)
-{
-       return -ENXIO;
-}
-static inline int kvm_arm_vcpu_arch_has_attr(struct kvm_vcpu *vcpu,
-                                            struct kvm_device_attr *attr)
-{
-       return -ENXIO;
-}
+
+int kvm_arm_vcpu_arch_set_attr(struct kvm_vcpu *vcpu,
+                              struct kvm_device_attr *attr);
+int kvm_arm_vcpu_arch_get_attr(struct kvm_vcpu *vcpu,
+                              struct kvm_device_attr *attr);
+int kvm_arm_vcpu_arch_has_attr(struct kvm_vcpu *vcpu,
+                              struct kvm_device_attr *attr);
 
 #endif /* __ARM_KVM_HOST_H__ */
index fa6182a40941ff9fe4bafe42cf37d1b26f50aa8c..acea05e9db4ef978628bb5bc7fc114dffdeb59e6 100644 (file)
@@ -301,3 +301,45 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,
 {
        return -EINVAL;
 }
+
+int kvm_arm_vcpu_arch_set_attr(struct kvm_vcpu *vcpu,
+                              struct kvm_device_attr *attr)
+{
+       int ret;
+
+       switch (attr->group) {
+       default:
+               ret = -ENXIO;
+               break;
+       }
+
+       return ret;
+}
+
+int kvm_arm_vcpu_arch_get_attr(struct kvm_vcpu *vcpu,
+                              struct kvm_device_attr *attr)
+{
+       int ret;
+
+       switch (attr->group) {
+       default:
+               ret = -ENXIO;
+               break;
+       }
+
+       return ret;
+}
+
+int kvm_arm_vcpu_arch_has_attr(struct kvm_vcpu *vcpu,
+                              struct kvm_device_attr *attr)
+{
+       int ret;
+
+       switch (attr->group) {
+       default:
+               ret = -ENXIO;
+               break;
+       }
+
+       return ret;
+}