From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v8 00/15] execute hotplug scripts from libxl Date: Sun, 8 Jul 2012 12:41:52 -0600 Message-ID: <1341772912.797.7.camel@hastur.hellion.org.uk> References: <1341403176-50715-1-git-send-email-roger.pau@citrix.com> <1341772363.797.2.camel@hastur.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1341772363.797.2.camel@hastur.hellion.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau Monne Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Sun, 2012-07-08 at 14:32 -0400, Ian Campbell wrote: > (resending as I don't think I had SMTP setup properly on my laptop -- sorry if you get this twice!) > > On Wed, 2012-07-04 at 07:59 -0400, Roger Pau Monne wrote: > > This new serie (v8) fixes a code refactoring problem that was present > > in v7 (06/15 changed code introduced by 05/15). > > From somewhere in here I'm seeing timeouts waiting for the b/e to go to > state 5 when doing cd-insert on an HVM guest. I should have said that it does actually seem to eventually succeed. > I suspect because this is > (or should be) turned into a virtual media change rather than an actual > device remove and insert? I've not really got a clue how this is suppose to work, but looking at tools/qemu-xen-traditional-dir/xenstore.c I see things like: fprintf(stderr,"medium change watch on ... Experimentally it seems that ejecting the ISO can be done with: xenstore-rm /local/domain/0/backend/qdisk/45/5632/params and inserting with xenstore-write /local/domain/0/backend/qdisk/45/5632/params aio:/scratch/mini.iso (whether you can skip eject to do a change I didn't check) So I think the libxl_cdrom_insert alg needs to be something like: if (hvm) rewrite params key if stubdomid libxl_device_disk_remove(domid) libxl_device_disk_add(domid) else /* pv */ libxl_device_disk_remove(domid) libxl_device_disk_add(domid) where the libxl_device_disk_* are actually async initiations and a chain of callbacks Grepping around in xend I don't see where this used to be done, maybe it wasn't. I can't see an xm equiv to xl cd-insert... Ian.