[Xen-devel] [PATCH 6/6] x86: Pass through intel processor trace MSRs

2017-10-22 Thread Luwei Kang
This patch pass through Intel processor trace MSRs to guest. Signed-off-by: Luwei Kang --- xen/arch/x86/cpu/intel_pt.c | 8 1 file changed, 8 insertions(+) diff --git a/xen/arch/x86/cpu/intel_pt.c b/xen/arch/x86/cpu/intel_pt.c index 411b922..8e83b87 100644 --- a/xen/arch/x86/cpu

[Xen-devel] [PATCH 2/6] x86: configure vmcs for Intel processor trace virtualization

2017-10-22 Thread Luwei Kang
ned-off-by: Luwei Kang --- xen/arch/x86/hvm/vmx/vmcs.c| 36 +++- xen/include/asm-x86/hvm/vmx/vmcs.h | 7 +++ 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index f62fe7e..8cd57b5 10

[Xen-devel] [PATCH 3/6] x86: add intel proecessor trace support for cpuid

2017-10-22 Thread Luwei Kang
This patch add Intel processor trace support for cpuid handling. Signed-off-by: Luwei Kang --- tools/libxc/xc_cpuid_x86.c | 12 ++-- xen/arch/x86/cpuid.c| 22 ++ xen/arch/x86/domctl.c | 4 xen

[Xen-devel] [PATCH 4/6] x86: add intel processor trace context

2017-10-22 Thread Luwei Kang
This patch add Intel processor trace context date structure for guest. Signed-off-by: Luwei Kang --- xen/include/asm-x86/hvm/vmx/vmcs.h | 3 +++ xen/include/asm-x86/intel_pt.h | 17 + xen/include/asm-x86/msr-index.h| 16 3 files changed, 36 insertions

[Xen-devel] [PATCH 5/6] x86: implement intel processor trace context switch

2017-10-22 Thread Luwei Kang
This patch implement Intel proecessor trace context switch. Signed-off-by: Luwei Kang --- xen/arch/x86/cpu/intel_pt.c| 79 ++ xen/arch/x86/hvm/vmx/vmx.c | 4 ++ xen/include/asm-x86/hvm/vmx/vmcs.h | 2 + xen/include/asm-x86/intel_pt.h

[Xen-devel] [PATCH 1/6] x86: add a flag to enable Intel processor trace

2017-10-22 Thread Luwei Kang
This patch add a flag to enable Intel PT (Intel processor trace). Default value is 1 (enabled). Signed-off-by: Luwei Kang --- docs/misc/xen-command-line.markdown | 7 +++ xen/arch/x86/cpu/Makefile | 1 + xen/arch/x86/cpu/intel_pt.c | 27 +++ xen

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

2017-10-22 Thread Luwei Kang
tions, and other output events. Luwei Kang (6): x86: add a flag to enable Intel processor trace x86: configure vmcs for Intel processor trace virtualization x86: add intel proecessor trace support for cpuid x86: add intel processor trace context x86: implement intel processor trace co

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

2017-05-23 Thread Luwei Kang
prevent send a remote call to an offlined pCPU. Signed-off-by: Luwei Kang --- v4: 1.remove cpu_online() check in vpm_load(); 2.remove "vpmu_" prefix; 3.fix a coding style; 4.add some commit message about VPMU_CONTEXT_LOADED in vpmu_arch_destroy(); v3: 1.add cpu_online() check in vpm_

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

2017-05-21 Thread Luwei Kang
pCPU will be switch to other online cpu. A remote call will be send to pCPU N to save the vpmu context before loading the vpmu context on this pCPU. System will hang in function on_select_cpus() because of that pCPU is offlined and can not do any respond. Signed-off-by: Luwei Kang --- v3: 1.add

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

2017-05-17 Thread Luwei Kang
pCPU will be switch to other online cpu. A remote call will be send to pCPU N to save the vpmu context before loading the vpmu context on this pCPU. System will hang in function on_select_cpus() because of that pCPU is offlined and can not do any respond. Signed-off-by: Luwei Kang --- v2: 1.fix

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

2017-05-17 Thread Luwei Kang
before will be switch to other online cpu. Before load the vpmu context to new physical cpu, a IPI will be send to cpu N to save the vpmu context. System will hang in function on_select_cpus because of that physical cpu is offline and can not do any response. Signed-off-by: Luwei Kang --- xen

[Xen-devel] [PATCH V2] tools:misc:xenpm: set max freq to all cpu with default cpuid

