Re: [Xen-devel] [PATCH v21 11/14] x86/VPMU: Handle PMU interrupts for PV(H) guests

2015-05-19 Thread Jan Beulich
On 18.05.15 at 18:19, boris.ostrov...@oracle.com wrote: On 05/18/2015 11:39 AM, Jan Beulich wrote: On 08.05.15 at 23:06, boris.ostrov...@oracle.com wrote: --- a/xen/arch/x86/hvm/svm/vpmu.c +++ b/xen/arch/x86/hvm/svm/vpmu.c @@ -45,6 +45,7 @@ static unsigned int __read_mostly num_counters;

Re: [Xen-devel] [PATCH v21 11/14] x86/VPMU: Handle PMU interrupts for PV(H) guests

2015-05-18 Thread Boris Ostrovsky
On 05/18/2015 05:43 AM, Dietmar Hahn wrote: Am Freitag 08 Mai 2015, 17:06:11 schrieb Boris Ostrovsky: +if ( !is_hvm_vcpu(sampling) ) +{ +/* PV(H) guest */ +const struct cpu_user_regs *cur_regs; +uint64_t *flags = vpmu-xenpmu_data-pmu.pmu_flags; +domid_t

Re: [Xen-devel] [PATCH v21 11/14] x86/VPMU: Handle PMU interrupts for PV(H) guests

2015-05-18 Thread Dietmar Hahn
Am Freitag 08 Mai 2015, 17:06:11 schrieb Boris Ostrovsky: Add support for handling PMU interrupts for PV(H) guests. I have only some minor nits below. Reviewed-by: Dietmar Hahn dietmar.h...@ts.fujitsu.com VPMU for the interrupted VCPU is unloaded until the guest issues XENPMU_flush

Re: [Xen-devel] [PATCH v21 11/14] x86/VPMU: Handle PMU interrupts for PV(H) guests

2015-05-18 Thread Boris Ostrovsky
On 05/18/2015 11:39 AM, Jan Beulich wrote: On 08.05.15 at 23:06, boris.ostrov...@oracle.com wrote: --- a/xen/arch/x86/hvm/svm/vpmu.c +++ b/xen/arch/x86/hvm/svm/vpmu.c @@ -45,6 +45,7 @@ static unsigned int __read_mostly num_counters; static const u32 __read_mostly *counters; static const u32

Re: [Xen-devel] [PATCH v21 11/14] x86/VPMU: Handle PMU interrupts for PV(H) guests

2015-05-18 Thread Jan Beulich
On 08.05.15 at 23:06, boris.ostrov...@oracle.com wrote: --- a/xen/arch/x86/hvm/svm/vpmu.c +++ b/xen/arch/x86/hvm/svm/vpmu.c @@ -45,6 +45,7 @@ static unsigned int __read_mostly num_counters; static const u32 __read_mostly *counters; static const u32 __read_mostly *ctrls; static bool_t

[Xen-devel] [PATCH v21 11/14] x86/VPMU: Handle PMU interrupts for PV(H) guests

2015-05-08 Thread Boris Ostrovsky
Add support for handling PMU interrupts for PV(H) guests. VPMU for the interrupted VCPU is unloaded until the guest issues XENPMU_flush hypercall. This allows the guest to access PMU MSR values that are stored in VPMU context which is shared between hypervisor and domain, thus avoiding traps to