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-changelog

[Xen-changelog] [xen-unstable] [VMX] Fix use of VMCLEAR a little: no nee

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [VMX] Fix use of VMCLEAR a little: no need if not active on any CPU.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Jun 2006 12:40:27 +0000
Delivery-date: Fri, 23 Jun 2006 05:43:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID e6ec0eeabf771ad92c9100310d2a7c522750a5ed
# Parent  dab24595e52989a5c23471cdb9908e38b2d087b9
[VMX] Fix use of VMCLEAR a little: no need if not active on any CPU.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmcs.c |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff -r dab24595e529 -r e6ec0eeabf77 xen/arch/x86/hvm/vmx/vmcs.c
--- a/xen/arch/x86/hvm/vmx/vmcs.c       Thu Jun 22 15:10:48 2006 +0100
+++ b/xen/arch/x86/hvm/vmx/vmcs.c       Thu Jun 22 15:25:18 2006 +0100
@@ -74,12 +74,15 @@ static void __vmx_clear_vmcs(void *info)
 
 static void vmx_clear_vmcs(struct vcpu *v)
 {
-    unsigned int cpu = v->arch.hvm_vmx.active_cpu;
-
-    if ( (cpu == -1) || (cpu == smp_processor_id()) )
-        __vmx_clear_vmcs(v);
-    else
-        on_selected_cpus(cpumask_of_cpu(cpu), __vmx_clear_vmcs, v, 1, 1);
+    int cpu = v->arch.hvm_vmx.active_cpu;
+
+    if ( cpu == -1 )
+        return;
+
+    if ( cpu == smp_processor_id() )
+        return __vmx_clear_vmcs(v);
+
+    on_selected_cpus(cpumask_of_cpu(cpu), __vmx_clear_vmcs, v, 1, 1);
 }
 
 static void vmx_load_vmcs(struct vcpu *v)
@@ -97,6 +100,8 @@ void vmx_vmcs_enter(struct vcpu *v)
      *     context initialisation.
      *  2. VMPTRLD as soon as we context-switch to a HVM VCPU.
      *  3. VMCS destruction needs to happen later (from domain_destroy()).
+     * We can relax this a bit if a paused VCPU always commits its
+     * architectural state to a software structure.
      */
     if ( v == current )
         return;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [VMX] Fix use of VMCLEAR a little: no need if not active on any CPU., Xen patchbot-unstable <=