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

Re: [Xen-devel] [PATCH v7 12/19] x86/VPMU: Initialize PMU for PV guests



On 06/06/14 18:40, Boris Ostrovsky wrote:
> Code for initializing/tearing down PMU for PV guests

PVH guests judging by the content?

>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx>
> Reviewed-by: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx>
> Tested-by: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx>
> ---
>  xen/arch/x86/hvm/hvm.c            |  3 +-
>  xen/arch/x86/hvm/svm/svm.c        |  8 +++-
>  xen/arch/x86/hvm/svm/vpmu.c       | 37 +++++++++++-------
>  xen/arch/x86/hvm/vmx/vmx.c        |  9 ++++-
>  xen/arch/x86/hvm/vmx/vpmu_core2.c | 67 ++++++++++++++++++++++----------
>  xen/arch/x86/hvm/vpmu.c           | 82 
> ++++++++++++++++++++++++++++++++++++++-
>  xen/common/event_channel.c        |  1 +
>  xen/include/asm-x86/hvm/vpmu.h    |  1 +
>  xen/include/public/pmu.h          |  2 +
>  xen/include/public/xen.h          |  1 +
>  10 files changed, 169 insertions(+), 42 deletions(-)
>
> diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
> index d2190be..fab54ff 100644
> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -4031,7 +4031,8 @@ static hvm_hypercall_t *const 
> pvh_hypercall64_table[NR_hypercalls] = {
>      [ __HYPERVISOR_physdev_op ]      = (hvm_hypercall_t *)hvm_physdev_op,
>      HYPERCALL(hvm_op),
>      HYPERCALL(sysctl),
> -    HYPERCALL(domctl)
> +    HYPERCALL(domctl),
> +    HYPERCALL(xenpmu_op)
>  };
>  
>  int hvm_do_hypercall(struct cpu_user_regs *regs)
> diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
> index 870e4ee..7358626 100644
> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -1150,7 +1150,9 @@ static int svm_vcpu_initialise(struct vcpu *v)
>          return rc;
>      }
>  
> -    vpmu_initialise(v);
> +    /* PVH's VPMU is initialized via hypercall */
> +    if ( is_hvm_domain(v->domain) )
> +        vpmu_initialise(v);
>  

With the wish to merge HVM and PVH, is this wise?  What does
hypercall-based setup gain us over MSR based setup, given that we have
to provide the MSR access to HVM guests anyway?

~Andrew

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