From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUJei-0004TQ-Nn for qemu-devel@nongnu.org; Tue, 15 May 2012 11:27:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUJec-0004cG-NM for qemu-devel@nongnu.org; Tue, 15 May 2012 11:27:20 -0400 Received: from smtp.citrix.com ([66.165.176.89]:9882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUJec-0004by-Ih for qemu-devel@nongnu.org; Tue, 15 May 2012 11:27:14 -0400 From: Anthony PERARD Date: Tue, 15 May 2012 16:26:35 +0100 Message-ID: <1337095599-28836-1-git-send-email-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH 1.1 0/4] Xen: Fix PV-on-HVM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU-devel Cc: Anthony PERARD , Stefano Stabellini , "Michael S. Tsirkin" , Anthony Liguori , Xen Devel 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 series, the guest end up with two nics with the same MAC, the emulated nic and the PV nic. I tried few other path before to submite these patches: - delayed the hot unplug in QEMU until the guest initialize the hotplug. => the guest unplug the nic only after the driver initialized it. That's a bit late. - delayed the call to unplug the emulated device until pci_acpi_init is called => this is worse, the pv disc does not show up and the guest does not boot. In order to achive this fix, these patches introduce a new hotplug state only used in acpi_piix4, and a new qdev callback force_unplug. Would it be possible to have this fix in the next release? Thanks, Anthony PERARD (4): Introduce a new hotplug state: Force eject. qdev: Introduce qdev_force_unplug. pci: Add force_unplug callback. xen: Fix PV-on-HVM hw/acpi_piix4.c | 5 +++++ hw/pci.c | 15 +++++++++++++-- hw/pci.h | 1 + hw/qdev.c | 23 ++++++++++++++++++++--- hw/qdev.h | 3 +++ hw/xen_platform.c | 2 +- 6 files changed, 43 insertions(+), 6 deletions(-) -- Anthony PERARD