From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUeDM-0006UI-NP for qemu-devel@nongnu.org; Wed, 16 May 2012 09:24:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUeDF-0000YD-98 for qemu-devel@nongnu.org; Wed, 16 May 2012 09:24:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUeDF-0000XW-12 for qemu-devel@nongnu.org; Wed, 16 May 2012 09:24:21 -0400 Date: Wed, 16 May 2012 16:24:15 +0300 From: "Michael S. Tsirkin" Message-ID: <20120516132415.GC8620@redhat.com> References: <1337095599-28836-1-git-send-email-anthony.perard@citrix.com> <1337095599-28836-5-git-send-email-anthony.perard@citrix.com> <20120515210053.GB12039@redhat.com> <4FB36001.9030008@redhat.com> <20120516081341.GB3183@redhat.com> <4FB36890.3090301@redhat.com> <20120516103057.GA5161@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: Stefano Stabellini Cc: Anthony Perard , Paolo Bonzini , QEMU-devel , Anthony Liguori , Xen Devel On Wed, May 16, 2012 at 11:37:02AM +0100, Stefano Stabellini wrote: > On Wed, 16 May 2012, Michael S. Tsirkin wrote: > > On Wed, May 16, 2012 at 11:19:53AM +0100, Stefano Stabellini wrote: > > > On Wed, 16 May 2012, Paolo Bonzini wrote: > > > > Il 16/05/2012 10:13, Michael S. Tsirkin ha scritto: > > > > > On Wed, May 16, 2012 at 10:06:25AM +0200, Paolo Bonzini wrote: > > > > >> On Xen the PV drivers can ask the firmware to surprise-remove the > > > > >> emulated NICs. > > > > > > > > > > So driver tells firmware (meaning acpi? how?) that it's ok > > > > > to do surprize removal? > > > > > > > > It writes something to some I/O port, and then QEMU surprise-removes the > > > > NICs. > > > > > > Yes, writing to a static I/O port provided by the Xen platform PCI > > > device, see hw/xen_platform.c:platform_fixed_ioport_writew. > > > > > > The guest can ask to unplug emulated NICs and disks this way. > > > Surprise-removal is OK in these cases. > > > > Confused. > > Don't you want to just remove the device on unplug? > > Yes, the NIC needs to "disappear" from the PCI bus. > > > > In fact the equivalent of guest calling _EJ0? > > Except that _EJ0 can or cannot be implemented, while this doesn't have > to go through ACPI or PCI hotplug and it is supposed to always work. So the answer is to simply free on unplug exactly like _EJ0 does. There's no forcing and no surprise removal here. -- MST