From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmLUF-0005mk-Ez for qemu-devel@nongnu.org; Wed, 14 Oct 2015 08:48:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmLUC-00029G-4G for qemu-devel@nongnu.org; Wed, 14 Oct 2015 08:48:55 -0400 From: Paul Durrant Date: Wed, 14 Oct 2015 12:48:47 +0000 Message-ID: <9AAE0902D5BC7E449B7C8E4E778ABCD02F6114DD@AMSPEX01CL01.citrite.net> References: <561D2966.9070007@m2r.biz> <561D3513.8060005@redhat.com> <20151014094727.GE4281@noname.str.redhat.com> <561E3865.1010500@m2r.biz> In-Reply-To: <561E3865.1010500@m2r.biz> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] Question about xen disk unplug support for ahci missed in qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fabio Fantoni , Kevin Wolf , Stefano Stabellini Cc: Anthony Perard , John Snow , "qemu-devel@nongnu.org" , "qemu-block@nongnu.org" , "xen-devel@lists.xen.org" > -----Original Message----- > From: Fabio Fantoni [mailto:fabio.fantoni@m2r.biz] > Sent: 14 October 2015 12:12 > To: Kevin Wolf; Stefano Stabellini > Cc: John Snow; Anthony Perard; qemu-devel@nongnu.org; xen- > devel@lists.xen.org; qemu-block@nongnu.org; Paul Durrant > Subject: Re: [Qemu-devel] Question about xen disk unplug support for ahci > missed in qemu >=20 >=20 >=20 > Il 14/10/2015 11:47, Kevin Wolf ha scritto: > > [ CC qemu-block ] > > > > Am 13.10.2015 um 19:10 hat Stefano Stabellini geschrieben: > >> On Tue, 13 Oct 2015, John Snow wrote: > >>> On 10/13/2015 11:55 AM, Fabio Fantoni wrote: > >>>> I added ahci disk support in libxl and using it for week seems that = was > >>>> ok, after a reply of Stefano Stabellini seems that xen disk unplug > >>>> support only ide disks: > >>>> > http://git.qemu.org/?p=3Dqemu.git;a=3Dcommitdiff;h=3D679f4f8b178e7c66fbc2= f39 > c905374ee8663d5d8 > >>>> > >>>> Today Paul Durrant told me that even if pv disk is ok also with ahci= and > >>>> the emulated one is offline can be a risk: > >>>> http://lists.xenproject.org/archives/html/win-pv-devel/2015- > 10/msg00021.html > >>>> > >>>> > >>>> I tried to take a fast look in qemu code but I not understand the > needed > >>>> thing for add the xen disk unplug support also for ahci, can someone= do > >>>> it or tell me useful information for do it please? > >>>> > >>>> Thanks for any reply and sorry for my bad english. > >>>> > >>> I'm not entirely sure what features you need AHCI to support in order > >>> for Xen to be happy. > >>> > >>> I'd guess hotplugging, but where I get confused is that IDE disks don= 't > >>> support hotplugging either, so I guess I'm not sure sure what you nee= d. > >>> > >>> Stefano, can you help bridge my Xen knowledge gap? > >> > >> Hi John, > >> > >> we need something like hw/i386/xen/xen_platform.c:unplug_disks but > that > >> can unplug AHCI disk. And by unplug, I mean "make disappear" like > >> pci_piix3_xen_ide_unplug does for ide. > > Maybe this would be the right time to stop the craziness with your > > hybrid IDE/xendisk setup. It's a horrible thing that would never happen > > on real hardware. Unfortunately, it's going to be difficult to remove such 'craziness' when y= ou don't know a priori whether the VM has PV drivers or not.=20 > > > > Can't you just teach SeaBIOS how to deal with your PV disks and then > > only add that to your VM and forget about IDE/AHCI? I mean, that's how > > it's done for virtio-blk, and it doesn't involve any insanities like > > ripping out non-hotpluggable devices. > > Does Windows have in-box virtio-blk drivers? If not, how does it boot? > > Hm... How does a reboot of a machine that had its IDE already removed > > actually work? Do you restart the qemu process on reboot? > > The IDE disks are always present during boot, but before the OS enumerates = them they are 'unplugged' and then PV drivers are used instead. The only ot= her way would be to somehow obscure them from OS enumeration so they could = be left lying around but remain unused. That's feasible for Windows, but I = don't know about other OS. Paul > > Kevin > I thinkthat would be a good idea, unfortunately I'm not able to do that > and I do not know if the developers of xen would agree to such modificati= on. >=20 > If will be done, for example having new disk type "xenpv" require the pv > drivers installed, with linux having drivers included should not be a > problem but on windows yes FWIK. > Like virtio driver should be installed before (or adding them in windows > install), I don't know if will be ok specifying them in install for with > xen driver, another possibility can be start domU with ide disk type, > install the xen pv drivers and reboot selecting xenpv disk type instead. > Doing it FWIK require not only xen and qemu changes but also pv drivers > change, I added on cc also Paul Durrant for see what think about. > With actual unplug based on my tests in some years I had many problem > with windows domUs (with both old and new pv drivers) resulting in > "windows boot blue screen error", I suppose that changing/improving > unplug method can decrease them, is it correct? >=20 > About reboot xen do different from kvm recreating full domU each time > (and new qemu process), I don't know if is possible and good change the > method. >=20 > Thanks for any reply and sorry for my bad english.