From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmKIP-0000Rw-Ph for qemu-devel@nongnu.org; Wed, 14 Oct 2015 07:32:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmKIL-0002x8-Hz for qemu-devel@nongnu.org; Wed, 14 Oct 2015 07:32:37 -0400 Date: Wed, 14 Oct 2015 13:32:23 +0200 From: Kevin Wolf Message-ID: <20151014113223.GA16803@noname.str.redhat.com> References: <561D2966.9070007@m2r.biz> <561D3513.8060005@redhat.com> <20151014094727.GE4281@noname.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: Stefano Stabellini Cc: qemu-block@nongnu.org, "qemu-devel@nongnu.org" , "xen-devel@lists.xen.org" , Fabio Fantoni , Anthony.Perard@citrix.com, John Snow Am 14.10.2015 um 13:06 hat Stefano Stabellini geschrieben: > On Wed, 14 Oct 2015, Kevin Wolf wrote: > > [ 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=qemu.git;a=commitdiff;h=679f4f8b178e7c66fbc2f39c905374ee8663d5d8 > > > > > > > > > > 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 need. > > > > > > > > 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. > > I would be quite happy to stop (or even get rid of) the craziness. > > > > 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. > > Teaching SeaBIOS to deal with PV disks can be done, in fact we already > support PV disks in OVMF. It is possible to boot Windows with OVMF > without any IDE disks (patch pending for libxl to create a VM without > emulated IDE disks). > > However we have to be honest that implementing PV disk support in > SeaBIOS is a different magnitude of effort compared to implementing AHCI > "unplug". Agreed. But we generally try to do the right thing and not the easy thing. Maybe I'm missing something, but my impression was that the hybrid setup was only used so that you can boot from a PV disk even though the BIOS doesn't have a PV driver. In that case, why would you even want to use AHCI instead of IDE? During the early boot performance shouldn't be much different as there is no parallelism, and afterwards the PV driver is used. > I would suggest Fabio to avoid AHCI disks altogether and just use OVMF > with PV disks only and Anthony's patch to libxl to avoid creating any > IDE disks: http://marc.info/?l=xen-devel&m=144482080812353. > > Would that work for you? That sounds certainly like a better step forward than adding a crude hack to AHCI. And if you want to make me completely happy, plan to extend SeaBIOS so that we can even drop the existing hack in IDE. Kevin