WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [PATCH 15/23] vti domain save/restore: make vmx_vcpu_se

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH 15/23] vti domain save/restore: make vmx_vcpu_set_rr() accept non-current
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Fri, 12 Oct 2007 12:51:36 +0900
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Thu, 11 Oct 2007 20:53:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
# 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;
     }
 

Attachment: 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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH 15/23] vti domain save/restore: make vmx_vcpu_set_rr() accept non-current, Isaku Yamahata <=