[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] WRITE_MSR


  • To: "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Dong, Eddie" <eddie.dong@xxxxxxxxx>
  • Date: Thu, 10 May 2007 23:11:44 +0800
  • Delivery-date: Thu, 10 May 2007 08:10:19 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AceSGrxqECW6c94qSz2zmSSLBogIhQA+oO0g
  • Thread-topic: WRITE_MSR

Not sure why we do test_bit and then set_bit rather than set_bit directly. Any comments?
 
 
 
 
diff -r 3ef0510e44d0 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Tue May 08 10:21:23 2007 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Thu May 10 23:09:19 2007 +0800
@@ -103,8 +103,7 @@ static void vmx_save_host_msrs(void)
 
 #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);    \
+        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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.