WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH]: Remove special case for mixed hvm/pv disks which ma

To: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]: Remove special case for mixed hvm/pv disks which may prevent boot
From: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Date: Fri, 23 Jul 2010 15:54:28 +0100
Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Fri, 23 Jul 2010 07:57:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>