2017-04-13 Thread Luwei Kang
e and add ability to set max freq with default cpuid. Signed-off-by: Luwei Kang --- tools/misc/xenpm.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/misc/xenpm.c b/tools/misc/xenpm.c index ded40b9..762311e 100644 --- a/tools/misc/xenpm.c +++ b/tools/misc/xenp

[Xen-devel] [PATCH] tools:misc:xenpm: set max freq to all cpu with default cpuid

2017-04-11 Thread Luwei Kang
d ability to set max freq with default cpuid. Signed-off-by: Luwei Kang --- tools/misc/xenpm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/misc/xenpm.c b/tools/misc/xenpm.c index ded40b9..abe31b5 100644 --- a/tools/misc/xenpm.c +++ b/tools/misc/xenpm.c @@ -9

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

2017-02-13 Thread Luwei Kang
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. Signed-off-by: Luwei Kang --- xen/arch/x86/cpu

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

2016-12-12 Thread Luwei Kang
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. Signed-off-by: Luwei Kang --- v2:modify the description of this patch. --- xen/arch/x86/cpu/vpmu_intel.c | 2 +- 1 file changed, 1

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

2016-12-12 Thread Luwei Kang
If a counter happend overflow just clear corresponding bit of IA32_PERF_GLOBAL_OVF_CTRL, rather than clear all the bit of this msr. Signed-off-by: Luwei Kang --- xen/arch/x86/cpu/vpmu_intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/cpu/vpmu_intel.c b/xen

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

2016-12-08 Thread Luwei Kang
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-008. Signed-off-by: Luwei Kang --- xen/ar

[Xen-devel] [PATCH] tools/libxc: Add xstate cpuid leaf of avx512

2016-11-04 Thread Luwei Kang
Enable get xstate cpuid leaf information regarding avx512 in guest. Signed-off-by: Luwei Kang --- tools/libxc/xc_cpuid_x86.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c index de06b32..d761805 100644 --- a/tools/libxc

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

2016-08-22 Thread Luwei Kang
AVX512 is an extention of AVX2. Its spec can be found at: https://software.intel.com/sites/default/files/managed/b4/3a/319433-024.pdf This patch detects AVX512 features by CPUID. Signed-off-by: Luwei Kang --- [V5]: Modify the comment of dependency between AVX512 and AVX2. [V4]: Update the

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

2016-06-29 Thread Luwei Kang
AVX-512 is an extention of AVX2. Its spec can be found at: https://software.intel.com/sites/default/files/managed/b4/3a/319433-024.pdf This patch detects AVX-512 features by CPUID. Signed-off-by: Luwei Kang --- [V4]: Update the description about features dependency. [V3]: Adjust dependencies

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

2016-06-29 Thread Luwei Kang
AVX-512 is an extention of AVX2. Its spec can be found at: https://software.intel.com/sites/default/files/managed/b4/3a/319433-024.pdf This patch detects AVX-512 features by CPUID. Signed-off-by: Luwei Kang --- [V3] 1.adjust dependencies between features. [V2] 1.one per bit, change from

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

2016-06-28 Thread Luwei Kang
AVX-512 is an extention of AVX2. Its spec can be found at: https://software.intel.com/sites/default/files/managed/b4/3a/319433-024.pdf This patch detects AVX-512 features by CPUID. Signed-off-by: Luwei Kang --- xen/arch/x86/hvm/hvm.c | 14 ++ xen/arch/x86

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

2016-06-28 Thread Luwei Kang
AVX-512 is an extention of AVX2. Its spec can be found at: https://software.intel.com/sites/default/files/managed/b4/3a/319433-024.pdf This patch detects AVX-512 features by CPUID. Signed-off-by: Luwei Kang --- xen/arch/x86/hvm/hvm.c | 14 ++ xen/arch/x86

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

2016-06-27 Thread Luwei Kang
AVX-512 is an extention of AVX2. Its spec can be found at: https://software.intel.com/sites/default/files/managed/b4/3a/319433-024.pdf This patch detects AVX-512 features by CPUID. Signed-off-by: Luwei Kang --- xen/arch/x86/hvm/hvm.c | 8 xen/arch/x86/traps.c

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

2016-05-31 Thread Luwei Kang
: Luwei Kang --- xen/arch/x86/traps.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 1ef8401..5e72e44 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1100,6 +1100,9 @@ void pv_cpuid(struct cpu_user_regs *regs