aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/x86_64/traps.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-07-04 12:00:24 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-07-04 12:00:24 +0100
commit4539594d46f9d1ed1ad34f2662eea985839435a7 (patch)
tree897b50e68f865106efdeae2befc9fb9902ed2b1c /xen/arch/x86/x86_64/traps.c
parent5552b9af817acd2253a2423e04b147e0d26d751d (diff)
downloadxen-4539594d46f9d1ed1ad34f2662eea985839435a7.tar.gz
xen-4539594d46f9d1ed1ad34f2662eea985839435a7.tar.bz2
xen-4539594d46f9d1ed1ad34f2662eea985839435a7.zip
Add facility to get notification of domain suspend by event channel.
This event channel will be notified when the domain transitions to the suspended state, which can be much faster than raising VIRQ_DOM_EXC and waiting for the notification to be propagated via xenstore. No attempt is made here to prevent multiple subscribers (last one wins), or to detect that the subscriber has gone away. Userspace tools should take care. Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
Diffstat (limited to 'xen/arch/x86/x86_64/traps.c')
-rw-r--r--xen/arch/x86/x86_64/traps.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c
index 14769786ec..700d3a0e94 100644
--- a/xen/arch/x86/x86_64/traps.c
+++ b/xen/arch/x86/x86_64/traps.c
@@ -288,6 +288,10 @@ unsigned long do_iret(void)
regs->rcx = iret_saved.rcx;
}
+ /* Restore affinity. */
+ if (!cpus_equal(v->cpu_affinity_tmp, v->cpu_affinity))
+ vcpu_set_affinity(v, &v->cpu_affinity_tmp);
+
/* No longer in NMI context. */
v->nmi_masked = 0;