Re: [Xen-devel] [PATCH v10 1/9] xen/x86: set the vPMU interface based on the presence of a lapic
El 11/12/15 a les 8.51, Tian, Kevin ha escrit: >> From: Roger Pau Monne >> Sent: Tuesday, December 08, 2015 12:48 AM >> >> Instead of choosing the interface to expose to guests based on the guest >> type, do it based on whether the guest has an emulated local apic or not. >> >> Signed-off-by: Roger Pau Monné >> Signed-off-by: Boris Ostrovsky >> Acked-by: Jan Beulich >> Cc: Jan Beulich >> Cc: Andrew Cooper >> --- > > [...] > >> @@ -637,7 +638,7 @@ long do_xenpmu_op(unsigned int op, >> XEN_GUEST_HANDLE_PARAM(xen_pmu_params_t) arg) >> struct xen_pmu_data *xenpmu_data; >> struct vpmu_struct *vpmu; >> >> -if ( !opt_vpmu_enabled ) >> +if ( !opt_vpmu_enabled || has_vlapic(current->domain) ) >> return -EOPNOTSUPP; > > !has_vlapic(current->domain)? No, the vpmu hypercall interface is only available to guests that don't have a local apic. > [...] > >> diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c >> index 2581e97..06c12e1 100644 >> --- a/xen/arch/x86/hvm/vmx/vmx.c >> +++ b/xen/arch/x86/hvm/vmx/vmx.c >> @@ -148,7 +148,7 @@ static int vmx_vcpu_initialise(struct vcpu *v) >> } >> >> /* PVH's VPMU is initialized via hypercall */ >> -if ( is_hvm_vcpu(v) ) >> +if ( is_hvm_vcpu(v) && has_vlapic(v->domain) ) >> vpmu_initialise(v); > > Is is_hvm_vcpu still required here? No, I will remove it. Thanks, Roger. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v10 1/9] xen/x86: set the vPMU interface based on the presence of a lapic
>>> On 11.12.15 at 08:51, wrote: >> From: Roger Pau Monne >> Sent: Tuesday, December 08, 2015 12:48 AM >> >> Instead of choosing the interface to expose to guests based on the guest >> type, do it based on whether the guest has an emulated local apic or not. >> >> Signed-off-by: Roger Pau Monné >> Signed-off-by: Boris Ostrovsky >> Acked-by: Jan Beulich >> Cc: Jan Beulich >> Cc: Andrew Cooper >> --- > > [...] > >> @@ -637,7 +638,7 @@ long do_xenpmu_op(unsigned int op, >> XEN_GUEST_HANDLE_PARAM(xen_pmu_params_t) arg) >> struct xen_pmu_data *xenpmu_data; >> struct vpmu_struct *vpmu; >> >> -if ( !opt_vpmu_enabled ) >> +if ( !opt_vpmu_enabled || has_vlapic(current->domain) ) >> return -EOPNOTSUPP; > > !has_vlapic(current->domain)? Definitely not - a guest with vLAPIC shouldn't use the hypercall. Jan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v10 1/9] xen/x86: set the vPMU interface based on the presence of a lapic
> From: Roger Pau Monne > Sent: Tuesday, December 08, 2015 12:48 AM > > Instead of choosing the interface to expose to guests based on the guest > type, do it based on whether the guest has an emulated local apic or not. > > Signed-off-by: Roger Pau Monné > Signed-off-by: Boris Ostrovsky > Acked-by: Jan Beulich > Cc: Jan Beulich > Cc: Andrew Cooper > --- [...] > @@ -637,7 +638,7 @@ long do_xenpmu_op(unsigned int op, > XEN_GUEST_HANDLE_PARAM(xen_pmu_params_t) arg) > struct xen_pmu_data *xenpmu_data; > struct vpmu_struct *vpmu; > > -if ( !opt_vpmu_enabled ) > +if ( !opt_vpmu_enabled || has_vlapic(current->domain) ) > return -EOPNOTSUPP; !has_vlapic(current->domain)? [...] > diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c > index 2581e97..06c12e1 100644 > --- a/xen/arch/x86/hvm/vmx/vmx.c > +++ b/xen/arch/x86/hvm/vmx/vmx.c > @@ -148,7 +148,7 @@ static int vmx_vcpu_initialise(struct vcpu *v) > } > > /* PVH's VPMU is initialized via hypercall */ > -if ( is_hvm_vcpu(v) ) > +if ( is_hvm_vcpu(v) && has_vlapic(v->domain) ) > vpmu_initialise(v); Is is_hvm_vcpu still required here? Thanks Kevin ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v10 1/9] xen/x86: set the vPMU interface based on the presence of a lapic
> From: Roger Pau Monné [mailto:roger@citrix.com] > Sent: Wednesday, December 09, 2015 6:18 PM > > Ccing the vPMU maintainers. Next time please include the whole patch when CCing me, which is easier to do review. :-) > > El 07/12/15 a les 17.48, Roger Pau Monne ha escrit: > > Instead of choosing the interface to expose to guests based on the guest > > type, do it based on whether the guest has an emulated local apic or not. > > > > Signed-off-by: Roger Pau Monné > > Signed-off-by: Boris Ostrovsky > > Acked-by: Jan Beulich > > Cc: Jan Beulich > > Cc: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v10 1/9] xen/x86: set the vPMU interface based on the presence of a lapic
Ccing the vPMU maintainers. El 07/12/15 a les 17.48, Roger Pau Monne ha escrit: > Instead of choosing the interface to expose to guests based on the guest > type, do it based on whether the guest has an emulated local apic or not. > > Signed-off-by: Roger Pau Monné > Signed-off-by: Boris Ostrovsky > Acked-by: Jan Beulich > Cc: Jan Beulich > Cc: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v10 1/9] xen/x86: set the vPMU interface based on the presence of a lapic
>>> On 07.12.15 at 17:48, wrote: > --- > xen/arch/x86/cpu/vpmu.c | 11 ++- > xen/arch/x86/cpu/vpmu_amd.c | 6 +++--- > xen/arch/x86/cpu/vpmu_intel.c | 6 +++--- > xen/arch/x86/hvm/svm/svm.c| 2 +- > xen/arch/x86/hvm/vmx/vmx.c| 2 +- > 5 files changed, 14 insertions(+), 13 deletions(-) You should be Cc-ing the VMX maintainers, or this is likely to never get the necessary ack (even more so with the recent restoration of maintainership for xen/arch/x86/cpu/vpmu_intel.c). Jan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel