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

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


 


Rackspace

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