[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [IA64] vti save-restore: reap ioreq after resume.
# HG changeset patch # User Alex Williamson <alex.williamson@xxxxxx> # Date 1194455420 25200 # Node ID 828cb584c1ccd9a1ed42ae856f3ee86b2dfa8ace # Parent 166bf3b044959aabadab84eda6e4d6c9d646fd66 [IA64] vti save-restore: reap ioreq after resume. Otherwise ioreq is left as STATE_IORESP_READY so that the domain will be paniced. Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx> --- xen/arch/ia64/vmx/vmx_init.c | 31 ++++++++++++++++++++++++++++--- xen/arch/ia64/xen/domain.c | 8 +++----- xen/include/asm-ia64/vmx.h | 2 +- 3 files changed, 32 insertions(+), 9 deletions(-) diff -r 166bf3b04495 -r 828cb584c1cc xen/arch/ia64/vmx/vmx_init.c --- a/xen/arch/ia64/vmx/vmx_init.c Wed Nov 07 10:07:06 2007 -0700 +++ b/xen/arch/ia64/vmx/vmx_init.c Wed Nov 07 10:10:20 2007 -0700 @@ -436,7 +436,32 @@ int vmx_setup_platform(struct domain *d) return 0; } -void vmx_do_launch(struct vcpu *v) -{ +void vmx_do_resume(struct vcpu *v) +{ + ioreq_t *p; + vmx_load_all_rr(v); -} + migrate_timer(&v->arch.arch_vmx.vtm.vtm_timer, v->processor); + + /* stolen from hvm_do_resume() in arch/x86/hvm/hvm.c */ + /* NB. Optimised for common case (p->state == STATE_IOREQ_NONE). */ + p = &get_vio(v->domain, v->vcpu_id)->vp_ioreq; + while (p->state != STATE_IOREQ_NONE) { + switch (p->state) { + case STATE_IORESP_READY: /* IORESP_READY -> NONE */ + vmx_io_assist(v); + break; + case STATE_IOREQ_READY: + case STATE_IOREQ_INPROCESS: + /* IOREQ_{READY,INPROCESS} -> IORESP_READY */ + wait_on_xen_event_channel(v->arch.arch_vmx.xen_port, + (p->state != STATE_IOREQ_READY) && + (p->state != STATE_IOREQ_INPROCESS)); + break; + default: + gdprintk(XENLOG_ERR, + "Weird HVM iorequest state %d.\n", p->state); + domain_crash_synchronous(); + } + } +} diff -r 166bf3b04495 -r 828cb584c1cc xen/arch/ia64/xen/domain.c --- a/xen/arch/ia64/xen/domain.c Wed Nov 07 10:07:06 2007 -0700 +++ b/xen/arch/ia64/xen/domain.c Wed Nov 07 10:10:20 2007 -0700 @@ -203,11 +203,9 @@ void schedule_tail(struct vcpu *prev) context_saved(prev); ia64_disable_vhpt_walker(); - if (VMX_DOMAIN(current)) { - vmx_do_launch(current); - migrate_timer(¤t->arch.arch_vmx.vtm.vtm_timer, - current->processor); - } else { + if (VMX_DOMAIN(current)) + vmx_do_resume(current); + else { if (VMX_DOMAIN(prev)) ia64_set_iva(&ia64_ivt); load_region_regs(current); diff -r 166bf3b04495 -r 828cb584c1cc xen/include/asm-ia64/vmx.h --- a/xen/include/asm-ia64/vmx.h Wed Nov 07 10:07:06 2007 -0700 +++ b/xen/include/asm-ia64/vmx.h Wed Nov 07 10:10:20 2007 -0700 @@ -34,7 +34,7 @@ extern void vmx_save_state(struct vcpu * extern void vmx_save_state(struct vcpu *v); extern void vmx_load_state(struct vcpu *v); extern int vmx_setup_platform(struct domain *d); -extern void vmx_do_launch(struct vcpu *v); +extern void vmx_do_resume(struct vcpu *v); extern void vmx_io_assist(struct vcpu *v); extern int ia64_hypercall (struct pt_regs *regs); extern void vmx_save_state(struct vcpu *v); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |