32/64 resotre broken
keir,
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.
according the log, hvm context seems to be okay. i doubt whether vcpu context saving process is changed.
do you have any idea?
thanks,
Signature · 2 lines
best rgds, edwin
Cs 13594 - broken?
Quoted 9 lines
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
Re: Cs 13594 - broken?
Quoted 1 line · Mats
Shouldn't that be [j] in both places?
Yep; that's fixed in the staging tree, but hasn't made it to the public tree yet.
Cheers,
Tim.
RE: Cs 13594 - broken?
Quoted 7 lines
-----Original Message-----
From: Tim Deegan [mailto:[email protected]]
Sent: 31 January 2007 13:01
To: Petersson, Mats
Cc: [email protected]; Keir; [email protected]
Subject: Re: [Xen-devel] Cs 13594 - broken?
Quoted 6 lines
Quoted 1 line · Mats
Shouldn't that be [j] in both places?
Yep; that's fixed in the staging tree, but hasn't made it to the public
tree yet.
So it is - sorry for the duplicated error report... :-(
--
Mats
Quoted 8 lines
Cheers,
Tim.