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] Cs 13594 - broken?

To: edwin.zhai@xxxxxxxxx, "Keir" <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] Cs 13594 - broken?
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Wed, 31 Jan 2007 13:55:25 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 31 Jan 2007 04:55:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <45C06737.5090700@xxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcdFHfMh52iX7/BrQz+yFie0H1yCxAAFpODQ
Thread-topic: Cs 13594 - broken?
> i'm almost sure following change set break 32b HVM guest 
> save/restore on 
> 64b hypvisor:
> r13594: Make domctl/sysctl interfaces 32-/64-bit invariant.
> 
> restoring 32b linux cause a guest kernel panic, but restoring saved 
> image from previous changeset is okay. i.e. saved image 
> become damaged 
> in r13594.

Looking at that patch (and the current changeset matches the patch for
the below code with about +30 lines offset), I think this code is
broken:
@@ -976,10 +976,16 @@ int xc_linux_save(int xc_handle, int io_
                 goto out;
             }
 
-            if (xc_get_pfn_type_batch(xc_handle, dom, batch, pfn_type))
{
+            for ( j = 0; j < batch; j++ )
+                ((uint32_t *)pfn_type)[i] = pfn_type[i];
Shouldn't that be [j] in both places?
+            if ( xc_get_pfn_type_batch(xc_handle, dom, batch,
+                                       (uint32_t *)pfn_type) )
+            {
                 ERROR("get_pfn_type_batch failed");
                 goto out;
             }
+            for ( j = batch-1; j >= 0; j-- )
+                pfn_type[i] = ((uint32_t *)pfn_type)[i];
And here, as well?


Admittedly, this probably won't fix the 32/64 HVM restore being broken,
but I doubt that the code ACTUALLY works as it stands today. 

I'm still trying to find a reason for the restore not working... 

--
Mats



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

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