Upstream Xen 3.4.0 and later versions provide a clean and safe way for Windows PV drivers to disable Qemu (IDE) devices. The patch prevents possible disk/ntfs corruption, which could happen if both the qemu emulated IDE device and the PV disk were active/visible at the same time. Patch against Xen 3.3.1 (from GPLPV driver author): http://www.meadowcourt.org/downloads/old/qemu_disable_patches.zip Some discussion about merging the patch on xen-devel: http://lists.xensource.com/archives/html/xen-devel/2009-01/msg00705.html This patch can also be found From xen-3.3.1-11 rpm in Fedora 11 (it was merged to xen-3.3.1-6).
Something like this is likely to be added anyway for RHEL6 HVM guests, but I cannot really say when (and I'm not 100% sure). That said, RHEL5 provides its own Windows PV drivers, which do not require the ability to "unplug" devices like this because they hide the devices on their own, without requiring QEMU support. The relevant code is under the GPLv2 (unfortunately not all of the RHEL5 PV drivers are, but this part is), and it is more or less separate from the rest of the drivers code, so it should even be possible to integrate it in the GPLPV drivers if the author is interested. I can provide the code on request.
Created attachment 414521 [details] upstream patch given by the reporter patch extracted from the URL given by the reporter for simplicity of access
Thanks! I sent an email to the GPLPV author (James Harper), let's see what he thinks about this.
According to Stefano, you also need this patch: commit e5d14857cd67490bf956d97c8888c0be95ed3f78 Author: Ian Jackson <ian.jackson.com> Date: Thu Feb 18 15:36:29 2010 +0000 When xen_platform_pci=0 also disable fixed Xen platform ioports disable_pf should affect the platform's fixed ioport (used for device hot unplug etc.) Contributed-by: Stefano Stabellini <stefano.stabellini.com> Signed-off-by: Ian Jackson <ian.jackson.com> 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++) {
Paolo: James Harper would like to see the code you have in rhel5.
.. the code you have in rhel5 xen windows pv drivers.
Fix built into xen-3.0.3-117.el5
Oh nice. Is that version of xen available for testing?
Hi Pasi, package can be downloaded from people.redhat.com/mrezanin/bz515238
(In reply to comment #11) > Oh nice. Is that version of xen available for testing? Tested on rhel6 HVM guest (with another set of needed updates to be posted to 6.1). Works great! Pls post test your test results in this bz (especially successes! ;-) ).
Test with: host: i386 and x86_64 xen-3.0.3-117.el5 kernel-xen-2.6.18-226.el5 guest: i386 and x86_64 kernel-2.6.32-74.el6.bz632021 Use rhel6 kernel with patch attached to BZ 632021, download from https://brewweb.devel.redhat.com/taskinfo?taskID=2814051 Testing: (1) Booted RHEL6 HVM guest with and without the following parameters: xen_emul_unplug=all xen_pv_hvm=enable (i) without any cmdline parameters, the RHEL6 HVM guest boots with ide(sd*) disks and rtl8139 network. (ii) with the cmdline parameters, the RHEL6 HVM guest boots with xvd* disks and a xen-netfront network interface. Addtional info: with xen-3.0.3-116 on host, even if we add the parameters to cmdline, the result is same with step(i), and for xen-3.0.3-117 it works as expected. According to the above result, move to VERIFIED.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0031.html