: Remove special case for mixed hvm/pv disks which may prevent boot
PATCH 1/1 : Remove special case for mixed hvm/pv disks which may prevent boot
If a pv-on-hvm guest is configured with hard-disk virtpath=xvda and emulated cdrom virtpath=hdc then all xvda disks are ignored and the system is rendered un-bootable. Remove this special case in qemu and simply provide an emulated equivalent of all devices and let guest unplug what it wants.
Unless there is a reason for this special case I am unaware of??
xenstore.c +1 -4
@@ -180,8 +180,6 @@ static void waitForDevice(char *fn)return ; } -static int any_hdN; -static int parse_drive_name (const char *dev,DriveInfo *out) {/* alway sleaves out->bdrv unchanged */ /* on success, returns 0 and fills in out->type, ->bus, ->unit */
@@ -189,7 +187,7 @@ static int parse_drive_name(const char *dev, DriveInfo *out) {int ch, max, per_bus;/* Change xvdN to look like hdN */ -if (!any_hdN && !strncmp (dev,"xvd" ,3 ) &&strlen (dev) ==4 ) { +if (!strncmp (dev,"xvd" ,3 ) &&strlen (dev) ==4 ) { ch = dev[3 ];fprintf (logfile,"Using %s for guest's hd%c\n" , dev, ch); out->type =IF_IDE ;
@@ -451,7 +449,6 @@ void xenstore_parse_domain_config(int hvm_domid)if (dev ==NULL )continue ;if (!strncmp (dev,"hd" ,2 )) { - any_hdN =1 ;break ; } }
Gianni Tedesco writes ("[Xen-devel] [PATCH]: Remove special case for mixed hvm/pv disks which may prevent boot"):
Quoted 5 lines
If a pv-on-hvm guest is configured with hard-disk virtpath=xvda and emulated cdrom virtpath=hdc then all xvda disks are ignored and the system is rendered un-bootable. Remove this special case in qemu and simply provide an emulated equivalent of all devices and let guest unplug what it wants.
HVM guest configs are supposed to specify hda= if they want the devices to appear as emulated IDE devices. The code you're patching is a special compatibility hack to allow for the case where the guest config file mentions _only_ xvda devices; it remaps them to hda on the assumption that the person writing the config file didn't intend to provide no emulated versions of those devices.
So I don't think this change is right ...
Ian.