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
On 05/15/2012 10:26 AM, 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.Stefano, Can you do a PULL for the various 1.1 fixes for Xen? Please try to get any -rc3 pull requests in by Friday. Thanks, Anthony Liguori> > 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(-) >
On Tue, 15 May 2012, Anthony Liguori wrote:> On 05/15/2012 10:26 AM, 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. > > Stefano, > > Can you do a PULL for the various 1.1 fixes for Xen? Please try to get any -rc3 > pull requests in by Friday.Sure, I am going to issue a PULL request for yesterday''s patches today. Regarding Anthony''s new fixes, I''ll send them out on Thursday to get people a chance to read them if for you is OK.
On Tue, 15 May 2012, 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 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?I would be in favor for having this fix in 1.1. Apart from the two comments I sent, I think that the patch series looks reasonable.
On Tue, May 15, 2012 at 04:26:35PM +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.Guest drivers for which device?> 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.Shouldn''t be a problem if one of them has link down state. So maybe just be careful not to bring PV link up until after emulated nic goes away?> 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