]> xenbits.xensource.com Git - qemu-xen-4.2-testing.git/commitdiff
passthrough: magic protocol passthrough fix no-passthrough compile xen-4.0.0-rc4
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 16 Feb 2010 17:48:20 +0000 (17:48 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 16 Feb 2010 17:48:20 +0000 (17:48 +0000)
Changeset 60b80e3ee319e908069d1603e5b73f815acdffac broke the build
when CONFIG_PASSTHROUGH was not set.

It also failed to #include a necessary header file, generating a
compiler warning.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
hw/pci.c

index a1c1f161bffa7255e952b7f3f8ec8ff46a35ef29..b07e5ea2dab76040c89b99dc853aab409e773950 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
 #include "exec-all.h"
 #include "qemu-xen.h"
 
+#ifdef CONFIG_PASSTHROUGH
+#include "hw/pass-through.h"
+#endif
+
 extern int igd_passthru;
 
 //#define DEBUG_PCI
@@ -858,8 +862,11 @@ void pci_unplug_netifs(void)
            dev = bus->devices[x];
            if (dev &&
                dev->config[0xa] == 0 &&
-               dev->config[0xb] == 2 &&
-               test_pci_devfn(x) != 1) {
+               dev->config[0xb] == 2
+#ifdef CONFIG_PASSTHROUGH
+               && test_pci_devfn(x) != 1
+#endif
+               ) {
                /* Found a netif.  Remove it from the bus.  Note that
                   we don't free it here, since there could still be
                   references to it floating around.  There are only