Build breakage between kvm-userspace.git HEAD and 2.6.29-rc8
Hi kvm-devs,
Been away from the kvm scene for a while...hope everyone is well.
FYI: There are a few build breakages between kvm-userspace.git HEAD (f29d402ab885d30bfa7350378cff911c9c17a226) when you compile against Linus' linux-2.6.git HEAD (v2.6.29-rc8-041b62374c7fedc11a8a1eeda2868612d3d1436c)
I am not sure if this is a supported configuration (e.g. perhaps you only support building kvm-userspace HEAD against Avi's kernel tree?). But in case this was unintentional, read on...
First error:
libkvm.c:702: error: ‘struct kvm_irq_level’ has no member named ‘status’ make[1]: *** [libkvm.o] Error 1
Which is attributable to:
commit ea1b668e7684dc43e9d198ba0b25fe47a0b2acd2
Author: Gleb Natapov <[email protected]> Date: Wed Feb 4 17:30:01 2009 +0200
kvm: qemu: handle IRQ status injection in userspace
Reverting this patch does allow the build to get past this error. Then I hit the next one:
device-assignment.o: In function `deassign_device':/home/ghaskins/sandbox/git/fabric/kvm-userspace/qemu/hw/device-assignment.c:562:
undefined reference to `kvm_deassign_pci_device'
Reverting:
commit 1435f18213edee9fabf936f5d6be70054f1f2bd1
Author: Weidong Han <[email protected]> Date: Wed Feb 18 14:33:41 2009 +0800
kvm: qemu: fix hot remove assigned device
Followed by:
commit 71ae34caaa961330f53f40090cd180a74fcda5fc
Author: Weidong Han <[email protected]> Date: Wed Feb 18 14:28:30 2009 +0800
kvm: qemu: deassign device from guest
Does fix the build. I realize reversion is probably not the desirable long term solution, but at least it points to the proper places that need some backwards-compat love ;)
Regards,
-Greg
Quoted 11 lines · Gregory Haskins
Hi kvm-devs,
Been away from the kvm scene for a while...hope everyone is well.FYI: There are a few build breakages between kvm-userspace.git HEAD (
f29d402ab885d30bfa7350378cff911c9c17a226) when you compile against Linus' linux-2.6.git HEAD (v2.6.29-rc8-041b62374c7fedc11a8a1eeda2868612d3d1436c)I am not sure if this is a supported configuration (e.g. perhaps you
only support building kvm-userspace HEAD against Avi's kernel tree?). But in case this was unintentional, read on...
It's a semi-supported configuration. We don't test it, but we'll fix reported bugs (or apply patches...).
Quoted 5 lines
First error:
libkvm.c:702: error: ‘struct kvm_irq_level’ has no member named ‘status’ make[1]: *** [libkvm.o] Error 1
Quoted 8 lines
Which is attributable to:
commit
ea1b668e7684dc43e9d198ba0b25fe47a0b2acd2Author: Gleb Natapov <[email protected]> Date: Wed Feb 4 17:30:01 2009 +0200kvm: qemu: handle IRQ status injection in userspace
This is due to a missing #ifdef KVM_CAP_... somewhere.
Gleb, can you take a look?
[more breakage]
Let's take this one at a time.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 28 lines · Avi Kivity
Quoted 12 lines · Gregory Haskins
Hi kvm-devs,
Been away from the kvm scene for a while...hope everyone is well.FYI: There are a few build breakages between kvm-userspace.git HEAD (
f29d402ab885d30bfa7350378cff911c9c17a226) when you compile against Linus' linux-2.6.git HEAD (v2.6.29-rc8-041b62374c7fedc11a8a1eeda2868612d3d1436c)I am not sure if this is a supported configuration (e.g. perhaps you only support building kvm-userspace HEAD against Avi's kernel tree?). But in case this was unintentional, read on...
It's a semi-supported configuration. We don't test it, but we'll fix reported bugs (or apply patches...).
Quoted 11 lines
First error:
libkvm.c:702: error: ‘struct kvm_irq_level’ has no member named ‘status’ make[1]: *** [libkvm.o] Error 1
Which is attributable to:
commit
ea1b668e7684dc43e9d198ba0b25fe47a0b2acd2Author: Gleb Natapov <[email protected]> Date: Wed Feb 4 17:30:01 2009 +0200
Quoted 7 lines
Quoted 2 lines
kvm: qemu: handle IRQ status injection in userspace
This is due to a missing #ifdef
KVM_CAP_... somewhere.Gleb, can you take a look?
Does this help?
libkvm/libkvm.c +6 -1
@@ -667,9 +667,14 @@ int kvm_set_irq_level(kvm_context_t kvm, int irq, int level, int *status)if (r ==-1 )perror ("kvm_set_irq_level" ); -if (status) +if (status) { +#if defined(KVM_CAP_IRQ_INJECT_STATUS ) && defined(KVM_IRQ_LINE_STATUS ) *status = (kvm->irqchip_inject_ioctl ==KVM_IRQ_LINE ) ?1 : event.status; +#else + *status =1 ; +#endif + }return 1 ; }
--
Gleb.
Quoted 11 lines · Gleb Natapov
libkvm/libkvm.c +1
-1@@ -667,9 +667,14 @@ int kvm_set_irq_level(kvm_context_t kvm, int irq, int level, int *status)if (r ==-1 )perror ("kvm_set_irq_level" ); -if (status) +if (status) {
libkvm/libkvm.c int kvm_set_irq_level(kvm_context_t kvm, int irq, int level, int *status) · line 680
Quoted 10 lines
libkvm/libkvm.c +5
-0+#if defined(KVM_CAP_IRQ_INJECT_STATUS ) && defined(KVM_IRQ_LINE_STATUS ) *status = (kvm->irqchip_inject_ioctl ==KVM_IRQ_LINE ) ?1 : event.status; +#else + *status =1 ; +#endif + }return 1 ; }
Isn't #ifdef KVM_CAP_... sufficient? If it is defined it should imply everything needed for injection status is defined and works.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 15 lines · Avi Kivity
Quoted 14 lines · Gleb Natapov
libkvm/libkvm.c +4
-0@@ -667,9 +667,14 @@ int kvm_set_irq_level(kvm_context_t kvm, int irq, int level, int *status)if (r ==-1 )perror ("kvm_set_irq_level" ); - if (status) +if (status) { +#if defined(KVM_CAP_IRQ_INJECT_STATUS ) && defined(KVM_IRQ_LINE_STATUS ) *status = (kvm->irqchip_inject_ioctl ==KVM_IRQ_LINE ) ?1 : event.status; +#else + *status =1 ;
Quoted 9 lines
libkvm/libkvm.c int kvm_set_irq_level(kvm_context_t kvm, int irq, int level, int *status)
Quoted 5 lines
libkvm/libkvm.c +2
-0+#endif + }return 1 ; }Isn't #ifdef
KVM_CAP_... sufficient? If it is defined it should imply everything needed for injection status is defined and works.
It should be sufficient. Just extra care. Remove?
--
Gleb.
Quoted 5 lines · Gleb Natapov
Quoted 3 lines
Isn't #ifdef
KVM_CAP_... sufficient? If it is defined it should imply everything needed for injection status is defined and works.It should be sufficient. Just extra care. Remove?
I removed it locally and applied.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 43 lines · Gregory Haskins
Hi kvm-devs,
Been away from the kvm scene for a while...hope everyone is well.FYI: There are a few build breakages between kvm-userspace.git HEAD (
f29d402ab885d30bfa7350378cff911c9c17a226) when you compile against Linus' linux-2.6.git HEAD (v2.6.29-rc8-041b62374c7fedc11a8a1eeda2868612d3d1436c)I am not sure if this is a supported configuration (e.g. perhaps you only support building kvm-userspace HEAD against Avi's kernel tree?). But in case this was unintentional, read on...
First error:
libkvm.c:702: error: 'struct
kvm_irq_level' has no member named 'status' make[1]: *** [libkvm.o] Error 1Which is attributable to:
commit
ea1b668e7684dc43e9d198ba0b25fe47a0b2acd2Author: Gleb Natapov <[email protected]> Date: Wed Feb 4 17:30:01 2009 +0200kvm: qemu: handle IRQ status injection in userspace
Reverting this patch does allow the build to get past this error. Then I hit the next one:
device-assignment.o: In function `deassign_device':
/home/ghaskins/sandbox/git/fabric/kvm-userspace/qemu/hw/device-assignment.c:562:
undefined reference to `kvm_deassign_pci_device'Reverting:
commit
1435f18213edee9fabf936f5d6be70054f1f2bd1Author: Weidong Han <[email protected]> Date: Wed Feb 18 14:33:41 2009 +0800kvm: qemu: fix hot remove assigned device
Followed by:
commit
71ae34caaa961330f53f40090cd180a74fcda5fc
Quoted 9 lines
Author: Weidong Han <[email protected]> Date: Wed Feb 18 14:28:30 2009 +0800kvm: qemu: deassign device from guest
Does fix the build. I realize reversion is probably not the desirable long term solution, but at least it points to the proper places that need some backwards-compat love ;)
kvm_deassign_pci_device is defined when KVM_CAP_DEVICE_DEASSIGNMENT is defined. Following patch should fix the breakage.
qemu/hw/device-assignment.c +2 -0
@@ -551,6 +551,7 @@ static int assign_irq(AssignedDevInfo *adev)static void deassign_device (AssignedDevInfo *adev) { +#ifdef KVM_CAP_DEVICE_DEASSIGNMENT struct kvm_assigned_pci_dev assigned_dev_data;AssignedDevice *dev = adev->assigned_dev;int r;
@@ -563,6 +564,7 @@ static void deassign_device(AssignedDevInfo *adev)if (r <0 )fprintf (stderr,"Failed to deassign device \"%s\" : %s\n" , adev->name,strerror (-r)); +#endif }void remove_assigned_device (AssignedDevInfo *adev)
Quoted 2 lines
Regards,
-Greg
Quoted 2 lines · Weidong
kvm_deassign_pci_deviceis defined whenKVM_CAP_DEVICE_DEASSIGNMENTis defined. Following patch should fix the breakage.
Signoff please.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 6 lines · Avi Kivity
Quoted 3 lines · Weidong
kvm_deassign_pci_deviceis defined whenKVM_CAP_DEVICE_DEASSIGNMENTis defined. Following patch should fix the breakage.Signoff please.
Sorry for missing it. Signed-off-by: Weidong Han <[email protected]>
Regards,
Weidong
Quoted 4 lines · Weidong
Quoted 2 lines · Avi Kivity
Han, Weidong wrote:
Quoted 10 lines
Quoted 6 lines
Quoted 4 lines
kvm_deassign_pci_deviceis defined whenKVM_CAP_DEVICE_DEASSIGNMENTis defined. Following patch should fix the breakage.Signoff please.
Sorry for missing it. Signed-off-by: Weidong Han <[email protected]>
Thanks; applied.
Signature · 1 line
error compiling committee.c: too many arguments to function