Skip to contentSkip to conversation

HVM resumable with -c flag?

DISCUSSION Mike Sun 3 participants 11 messages Sep 12, 2008 – Sep 19, 2008

lore
Share & tools
lore

Mike Sun

author
#0 lore raw

Hi,

I'm working off of the 3.1 branch. I am having problems performing an "xm save -c" on an HVM domain. The checkpoint works fine, but the HVM domain is then left in a corrupt state. I know that Brendan Cully had submitted patches that would check to see if the domain was resumable first. Did these patches make it upstream? More basically, I don't actually understand what deems a domain resumable or not....?

Thanks,
Mike

#1 lore raw

xc_domain_resume_any() should be doing just DOMCTL_resumedomain if called on an HVM guest, rather than exiting with an error. Should be easy to fix.

-- Keir

Quoted 16 lines · Mike Sun

Hi,

I'm working off of the 3.1 branch. I am having problems performing an "xm save -c" on an HVM domain. The checkpoint works fine, but the HVM domain is then left in a corrupt state. I know that Brendan Cully had submitted patches that would check to see if the domain was resumable first. Did these patches make it upstream? More basically, I don't actually understand what deems a domain resumable or not....?

Thanks,
Mike

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

Actually it seems to work okay for me with or without PV drivers. xc_domain_resume() was long ago (pre-3.1) fixed to support any HVM guest.

-- Keir

Quoted 24 lines · Keir Fraser

xc_domain_resume_any() should be doing just DOMCTL_resumedomain if called on an HVM guest, rather than exiting with an error. Should be easy to fix.

-- Keir

Quoted 16 lines · Mike Sun

Hi,

I'm working off of the 3.1 branch. I am having problems performing an "xm save -c" on an HVM domain. The checkpoint works fine, but the HVM domain is then left in a corrupt state. I know that Brendan Cully had submitted patches that would check to see if the domain was resumable first. Did these patches make it upstream? More basically, I don't actually understand what deems a domain resumable or not....?

Thanks,
Mike

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

author
#3 lore raw

Sorry if this is a stupid question, but are you saying that all HVM guests are now resumable and there no longer needs to be any check for that as was done by Brendan Cully's earlier patch requests?

If that's the case, there's something going on for me. I've tried to different HVM guests (a Debian installation and a Damn Small Linux Live CD) and after checkpointing, the guests seem to get lodged in a strange state. I can no longer access the guest's console via VNC and the state is reported by xend as "------". Any ideas?

Thanks!
Mike

Quoted 34 lines · Keir Fraser

Actually it seems to work okay for me with or without PV drivers. xc_domain_resume() was long ago (pre-3.1) fixed to support any HVM guest.

-- Keir

Quoted 24 lines · Keir Fraser

xc_domain_resume_any() should be doing just DOMCTL_resumedomain if called on an HVM guest, rather than exiting with an error. Should be easy to fix.

-- Keir

Quoted 16 lines · Mike Sun

Hi,

I'm working off of the 3.1 branch. I am having problems performing an "xm save -c" on an HVM domain. The checkpoint works fine, but the HVM domain is then left in a corrupt state. I know that Brendan Cully had submitted patches that would check to see if the domain was resumable first. Did these patches make it upstream? More basically, I don't actually understand what deems a domain resumable or not....?

Thanks,
Mike

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#4 lore raw
Quoted 3 lines · Mike Sun

Sorry if this is a stupid question, but are you saying that all HVM guests are now resumable and there no longer needs to be any check for that as was done by Brendan Cully's earlier patch requests?

Correct. All HVM PV drivers must support suspend cancellation (i.e., resume). And without PV drivers, resume is as simple as just continuing execution of the guest from where it left off!

Quoted 5 lines

If that's the case, there's something going on for me. I've tried to different HVM guests (a Debian installation and a Damn Small Linux Live CD) and after checkpointing, the guests seem to get lodged in a strange state. I can no longer access the guest's console via VNC and the state is reported by xend as "------". Any ideas?

A weird state. My guess is your qemu-dm is not resumable. It used to consider suspend to be a one-way trip, and kill itself. That's been fixed quite a long while, but did it work back in 3.1.x? I'm not sure.

Anyway, qemu-dm is where I suggest you investigate first. The guest is most likely hanging waiting for work to be done by an unresponsive (or non-existent) qemu_dm process.

-- Keir

#5 lore raw
Quoted 9 lines · Keir Fraser
Quoted 3 lines · Mike Sun

Sorry if this is a stupid question, but are you saying that all HVM guests are now resumable and there no longer needs to be any check for that as was done by Brendan Cully's earlier patch requests?

Correct. All HVM PV drivers must support suspend cancellation (i.e., resume). And without PV drivers, resume is as simple as just continuing execution of the guest from where it left off!

Uh, when was this requirement introduced?

regards
john

#6 lore raw
Quoted 8 lines · John Levon
Quoted 6 lines · Keir Fraser
Quoted 3 lines · Mike Sun

Sorry if this is a stupid question, but are you saying that all HVM guests are now resumable and there no longer needs to be any check for that as was done by Brendan Cully's earlier patch requests?

Quoted 5 lines
Quoted 3 lines

Correct. All HVM PV drivers must support suspend cancellation (i.e., resume). And without PV drivers, resume is as simple as just continuing execution of the guest from where it left off!

Uh, when was this requirement introduced?

Since guest resume was supported by hypervisor and tools. We've never supported resume of HVM guests with 'uncooperative' PV drivers installed.

-- Keir

author
#7 lore raw

