From: Stefano Stabellini Subject: Re: issue in unplug qemu PCI devices Date: Wed, 17 Feb 2010 11:08:15 +0000 Message-ID: References: <4B7515D9.7060407@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Edwin Zhai Cc: Xen Developers , Ian Jackson , Keir Fraser , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org 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++) {