# HG changeset patch
# User awilliam@xxxxxxxxxxxx
# Date 1172683124 25200
# Node ID 21d0d23a2ccac06d4325afc702373f40168ca4be
# Parent ac28d6c41e6f7a1c4ce7ea8b65c87c2008f9ea4f
[IA64] Fix ptc.ga emulation bug
If a vcpu migrates to the local cpu, smp_call_function_single() doesn't
work. Call ptc_ga_remote_func() directly instead.
Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>
---
xen/arch/ia64/vmx/vmmu.c | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diff -r ac28d6c41e6f -r 21d0d23a2cca xen/arch/ia64/vmx/vmmu.c
--- a/xen/arch/ia64/vmx/vmmu.c Wed Feb 28 09:43:09 2007 -0700
+++ b/xen/arch/ia64/vmx/vmmu.c Wed Feb 28 10:18:44 2007 -0700
@@ -590,6 +590,7 @@ IA64FAULT vmx_vcpu_ptc_ga(VCPU *vcpu, u6
struct domain *d = vcpu->domain;
struct vcpu *v;
struct ptc_ga_args args;
+ int proc;
args.vadr = va;
vcpu_get_rr(vcpu, va, &args.rid);
@@ -599,20 +600,21 @@ IA64FAULT vmx_vcpu_ptc_ga(VCPU *vcpu, u6
continue;
args.vcpu = v;
- if (v->processor != vcpu->processor) {
- int proc;
+again: /* Try again if VCPU has migrated. */
+ proc = v->processor;
+ if (proc != vcpu->processor) {
/* Flush VHPT on remote processors. */
- do {
- proc = v->processor;
- smp_call_function_single(v->processor,
- &ptc_ga_remote_func, &args, 0, 1);
- /* Try again if VCPU has migrated. */
- } while (proc != v->processor);
- }
- else if(v == vcpu)
+ smp_call_function_single(v->processor,
+ &ptc_ga_remote_func, &args, 0, 1);
+ if (proc != v->processor)
+ goto again;
+ } else if (v == vcpu) {
vmx_vcpu_ptc_l(v, va, ps);
- else
+ } else {
ptc_ga_remote_func(&args);
+ if (proc != v->processor)
+ goto again;
+ }
}
return IA64_NO_FAULT;
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|