[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] libxl: Remove cdrom forced QDISK w/ stubdom



On Tue, Jan 09, 2024 at 03:46:54PM -0500, Jason Andryuk wrote:
> A Linux HVM domain ignores PV block devices with type cdrom.  The
> Windows PV drivers also ignore device-type != "disk".  Therefore QEMU's
> emulated CD-ROM support is used.  This allows ejection and other CD-ROM
> features to work.
> 
> With a stubdom, QEMU is running in the stubdom.  A PV disk is still
> connected into the stubdom, and then QEMU can emulate the CD-ROM into
> the guest.  This removes the need for forcing to a QDISK.  Relax the
> checks to support this.
> 
> Signed-off-by: Jason Andryuk <jandryuk@xxxxxxxxx>
> ---
>  tools/libs/light/libxl_disk.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/libs/light/libxl_disk.c b/tools/libs/light/libxl_disk.c
> index b65cad33cc..d1f84ef404 100644
> --- a/tools/libs/light/libxl_disk.c
> +++ b/tools/libs/light/libxl_disk.c
> @@ -192,7 +192,8 @@ static int libxl__device_disk_setdefault(libxl__gc *gc, 
> uint32_t domid,
>  
>      /* Force Qdisk backend for CDROM devices of guests with a device model. 
> */
>      if (disk->is_cdrom != 0 &&
> -        libxl__domain_type(gc, domid) == LIBXL_DOMAIN_TYPE_HVM) {
> +        libxl__domain_type(gc, domid) == LIBXL_DOMAIN_TYPE_HVM &&
> +        !libxl_get_stubdom_id(CTX, domid)) {

Should this check for stubdomain flavor too? I guess it won't really
work with qemu-traditional.
Similar check also wants to be in the next patch, instead of completely
dropping stubdomain check.

>          if (!(disk->backend == LIBXL_DISK_BACKEND_QDISK ||
>                disk->backend == LIBXL_DISK_BACKEND_UNKNOWN)) {
>              LOGD(ERROR, domid, "Backend for CD devices on HVM guests must be 
> Qdisk");
> -- 
> 2.43.0
> 

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

Attachment: signature.asc
Description: PGP signature


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.