Thanks Keir. It is the qemu-dm. Hmm, not my dilemma is whether it'd be a fairly easy thing to incorporate the newer qemu-dm into a 3.1.x branch... I've made some major changes to the shadow page table code for my work and would rather not try and merge them into 3.2.x if I don't have to at this point.

Mike

Quoted 23 lines · Keir Fraser
Quoted 8 lines · John Levon
Quoted 6 lines · Keir Fraser
Quoted 3 lines · Mike Sun

Sorry if this is a stupid question, but are you saying that all HVM guests are now resumable and there no longer needs to be any check for that as was done by Brendan Cully's earlier patch requests?

Quoted 5 lines
Quoted 3 lines

Correct. All HVM PV drivers must support suspend cancellation (i.e., resume). And without PV drivers, resume is as simple as just continuing execution of the guest from where it left off!

Uh, when was this requirement introduced?

Since guest resume was supported by hypervisor and tools. We've never supported resume of HVM guests with 'uncooperative' PV drivers installed.

-- Keir

#8 lore raw

qemu-dm should be quite portable.

-- Keir

Quoted 33 lines · Mike Sun

Thanks Keir. It is the qemu-dm. Hmm, not my dilemma is whether it'd be a fairly easy thing to incorporate the newer qemu-dm into a 3.1.x branch... I've made some major changes to the shadow page table code for my work and would rather not try and merge them into 3.2.x if I don't have to at this point.

Mike

Quoted 23 lines · Keir Fraser
Quoted 8 lines · John Levon
Quoted 6 lines · Keir Fraser
Quoted 3 lines · Mike Sun

Sorry if this is a stupid question, but are you saying that all HVM guests are now resumable and there no longer needs to be any check for that as was done by Brendan Cully's earlier patch requests?

Quoted 5 lines
Quoted 3 lines

Correct. All HVM PV drivers must support suspend cancellation (i.e., resume). And without PV drivers, resume is as simple as just continuing execution of the guest from where it left off!

Uh, when was this requirement introduced?

Since guest resume was supported by hypervisor and tools. We've never supported resume of HVM guests with 'uncooperative' PV drivers installed.

-- Keir

author
#9 lore raw

Hmm... I attempted to replace the tools/ioemu source in 3.1.4 with that from 3.2.1... and find this call in cirrus_vga.c is not supported in 3.1.x:

(void)xc_domain_pin_memory_cacheattr(
xc_handle, domid,
begin >> TARGET_PAGE_BITS,
end >> TARGET_PAGE_BITS,
XEN_DOMCTL_MEM_CACHEATTR_WB);

I looked into patching 3.1.x with the code necessary to support that function call, but found myself down a long list of dependencies that required updating things like mtrr and mm.c which seemed a bit dangerous.

I figured I'd just remove that memory cache pin call in cirrus_vga.c and see how that went. (The only other slight change I had to make was to remove the z position stuff from xenfb.c). Everything build, but I can't create HVM domains without them getting wedged in a "weird" state (i.e. -----), so it looks like qemu-dm is bugging out.

Any ideas on how I can port the 0.90 version of QEMU in Xen 3.2.x into Xen 3.1.x easily?

Thanks,
Mike

Quoted 42 lines · Keir Fraser

qemu-dm should be quite portable.

-- Keir

Quoted 33 lines · Mike Sun

Thanks Keir. It is the qemu-dm. Hmm, not my dilemma is whether it'd be a fairly easy thing to incorporate the newer qemu-dm into a 3.1.x branch... I've made some major changes to the shadow page table code for my work and would rather not try and merge them into 3.2.x if I don't have to at this point.

Mike

Quoted 23 lines · Keir Fraser
Quoted 8 lines · John Levon
Quoted 6 lines · Keir Fraser
Quoted 3 lines · Mike Sun

Sorry if this is a stupid question, but are you saying that all HVM guests are now resumable and there no longer needs to be any check for that as was done by Brendan Cully's earlier patch requests?

Quoted 5 lines
Quoted 3 lines

Correct. All HVM PV drivers must support suspend cancellation (i.e., resume). And without PV drivers, resume is as simple as just continuing execution of the guest from where it left off!

Uh, when was this requirement introduced?

Since guest resume was supported by hypervisor and tools. We've never supported resume of HVM guests with 'uncooperative' PV drivers installed.

-- Keir

#10 lore raw
Quoted 10 lines · Mike Sun

Hmm... I attempted to replace the tools/ioemu source in 3.1.4 with that from 3.2.1... and find this call in cirrus_vga.c is not supported in 3.1.x:

(void)xc_domain_pin_memory_cacheattr(
xc_handle, domid,
begin >> TARGET_PAGE_BITS,
end >> TARGET_PAGE_BITS,
XEN_DOMCTL_MEM_CACHEATTR_WB);

Quoted 4 lines

I looked into patching 3.1.x with the code necessary to support that function call, but found myself down a long list of dependencies that required updating things like mtrr and mm.c which seemed a bit dangerous.

You don't need that call. It's related to real device passthrough (e.g., Intel VT-d).

Quoted 8 lines

I figured I'd just remove that memory cache pin call in cirrus_vga.c and see how that went. (The only other slight change I had to make was to remove the z position stuff from xenfb.c). Everything build, but I can't create HVM domains without them getting wedged in a "weird" state (i.e. -----), so it looks like qemu-dm is bugging out.

Any ideas on how I can port the 0.90 version of QEMU in Xen 3.2.x into Xen 3.1.x easily?

Mmm not really. Actually I'm surprised it built at all without further changes to the source code.

Perhaps you'd be better cherry-picking 3.2.x patches to backport to the 3.1.x qemu. Changesets 15639 and 15641 would be obvious candidates.

-- Keir