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

Re: [Xen-devel] [PATCH v5 RESEND 08/17] x86/VPMU: Make vpmu not HVM-specific



> From: Boris Ostrovsky [mailto:boris.ostrovsky@xxxxxxxxxx]
> Sent: Wednesday, April 23, 2014 8:50 PM
> 
> vpmu structure will be used for both HVM and PV guests. Move it from
> hvm_vcpu to arch_vcpu.
> 
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> ---
>  xen/include/asm-x86/domain.h   | 2 ++
>  xen/include/asm-x86/hvm/vcpu.h | 3 ---
>  xen/include/asm-x86/hvm/vpmu.h | 5 ++---
>  3 files changed, 4 insertions(+), 6 deletions(-)

Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx>

> 
> diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
> index ea72db2..f38298c 100644
> --- a/xen/include/asm-x86/domain.h
> +++ b/xen/include/asm-x86/domain.h
> @@ -400,6 +400,8 @@ struct arch_vcpu
>      void (*ctxt_switch_from) (struct vcpu *);
>      void (*ctxt_switch_to) (struct vcpu *);
> 
> +    struct vpmu_struct vpmu;
> +
>      /* Virtual Machine Extensions */
>      union {
>          struct pv_vcpu pv_vcpu;
> diff --git a/xen/include/asm-x86/hvm/vcpu.h
> b/xen/include/asm-x86/hvm/vcpu.h
> index 122ab0d..9beeaa9 100644
> --- a/xen/include/asm-x86/hvm/vcpu.h
> +++ b/xen/include/asm-x86/hvm/vcpu.h
> @@ -152,9 +152,6 @@ struct hvm_vcpu {
>      u32                 msr_tsc_aux;
>      u64                 msr_tsc_adjust;
> 
> -    /* VPMU */
> -    struct vpmu_struct  vpmu;
> -
>      union {
>          struct arch_vmx_struct vmx;
>          struct arch_svm_struct svm;
> diff --git a/xen/include/asm-x86/hvm/vpmu.h
> b/xen/include/asm-x86/hvm/vpmu.h
> index 87a72ce..edc67f6 100644
> --- a/xen/include/asm-x86/hvm/vpmu.h
> +++ b/xen/include/asm-x86/hvm/vpmu.h
> @@ -31,9 +31,8 @@
>  #define VPMU_BOOT_ENABLED 0x1    /* vpmu generally enabled. */
>  #define VPMU_BOOT_BTS     0x2    /* Intel BTS feature wanted. */
> 
> -#define vcpu_vpmu(vcpu)   (&((vcpu)->arch.hvm_vcpu.vpmu))
> -#define vpmu_vcpu(vpmu)   (container_of((vpmu), struct vcpu, \
> -                                          arch.hvm_vcpu.vpmu))
> +#define vcpu_vpmu(vcpu)   (&(vcpu)->arch.vpmu)
> +#define vpmu_vcpu(vpmu)   container_of(vpmu, struct vcpu, arch.vpmu)
> 
>  #define MSR_TYPE_COUNTER            0
>  #define MSR_TYPE_CTRL               1
> --
> 1.8.3.1


_______________________________________________
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®.