[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] libxl: ignore emulated IDE disks beyond the first 4
commit fa9d82825a8ddee1894528576f383efddcdc3691 Author: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx> AuthorDate: Mon May 18 21:55:00 2020 -0400 Commit: Wei Liu <wl@xxxxxxx> CommitDate: Tue May 19 16:19:15 2020 +0100 libxl: ignore emulated IDE disks beyond the first 4 Qemu supports only 4 emulated IDE disks, when given more (or with higher indexes), it will fail to start. Since the disks can still be accessible using PV interface, just ignore emulated path and log a warning, instead of rejecting the configuration altogether. Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx> Reviewed-by: Jason Andryuk <jandryuk@xxxxxxxxx> Signed-off-by: Jason Andryuk <jandryuk@xxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl_dm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 8801e9364e..86694f669d 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -1894,6 +1894,13 @@ static int libxl__build_device_model_args_new(libxl__gc *gc, } if (disks[i].is_cdrom) { + if (disk > 4) { + LOGD(WARN, guest_domid, "Emulated CDROM can be only one of the first 4 disks.\n" + "Disk %s will be available via PV drivers but not as an " + "emulated disk.", + disks[i].vdev); + continue; + } drive = libxl__sprintf(gc, "if=ide,index=%d,readonly=on,media=cdrom,id=ide-%i", disk, dev_number); @@ -1971,6 +1978,10 @@ static int libxl__build_device_model_args_new(libxl__gc *gc, &disks[i], colo_mode); } else { + LOGD(WARN, guest_domid, "Only 4 emulated IDE disks are supported.\n" + "Disk %s will be available via PV drivers but not as an " + "emulated disk.", + disks[i].vdev); continue; /* Do not emulate this disk */ } -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |