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

Re: [Xen-devel] [PATCH v10 06/20] vmx: Merge MSR management routines



On 09/08/2014 12:07 PM, Jan Beulich wrote:
On 04.09.14 at 05:41, <boris.ostrovsky@xxxxxxxxxx> wrote:
vmx_add_host_load_msr() and vmx_add_guest_msr() share fair amount of code.
Merge
them to simplify code maintenance.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx>
Considering the re-work, is this really valid?

Probably not (although the difference between this and earlier version is removal of one of the two routines).

This also brings up another question --- I have kept Dietmar's Tested-by tags for a while now and I believe he tested this quite a few revisions back. I am not sure whether the tags are valid any longer. I would like to keep them since it was very helpful work on his part but I don't know what the policy is.

(And I noticed that I accidentally dropped him from recipients list)

-int vmx_add_guest_msr(u32 msr)
+int vmx_add_msr(u32 msr, u8 type)
Why u8?

No reason. I'll change it to int.

--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2263,12 +2263,12 @@ static int vmx_msr_write_intercept(unsigned int msr, 
uint64_t msr_content)
for ( ; (rc == 0) && lbr->count; lbr++ )
                  for ( i = 0; (rc == 0) && (i < lbr->count); i++ )
-                    if ( (rc = vmx_add_guest_msr(lbr->base + i)) == 0 )
+                    if ( (rc = vmx_add_msr(lbr->base + i, VMX_GUEST_MSR)) == 0 
)
Perhaps better keep the old functions as inline wrappers?

Yes.

-boris


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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