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

[Xen-devel] [PATCH]: 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??

Signed-off-by: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>

diff --git a/xenstore.c b/xenstore.c
index 4a35f55..e1c1e8a 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -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;
         }
     }



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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