diff mbox

[2/6] x86/vpmu: Use vmx_{clear, set}_msr_intercept() rather than opencoding them

Message ID df103879-af0a-b2ca-5799-d1c6ae842d32@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andrew Cooper July 19, 2017, 12:17 p.m. UTC
On 19/07/17 12:57, Andrew Cooper wrote:
> No functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

I have just realise I can now drop msraddr_to_bitpos(), so have folded
the additional hunk into this patch.

     unsigned int i;

Comments

Tian, Kevin July 27, 2017, 5:46 a.m. UTC | #1
> From: Andrew Cooper [mailto:andrew.cooper3@citrix.com]
> Sent: Wednesday, July 19, 2017 8:18 PM
> 
> On 19/07/17 12:57, Andrew Cooper wrote:
> > No functional change.
> >
> > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> 
> I have just realise I can now drop msraddr_to_bitpos(), so have folded
> the additional hunk into this patch.
> 
> diff --git a/xen/arch/x86/cpu/vpmu_intel.c
> b/xen/arch/x86/cpu/vpmu_intel.c
> index d58eca3..207e2e7 100644
> --- a/xen/arch/x86/cpu/vpmu_intel.c
> +++ b/xen/arch/x86/cpu/vpmu_intel.c
> @@ -225,12 +225,6 @@ static int is_core2_vpmu_msr(u32 msr_index, int
> *type, int *index)
>      }
>  }
> 
> -static inline int msraddr_to_bitpos(int x)
> -{
> -    ASSERT(x == (x & 0x1fff));
> -    return x;
> -}
> -
>  static void core2_vpmu_set_msr_bitmap(struct vcpu *v)
>  {
>      unsigned int i;

Acked-by: Kevin Tian <kevin.tian@intel.com>
diff mbox

Patch

diff --git a/xen/arch/x86/cpu/vpmu_intel.c b/xen/arch/x86/cpu/vpmu_intel.c
index d58eca3..207e2e7 100644
--- a/xen/arch/x86/cpu/vpmu_intel.c
+++ b/xen/arch/x86/cpu/vpmu_intel.c
@@ -225,12 +225,6 @@  static int is_core2_vpmu_msr(u32 msr_index, int
*type, int *index)
     }
 }
 
-static inline int msraddr_to_bitpos(int x)
-{
-    ASSERT(x == (x & 0x1fff));
-    return x;
-}
-
 static void core2_vpmu_set_msr_bitmap(struct vcpu *v)
 {