From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Subject: Re: [PATCH 3/4] libxl: only allow guests with a device model to use cd-{eject/insert} Date: Fri, 8 Apr 2016 16:17:55 +0200 Message-ID: References: <1460051129-20817-1-git-send-email-roger.pau@citrix.com> <1460051129-20817-4-git-send-email-roger.pau@citrix.com> <20160408132149.GI32191@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0-519121037-1460125077=:18723" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoXI9-0000hy-BE for xen-devel@lists.xenproject.org; Fri, 08 Apr 2016 14:21:45 +0000 In-Reply-To: <20160408132149.GI32191@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Wei Liu Cc: xen-devel@lists.xenproject.org, Ian Jackson , Roger Pau Monne List-Id: xen-devel@lists.xenproject.org --0-519121037-1460125077=:18723 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT On Fri, 8 Apr 2016, Wei Liu wrote: > On Thu, Apr 07, 2016 at 07:45:28PM +0200, Roger Pau Monne wrote: > > Signed-off-by: Roger Pau Monné > > Cc: Ian Jackson > > Cc: Wei Liu > > --- > > tools/libxl/libxl.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c > > index 9d785a4..232e2c1 100644 > > --- a/tools/libxl/libxl.c > > +++ b/tools/libxl/libxl.c > > @@ -2909,6 +2909,12 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, > > goto out; > > } > > > > + if (dm_ver == LIBXL_DEVICE_MODEL_VERSION_NONE) { > > + LOG(ERROR, "HVM guests without a device model cannot use cd-insert"); > > It's not specific to HVM, right? It's specific to guests with a device model (those are the only ones that can have an emulated CDROM device), and the only guests that can have a device model are HVM (although not all of them). Roger. --0-519121037-1460125077=:18723 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --0-519121037-1460125077=:18723--