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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Anthony Liguori
Date: Sunday, May 17, 2009 - 8:43 am

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>

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)
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/17][REVIEW] Backport candidates for stable-0.10, Anthony Liguori, (Sun May 17, 8:43 am)
[PATCH 03/17] Fix build breakage on non-device-deassignmen ..., Anthony Liguori, (Sun May 17, 8:43 am)
[PATCH 05/17] Stop/start cpus before/after devices, Anthony Liguori, (Sun May 17, 8:43 am)
[PATCH 06/17] Use statfs to determine size of huge pages, Anthony Liguori, (Sun May 17, 8:43 am)
[PATCH 07/17] Fixup 4GB+ memslot large page alignment, Anthony Liguori, (Sun May 17, 8:43 am)
[PATCH 08/17] Clear tap features on initialization, Anthony Liguori, (Sun May 17, 8:43 am)
[PATCH 09/17] Propagate errors on failed migration., Anthony Liguori, (Sun May 17, 8:43 am)
[PATCH 13/17] Increment version id for CPU save state, Anthony Liguori, (Sun May 17, 8:43 am)
[PATCH 14/17] Fix build when objdir != srcdir, Anthony Liguori, (Sun May 17, 8:43 am)
[PATCH 15/17] Fix loading extboot option rom, Anthony Liguori, (Sun May 17, 8:43 am)
Re: [PATCH 15/17] Fix loading extboot option rom, Avi Kivity, (Sun May 17, 10:06 am)
Re: [PATCH 0/17][REVIEW] Backport candidates for stable-0.10, Anthony Liguori, (Sun May 17, 4:32 pm)
Re: [PATCH 0/17][REVIEW] Backport candidates for stable-0.10, Anthony Liguori, (Sun May 17, 4:36 pm)
Re: [PATCH 06/17] Use statfs to determine size of huge pages, Anthony Liguori, (Mon May 18, 6:10 am)
Re: [PATCH 05/17] Stop/start cpus before/after devices, Marcelo Tosatti, (Mon May 18, 6:58 am)
Re: [PATCH 05/17] Stop/start cpus before/after devices, Anthony Liguori, (Mon May 18, 7:26 am)
Re: [PATCH 05/17] Stop/start cpus before/after devices, Marcelo Tosatti, (Mon May 18, 7:47 am)
Re: [PATCH 11/17] net: drop packet from tap device if all ..., Mark McLoughlin, (Tue May 19, 10:52 am)