ia64/xen-unstable

changeset 16111:4e45ba84a1fa

[IA64] vti domain save/restore: make vmx_vcpu_set_rr() accept non-current

make vmx_vcpu_set_rr accept non-current vcpu for setting vcpu context.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Fri Oct 12 14:36:37 2007 -0600 (2007-10-12)
parents e120054bf0ac
children 52d9f5028397
files xen/arch/ia64/vmx/vmx_vcpu.c
line diff
     1.1 --- a/xen/arch/ia64/vmx/vmx_vcpu.c	Fri Oct 12 14:30:30 2007 -0600
     1.2 +++ b/xen/arch/ia64/vmx/vmx_vcpu.c	Fri Oct 12 14:36:37 2007 -0600
     1.3 @@ -171,23 +171,25 @@ IA64FAULT vmx_vcpu_set_rr(VCPU *vcpu, u6
     1.4      VMX(vcpu,vrr[reg>>VRN_SHIFT]) = val;
     1.5      switch((u64)(reg>>VRN_SHIFT)) {
     1.6      case VRN7:
     1.7 -        vmx_switch_rr7(vrrtomrr(vcpu,val),
     1.8 -                       (void *)vcpu->arch.vhpt.hash, pal_vaddr );
     1.9 +        if (likely(vcpu == current))
    1.10 +            vmx_switch_rr7(vrrtomrr(vcpu,val),
    1.11 +                           (void *)vcpu->arch.vhpt.hash, pal_vaddr );
    1.12         break;
    1.13      case VRN4:
    1.14          rrval = vrrtomrr(vcpu,val);
    1.15          vcpu->arch.metaphysical_saved_rr4 = rrval;
    1.16 -        if (is_virtual_mode(vcpu))
    1.17 +        if (is_virtual_mode(vcpu) && likely(vcpu == current))
    1.18              ia64_set_rr(reg,rrval);
    1.19          break;
    1.20      case VRN0:
    1.21          rrval = vrrtomrr(vcpu,val);
    1.22          vcpu->arch.metaphysical_saved_rr0 = rrval;
    1.23 -        if (is_virtual_mode(vcpu))
    1.24 +        if (is_virtual_mode(vcpu) && likely(vcpu == current))
    1.25              ia64_set_rr(reg,rrval);
    1.26          break;
    1.27      default:
    1.28 -        ia64_set_rr(reg,vrrtomrr(vcpu,val));
    1.29 +        if (likely(vcpu == current))
    1.30 +            ia64_set_rr(reg,vrrtomrr(vcpu,val));
    1.31          break;
    1.32      }
    1.33