# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1192013129 -32400
# Node ID 905a46fbe0d8f1c51e4eec565434b6e0069454ad
# Parent 795895b7bc84c4ea03bd5c4403325e99427ef4cf
make vmx_vcpu_set_rr accept non-current vcpu for setting vcpu context.
PATCHNAME: make_vmx_vcpu_set_rr_accept_non_current
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
diff -r 795895b7bc84 -r 905a46fbe0d8 xen/arch/ia64/vmx/vmx_vcpu.c
--- a/xen/arch/ia64/vmx/vmx_vcpu.c Thu Oct 11 18:21:42 2007 +0900
+++ b/xen/arch/ia64/vmx/vmx_vcpu.c Wed Oct 10 19:45:29 2007 +0900
@@ -171,23 +171,25 @@ IA64FAULT vmx_vcpu_set_rr(VCPU *vcpu, u6
VMX(vcpu,vrr[reg>>VRN_SHIFT]) = val;
switch((u64)(reg>>VRN_SHIFT)) {
case VRN7:
- vmx_switch_rr7(vrrtomrr(vcpu,val),
- (void *)vcpu->arch.vhpt.hash, pal_vaddr );
+ if (likely(vcpu == current))
+ vmx_switch_rr7(vrrtomrr(vcpu,val),
+ (void *)vcpu->arch.vhpt.hash, pal_vaddr );
break;
case VRN4:
rrval = vrrtomrr(vcpu,val);
vcpu->arch.metaphysical_saved_rr4 = rrval;
- if (is_virtual_mode(vcpu))
+ if (is_virtual_mode(vcpu) && likely(vcpu == current))
ia64_set_rr(reg,rrval);
break;
case VRN0:
rrval = vrrtomrr(vcpu,val);
vcpu->arch.metaphysical_saved_rr0 = rrval;
- if (is_virtual_mode(vcpu))
+ if (is_virtual_mode(vcpu) && likely(vcpu == current))
ia64_set_rr(reg,rrval);
break;
default:
- ia64_set_rr(reg,vrrtomrr(vcpu,val));
+ if (likely(vcpu == current))
+ ia64_set_rr(reg,vrrtomrr(vcpu,val));
break;
}
16063_905a46fbe0d8_make_vmx_vcpu_set_rr_accept_non_current.patch
Description: Text Data
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|