From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUOri-0008K4-Hn for qemu-devel@nongnu.org; Tue, 15 May 2012 17:01:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUOrc-0001YT-Dy for qemu-devel@nongnu.org; Tue, 15 May 2012 17:01:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUOrc-0001YP-5S for qemu-devel@nongnu.org; Tue, 15 May 2012 17:01:00 -0400 Date: Wed, 16 May 2012 00:00:53 +0300 From: "Michael S. Tsirkin" Message-ID: <20120515210053.GB12039@redhat.com> References: <1337095599-28836-1-git-send-email-anthony.perard@citrix.com> <1337095599-28836-5-git-send-email-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1337095599-28836-5-git-send-email-anthony.perard@citrix.com> Subject: Re: [Qemu-devel] [PATCH 4/4] xen: Fix PV-on-HVM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony PERARD Cc: Stefano Stabellini , QEMU-devel , Anthony Liguori , Xen Devel On Tue, May 15, 2012 at 04:26:39PM +0100, Anthony PERARD wrote: > In the context of PV-on-HVM under Xen, the emulated nics are supposed to be > unplug before the guest drivers are initialized. This mean that there must be > unplug without the consent of the guest. > > Without this patch, the guest end up with two nics with the same MAC, the > emulated nic and the PV nic. > > Signed-off-by: Anthony PERARD OK, so on Xen there are special devices that can be safely removed without telling the guest? Does there need to be regular hotplug for these devices too? Or can it be always surprise removal? > --- > hw/xen_platform.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/hw/xen_platform.c b/hw/xen_platform.c > index a9c52a6..2e47129 100644 > --- a/hw/xen_platform.c > +++ b/hw/xen_platform.c > @@ -87,7 +87,7 @@ static void unplug_nic(PCIBus *b, PCIDevice *d) > { > if (pci_get_word(d->config + PCI_CLASS_DEVICE) == > PCI_CLASS_NETWORK_ETHERNET) { > - qdev_unplug(&(d->qdev), NULL); > + qdev_force_unplug(&(d->qdev), NULL); > } > } > > -- > Anthony PERARD