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: Replace pointless test-then-set with

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] vmx: Replace pointless test-then-set with set.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 15 May 2007 08:21:16 -0700
Delivery-date: Tue, 15 May 2007 08:22:50 -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 Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1178970386 -3600
# Node ID 174995130550a7c8d69bb22cf8036cb4f9f13f71
# Parent  e33cce8fa400fa4c9b678de563672b2854b139db
vmx: Replace pointless test-then-set with set.
Spotted by Eddie Dong.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmx.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff -r e33cce8fa400 -r 174995130550 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Sat May 12 12:44:20 2007 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Sat May 12 12:46:26 2007 +0100
@@ -101,12 +101,11 @@ static void vmx_save_host_msrs(void)
         rdmsrl(msr_index[i], host_msr_state->msrs[i]);
 }
 
-#define WRITE_MSR(address)                                                  \
-        guest_msr_state->msrs[VMX_INDEX_MSR_ ## address] = msr_content;     \
-        if ( !test_bit(VMX_INDEX_MSR_ ## address, &guest_msr_state->flags) )\
-            set_bit(VMX_INDEX_MSR_ ## address, &guest_msr_state->flags);    \
-        wrmsrl(MSR_ ## address, msr_content);                               \
-        set_bit(VMX_INDEX_MSR_ ## address, &host_msr_state->flags);         \
+#define WRITE_MSR(address)                                              \
+        guest_msr_state->msrs[VMX_INDEX_MSR_ ## address] = msr_content; \
+        set_bit(VMX_INDEX_MSR_ ## address, &guest_msr_state->flags);    \
+        wrmsrl(MSR_ ## address, msr_content);                           \
+        set_bit(VMX_INDEX_MSR_ ## address, &host_msr_state->flags);     \
         break
 
 static inline int long_mode_do_msr_read(struct cpu_user_regs *regs)

_______________________________________________
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: Replace pointless test-then-set with set., Xen patchbot-unstable <=