WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] issue in unplug qemu PCI devices

To: Edwin Zhai <edwin.zhai@xxxxxxxxx>
Subject: Re: [Xen-devel] issue in unplug qemu PCI devices
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, 17 Feb 2010 11:08:15 +0000
Cc: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Wed, 17 Feb 2010 03:05:54 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <f53cd79a1002170204y7c90cf30l757f1d7a7d382190@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4B7515D9.7060407@xxxxxxxxx> <alpine.DEB.2.00.1002121606100.1147@kaball-desktop> <f53cd79a1002170204y7c90cf30l757f1d7a7d382190@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Wed, 17 Feb 2010, Edwin Zhai wrote:
> Stefano,
> Thanks for your fix. I'm in leave now and will have a test after back.
> BTW, do you think we need fix issue 2? You know some OSV will install
> and load the platform_pci module in guest by default. If end user
> doesn't config valid PV device in config file, guest would crash after
> unplugging emulated device. Is it necessary that we check if having a
> valid backend in xenstore before unplug related emulated device?
> 

You are right, qemu has to honor disable_pf for ioports as well.

---

diff --git a/hw/pc.c b/hw/pc.c
index 129e9d9..9375951 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1047,9 +1047,10 @@ vga_bios_error:
 #endif /* !CONFIG_DM */
     if (pci_enabled) {
         disable_pf = xenstore_parse_disable_pf_config();
-        if (disable_pf != 1)
+        if (disable_pf != 1) {
             pci_xen_platform_init(pci_bus);
-        platform_fixed_ioport_init();
+            platform_fixed_ioport_init();
+        }
     }
 
     for(i = 0; i < MAX_SERIAL_PORTS; i++) {

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel