diff mbox

[03/17] Fix build breakage on non-device-deassignment capable host kernels

Message ID 1242574999-20887-4-git-send-email-aliguori@us.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Anthony Liguori May 17, 2009, 3:43 p.m. UTC
From: Han, Weidong <weidong.han@intel.com>

kvm_deassign_pci_device is defined when KVM_CAP_DEVICE_DEASSIGNMENT is defined.

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Comments

Avi Kivity May 17, 2009, 4:58 p.m. UTC | #1
Anthony Liguori wrote:
> From: Han, Weidong <weidong.han@intel.com>
>
> kvm_deassign_pci_device is defined when KVM_CAP_DEVICE_DEASSIGNMENT is defined.
>   

Unneeded, since the headers are carried in qemu-kvm.git.
diff mbox

Patch

diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index b7cbcec..56d70b4 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -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)