aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/io.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-04-03 11:44:10 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-04-03 11:44:10 +0100
commita9344ed5826043957f11d480e0cf48ec4bdc73b8 (patch)
tree0626f6f329ff0cba3be28a1ffd8fcbd57b5a2ca7 /xen/arch/x86/hvm/io.c
parent9123bf1da67844083f2fc514f09b27eb61fda716 (diff)
downloadxen-a9344ed5826043957f11d480e0cf48ec4bdc73b8.tar.gz
xen-a9344ed5826043957f11d480e0cf48ec4bdc73b8.tar.bz2
xen-a9344ed5826043957f11d480e0cf48ec4bdc73b8.zip
xen: Allow vcpus to defer a shutdown request across critical
asynchronous operations (in particular, hvm ioreq requests). Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/arch/x86/hvm/io.c')
-rw-r--r--xen/arch/x86/hvm/io.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xen/arch/x86/hvm/io.c b/xen/arch/x86/hvm/io.c
index 605a42978b..4bff30b2b9 100644
--- a/xen/arch/x86/hvm/io.c
+++ b/xen/arch/x86/hvm/io.c
@@ -771,10 +771,11 @@ void hvm_io_assist(struct vcpu *v)
struct cpu_user_regs *regs;
struct hvm_io_op *io_opp;
unsigned long gmfn;
+ struct domain *d = v->domain;
io_opp = &v->arch.hvm_vcpu.io_op;
regs = &io_opp->io_context;
- vio = get_vio(v->domain, v->vcpu_id);
+ vio = get_vio(d, v->vcpu_id);
p = &vio->vp_ioreq;
if ( p->state != STATE_IORESP_READY )
@@ -797,11 +798,13 @@ void hvm_io_assist(struct vcpu *v)
memcpy(guest_cpu_user_regs(), regs, HVM_CONTEXT_STACK_BYTES);
/* Has memory been dirtied? */
- if ( p->dir == IOREQ_READ && p->data_is_ptr )
+ if ( (p->dir == IOREQ_READ) && p->data_is_ptr )
{
gmfn = get_mfn_from_gpfn(paging_gva_to_gfn(v, p->data));
- mark_dirty(v->domain, gmfn);
+ mark_dirty(d, gmfn);
}
+
+ vcpu_end_shutdown_deferral(v);
}
/*