Re: [Xen-devel] [PATCH 0/6] Intel Processor Trace virtulization enabling

2017-10-26 Thread Kang, Luwei
> >>> Hi All, > >>> > >>> Here is a patch-series which adding Processor Trace enabling in XEN > >>> guest. You can get It's software developer manuals from: > >>> https://software.intel.com/sites/default/files/managed/c5/15/archite > >>> ct ure-instruction-set-extensions-programming-reference.pdf

Re: [Xen-devel] [PATCH 0/6] Intel Processor Trace virtulization enabling

2017-10-25 Thread Kang, Luwei
> > Hi All, > > > > Here is a patch-series which adding Processor Trace enabling in XEN guest. > > You can get It's software developer manuals from: > > https://software.intel.com/sites/default/files/managed/c5/15/architect > > ure-instruction-set-extensions-programming-reference.pdf > > In Chapte

Re: [Xen-devel] [PATCH v4 for-4.9] x86/vpmu: add cpu hot unplug notifier for vpmu

2017-05-25 Thread Kang, Luwei
Hi Julien, Follow your advice, I change the tag to [PATCH v4 for-4.9] because of we hope this patch can be merged in Xen 4.9. Hi Jan, If there have anything need to change in this patch? Thanks, Luwei Kang > -Original Message- > From: Kang, Luwei > Sent: Tuesday, May

Re: [Xen-devel] [PATCH v3] x86/vpmu: add cpu hot unplug notifier for vpmu

2017-05-22 Thread Kang, Luwei
> >>> On 21.05.17 at 15:09, wrote: > > v3: > > 1.add cpu_online() check in vpm_load() and vpmu_arch_destroy(); > > 2.add vpmu_ prefix. rename cpu_callback() to vpmu_cpu_callback(); > > I had specifically objected to the latter. Sorry, will rollback it. > > > @@ -394,8 +395,11 @@ int vpmu_load

Re: [Xen-devel] [PATCH v2] x86/vpmu: add cpu hot unplug notifier for vpmu

