[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Vinson Lee <vlee@xxxxxxxxxxx>

Fix build error.

  CC	ioctls/kvm.o
In file included from ioctls/kvm.c:8:0:
ioctls/kvm.c:115:8: error: ‘KVM_IA64_VCPU_GET_STACK’ undeclared here (not in a function)
  IOCTL(KVM_IA64_VCPU_GET_STACK),
        ^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
  { .request = _request, .name = #_request, }
               ^
ioctls/kvm.c:116:8: error: ‘KVM_IA64_VCPU_SET_STACK’ undeclared here (not in a function)
  IOCTL(KVM_IA64_VCPU_SET_STACK),
        ^
include/ioctls.h:53:15: note: in definition of macro ‘IOCTL’
  { .request = _request, .name = #_request, }

IA64 ioctls were removed in Linux 3.19.

commit 6b397158d07f885154b871a15f879d25b3de7579
Author: Radim Krčmář <rkrcmar@xxxxxxxxxx>
Date:   Thu Nov 20 14:43:18 2014 +0100

    kvm: remove IA64 ioctls

    KVM ia64 is no longer present so new applications shouldn't use them.
    The main problem is that they most likely didn't work even before,
    because of a conflict in the #defines:

      #define KVM_SET_GUEST_DEBUG       _IOW(KVMIO,  0x9b, struct kvm_guest_debug)
      #define KVM_IA64_VCPU_SET_STACK   _IOW(KVMIO,  0x9b, void *)

    The argument to KVM_SET_GUEST_DEBUG is:

      struct kvm_guest_debug {
        __u32 control;
        __u32 pad;
        struct kvm_guest_debug_arch arch;
      };

      struct kvm_guest_debug_arch {
      };

    meaning that sizeof(struct kvm_guest_debug) == sizeof(void *) == 8
    and KVM_SET_GUEST_DEBUG == KVM_IA64_VCPU_SET_STACK.

    KVM_SET_GUEST_DEBUG is handled in virt/kvm/kvm_main.c before even calling
    kvm_arch_vcpu_ioctl (which would have handled KVM_IA64_VCPU_SET_STACK),
    so KVM_IA64_VCPU_SET_STACK would just return -EINVAL.

    Signed-off-by: Radim Krčmář <rkrcmar@xxxxxxxxxx>
    Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>

Signed-off-by: Vinson Lee <vlee@xxxxxxxxxxx>
---
 ioctls/kvm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ioctls/kvm.c b/ioctls/kvm.c
index ddd7e29..df64356 100644
--- a/ioctls/kvm.c
+++ b/ioctls/kvm.c
@@ -112,8 +112,10 @@ static const struct ioctl kvm_ioctls[] = {
 	IOCTL(KVM_SET_GUEST_DEBUG),
 	IOCTL(KVM_X86_SETUP_MCE),
 	IOCTL(KVM_X86_GET_MCE_CAP_SUPPORTED),
+#if defined(KVM_IA64_VCPU_GET_STACK)
 	IOCTL(KVM_IA64_VCPU_GET_STACK),
 	IOCTL(KVM_IA64_VCPU_SET_STACK),
+#endif
 	IOCTL(KVM_ENABLE_CAP),
 	IOCTL(KVM_DIRTY_TLB),
 	IOCTL(KVM_GET_ONE_REG),
-- 
2.2.2

--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux