From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zhai, Edwin" Subject: Re: issue in unplug qemu PCI devices Date: Sun, 21 Feb 2010 08:09:38 +0800 Message-ID: <4B8079C2.7080904@intel.com> References: <4B7515D9.7060407@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Stefano Stabellini Cc: Xen Developers , Ian Jackson , Keir Fraser List-Id: xen-devel@lists.xenproject.org Stefano, I have tested the latest ioemu, your 2 fixes really work. Thanks! Stefano Stabellini wrote: > 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++) { > > -- best rgds, edwin