2017-05-21 Thread Kang, Luwei
> >>> On 18.05.17 at 16:23, wrote: > >> > --- a/xen/arch/x86/cpu/vpmu.c > >> > +++ b/xen/arch/x86/cpu/vpmu.c > >> > @@ -859,6 +859,7 @@ static int cpu_callback( > >> > { > >> > vpmu_save_force(vcpu); > >> > vpmu_reset(vpmu, VPMU_CONTEXT_LOADED); > >> > +per_cpu(last_

Re: [Xen-devel] [PATCH v2] x86/vpmu: add cpu hot unplug notifier for vpmu

2017-05-18 Thread Kang, Luwei
> > --- a/xen/arch/x86/cpu/vpmu.c > > +++ b/xen/arch/x86/cpu/vpmu.c > > @@ -859,6 +859,7 @@ static int cpu_callback( > > { > > vpmu_save_force(vcpu); > > vpmu_reset(vpmu, VPMU_CONTEXT_LOADED); > > +per_cpu(last_vcpu, cpu) = NULL;// OR: this_cpu(last_vcpu) > >

Re: [Xen-devel] [PATCH v2] x86/vpmu: add cpu hot unplug notifier for vpmu

2017-05-18 Thread Kang, Luwei
> >>> On 17.05.17 at 17:57, wrote: > > @@ -581,9 +582,14 @@ static void vpmu_arch_destroy(struct vcpu *v) > > > > if ( vpmu->arch_vpmu_ops && vpmu->arch_vpmu_ops->arch_vpmu_destroy ) > > { > > -/* Unload VPMU first. This will stop counters */ > > -on_selected_cpus(cpumask

Re: [Xen-devel] [PATCH] x86/vpmu: add cpu hot unplug notifier for vpmu

2017-05-17 Thread Kang, Luwei
> >>> On 16.05.17 at 19:29, wrote: > > Currently, hot unplug a cpu with vpmu enabled may cause system hang > > due to send IPI to a die physical cpu. This patch add a cpu hot unplug > > notifer to save vpmu context before cpu offline. > > > > Consider one scene, hotplug physical cpu N with vpmu is

Re: [Xen-devel] [PATCH] x86/vpmu: fix vpmu can't enabled in guest

2017-02-14 Thread Kang, Luwei
> On 14/02/17 02:19, Luwei Kang wrote: > > vpmu_enable() can not use for check if vpmu is enabled in guest during > > booting up. Because linux kernel get the status of if supported pmu is > > earler than xen vpmu initialise. vpmu_enable() will return false even > > if vpmu has been enabled in gues

Re: [Xen-devel] [PATCH] x86/vpmu: fix vpmu can't enabled in guest

2017-02-14 Thread Kang, Luwei
> >>> On 14.02.17 at 03:19, wrote: > > vpmu_enable() can not use for check if vpmu is enabled in guest during > > booting up. Because linux kernel get the status of if supported pmu is > > earler than xen vpmu initialise. vpmu_enable() will return false even > > if vpmu has been enabled in guest.

Re: [Xen-devel] [PATCH v2] X86/VPMU:clear the overflow status of which counter happened overflow

2016-12-12 Thread Kang, Luwei
> > From: Kang, Luwei > > Sent: Tuesday, December 13, 2016 10:50 AM > > > > just set the corresponding bits of which counter happened overflow, > > rather than set all the available bits of IA32_PERF_GLOBAL_OVF_CTRL > > when happened pmu interrupt. > >

Re: [Xen-devel] [PATCH] X86/VPMU:clear the overflow status of which counter happened overflow

2016-12-12 Thread Kang, Luwei
> >>> On 12.12.16 at 11:35, wrote: > > If a counter happend overflow just clear corresponding bit of > > IA32_PERF_GLOBAL_OVF_CTRL, rather than clear all the bit of this msr. > > The code change is fine, but the description appears to be wrong: > Isn't the change to avoid bits getting wrongly set

Re: [Xen-devel] [PATCH] X86/VPMU: mask off uncore overflow bit on xeon phi knights landing

2016-12-12 Thread Kang, Luwei
> >>> On 12.12.16 at 07:51, wrote: > > By the way, I think another place may need to do some modify as well. > > > > @@ -868,7 +868,7 @@ static int core2_vpmu_do_interrupt(struct cpu_user_regs > > *regs) > > if ( is_pmc_quirk ) > > handle_pmc_quirk(msr_content); > >

Re: [Xen-devel] [PATCH] X86/VPMU: mask off uncore overflow bit on xeon phi knights landing

2016-12-11 Thread Kang, Luwei
> On 12/08/2016 10:17 PM, Luwei Kang wrote: > > IA32_PERF_GLOBAL_STATUS.OvfUncore (MSR 38EH, bit[61]) is always 0 and > > writing 1 to IA32_PERF_GLOBAL_OVF_CTRL.ClrOvfUncore (MSR 390H, > > bit[61]) signals #GP. > > Reference "Intel Xeon Phi Procssor x200 Product Family", document > > number 334646-

Re: [Xen-devel] [PATCH v5] x86/cpuid: AVX-512 Feature Detection

2016-08-28 Thread Kang, Luwei
> >>> On 23.08.16 at 03:54, wrote: > > AVX512 is an extention of AVX2. Its spec can be found at: > > https://software.intel.com/sites/default/files/managed/b4/3a/319433-02 > > 4.pdf This patch detects AVX512 features by CPUID. > > > > Signed-off-by: Luwei Kang > > Reviewed-by: Jan Beulich > >

Re: [Xen-devel] [PATCH v4] x86/cpuid: AVX-512 Feature Detection

2016-08-22 Thread Kang, Luwei
> > >> First of all - please don't top post. > > >> > > >>> What about remove the dependency between AVX2 and AVX512F > > ( AVX2: > > >> [AVX512F], ) ? > > >> > > >> Yes, that's what I think we want, but we need Andrew's agreement > > >>

Re: [Xen-devel] [PATCH v4] x86/cpuid: AVX-512 Feature Detection

2016-08-10 Thread Kang, Luwei
> >>> On 10.08.16 at 14:10, wrote: > > On 10/08/16 11:29, Jan Beulich wrote: > >>>>> On 10.08.16 at 11:58, wrote: > >>>>>>> On 03.08.16 at 03:32, wrote: > >>>>>> On 25/07/16 07:09, Kang, Luwei wrote: > &g

Re: [Xen-devel] [PATCH v4] x86/cpuid: AVX-512 Feature Detection

2016-08-10 Thread Kang, Luwei
> >>> On 03.08.16 at 03:32, wrote: > >> On 25/07/16 07:09, Kang, Luwei wrote: > >> >>>> First of all - please don't top post. > >> >>>> > >> >>>>> What about remove the dependency between AVX2 and AVX5

Re: [Xen-devel] [PATCH v4] x86/cpuid: AVX-512 Feature Detection

2016-08-02 Thread Kang, Luwei
> On 25/07/16 07:09, Kang, Luwei wrote: > >>>> First of all - please don't top post. > >>>> > >>>>> What about remove the dependency between AVX2 and AVX512F > >> ( AVX2: > >>>> [AVX512F], ) ? > >>>>

Re: [Xen-devel] [PATCH v4] x86/cpuid: AVX-512 Feature Detection

2016-07-24 Thread Kang, Luwei
> >> First of all - please don't top post. > >> > >>> What about remove the dependency between AVX2 and AVX512F > ( AVX2: > >> [AVX512F], ) ? > >> > >> Yes, that's what I think we want, but we need Andrew's agreement here. > >> > > Hi Andrew, what is your opinion ? > > You are in a better positio

Re: [Xen-devel] [PATCH v4] x86/cpuid: AVX-512 Feature Detection

2016-07-06 Thread Kang, Luwei
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Tuesday, July 5, 2016 3:03 PM > To: Kang, Luwei > Cc: andrew.coop...@citrix.com; chao.p.p...@linux.intel.com; xen- > de...@lists.xen.org > Subject: RE: [PATCH v4] x86/cpuid: AVX-512 Feature

Re: [Xen-devel] [PATCH v4] x86/cpuid: AVX-512 Feature Detection

2016-07-04 Thread Kang, Luwei
What about remove the dependency between AVX2 and AVX512F ( AVX2: [AVX512F], ) ? -Original Message- From: Jan Beulich [mailto:jbeul...@suse.com] Sent: Friday, July 1, 2016 3:56 PM To: andrew.coop...@citrix.com; Kang, Luwei Cc: chao.p.p...@linux.intel.com; xen-devel@lists.xen.org

Re: [Xen-devel] [V3] x86/cpuid: AVX-512 Feature Detection

2016-06-29 Thread Kang, Luwei
s is ok. AVX2: [AVX512F], AVX512F: [AVX512DQ, AVX512IFMA, AVX512PF, AVX512ER, AVX512CD, AVX512BW, AVX512VL, AVX512VBMI], Thanks, Luwei Kang -Original Message- From: Kang, Luwei Sent: Wednesday, June 29, 2016 7:28 PM To: xen-devel@lists.xen.org Cc: jbeul...@suse.com; and

Re: [Xen-devel] [PATCH] x86/cpuid: AVX-512 Feature Detection

2016-06-28 Thread Kang, Luwei
OK, no problem. -Original Message- From: Andrew Cooper [mailto:andrew.coop...@citrix.com] Sent: Tuesday, June 28, 2016 4:47 PM To: Kang, Luwei ; xen-devel@lists.xen.org Cc: jbeul...@suse.com; Wang, Yong Y ; Peng, Chao P Subject: Re: [PATCH] x86/cpuid: AVX-512 Feature Detection On 28

Re: [Xen-devel] [PATCH] x86/cpuid: AVX-512 Feature Detection

2016-06-28 Thread Kang, Luwei
Thanks for your advice, I will make a change right now. -Original Message- From: Jan Beulich [mailto:jbeul...@suse.com] Sent: Tuesday, June 28, 2016 3:49 PM To: Kang, Luwei Cc: andrew.coop...@citrix.com; Peng, Chao P ; Wang, Yong Y ; xen-devel@lists.xen.org Subject: Re: [PATCH] x86

Re: [Xen-devel] [PATCH for-4.7] x86/cpuid: Calculate a guests xfeature_mask from its featureset

2016-06-03 Thread Kang, Luwei
OK. -Original Message- From: Andrew Cooper [mailto:am...@hermes.cam.ac.uk] On Behalf Of Andrew Cooper Sent: Friday, June 3, 2016 3:35 PM To: Kang, Luwei ; Xen-devel Cc: Jan Beulich ; Wei Liu ; Han, Huaitong ; Wang, Yong Y Subject: Re: [PATCH for-4.7] x86/cpuid: Calculate a guests

Re: [Xen-devel] [PATCH for-4.7] x86/cpuid: Calculate a guests xfeature_mask from its featureset

2016-06-02 Thread Kang, Luwei
I have finsh test this patch and it work well, thank Andrew and all. -Original Message- From: Andrew Cooper [mailto:andrew.coop...@citrix.com] Sent: Friday, June 3, 2016 12:48 AM To: Xen-devel Cc: Andrew Cooper ; Jan Beulich ; Wei Liu ; Kang, Luwei ; Han, Huaitong Subject: [PATCH

Re: [Xen-devel] [PATCH] x86/cpuid: fix dom0 crash on skylake machine

2016-06-01 Thread Kang, Luwei
reset(hvm_featureset); +sanitise_featureset(hvm_featureset, & hvm_xfeature_mask); -Original Message- From: Andrew Cooper [mailto:andrew.coop...@citrix.com] Sent: Wednesday, June 1, 2016 5:04 PM To: Kang, Luwei ; xen-devel@lists.xen.org Cc: jbeul...@suse.com; Han, Huaitong ; Wang, Yong Y Subject: