[PATCH 1/1] KVM: arm/arm64: arch_timer: Fix TimerValue TVAL calculation in KVM

2019-03-29 Thread Wei Huang
according to the specification. Signed-off-by: Wei Huang --- virt/kvm/arm/arch_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c index 3417f2dbc366..d43308dc3617 100644 --- a/virt/kvm/arm/arch_timer.c +++ b/virt/kvm/arm/ar

Re: host stalls when qemu-system-aarch64 with kvm and pflash

2017-04-07 Thread Wei Huang
On 03/30/2017 05:51 AM, Marc Zyngier wrote: > On 29/03/17 19:56, Christoffer Dall wrote: >> On Tue, Mar 28, 2017 at 01:24:15PM -0700, Radha Mohan wrote: >>> On Tue, Mar 28, 2017 at 1:16 PM, Christoffer Dall wrote: Hi Radha, On Tue, Mar 28, 2017 at 12:58:24PM

Re: [PATCH kvm-unit-tests v2 2/2] arm/pmu: don't run tcg tests

2016-12-09 Thread Wei Huang
On 12/08/2016 11:05 AM, Andrew Jones wrote: > The TCG PMU is barely implemented for ARM and not at all implemented > for AArch64. Let's not bother running the TCG-only tests yet. We'll > likely move them to a new TCG-only unittests.cfg at some point before > re-enabling them too. > >

Re: [PATCH kvm-unit-tests v2 1/2] arm/pmu: fix probe on AArch64

2016-12-09 Thread Wei Huang
Reviewed-by: Wei Huang <w...@redhat.com>. I also tested on real machine and it was working. Thanks, -Wei On 12/08/2016 11:05 AM, Andrew Jones wrote: > The spec for ID_DFR0_EL1 says "In an AArch64-only implementation, > this register is UNKNOWN." Indeed ThunderX

[kvm-unit-tests PATCH v14 4/5] arm: pmu: Check cycle count increases

2016-12-06 Thread Wei Huang
From: Christopher Covington <c...@codeaurora.org> Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, even for the smallest delta of two subsequent reads. Signed-off-by: Christopher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> -

[kvm-unit-tests PATCH v14 2/5] arm: Add support for read_sysreg() and write_sysreg()

2016-12-06 Thread Wei Huang
. get_mpidr() is re-written with new macros. Suggested-by: Andrew Jones <drjo...@redhat.com> Signed-off-by: Wei Huang <w...@redhat.com> --- lib/arm/asm/processor.h | 6 +++--- lib/arm/asm/sysreg.h | 19 +++ lib/arm64/asm/processor.h | 11 --- lib/arm64/

[kvm-unit-tests PATCH v14 1/5] arm: rename cp15.h to sysreg.h

2016-12-06 Thread Wei Huang
To prepare for future support of ARMv8 system register, rename cp15.h file to sysreg.h, with _ASMARM_CP15_H_ renamed to _ASMARM_SYSREG_H_ in header file. Signed-off-by: Wei Huang <w...@redhat.com> --- arm/cstart.S | 2 +- lib/arm/asm/{cp15.h => sysreg.h} | 6 +++---

[kvm-unit-tests PATCH v14 5/5] arm: pmu: Add CPI checking

2016-12-06 Thread Wei Huang
topher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> --- arm/pmu.c | 133 +- arm/unittests.cfg | 14 ++ 2 files changed, 146 insertions(+), 1 deletion(-) diff --git a/arm/pmu.c b/arm/pmu.c index d9ff1

[kvm-unit-tests PATCH v14 3/5] arm: Add PMU test

2016-12-06 Thread Wei Huang
From: Christopher Covington <c...@codeaurora.org> Beginning with a simple sanity check of the control register, add a unit test for the ARM Performance Monitors Unit (PMU). Signed-off-by: Christopher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redha

[kvm-unit-tests PATCH v14 0/5] ARM PMU tests

2016-12-06 Thread Wei Huang
Christopher Covington (3): arm: Add PMU test arm: pmu: Check cycle count increases arm: pmu: Add CPI checking Wei Huang (2): arm: rename cp15.h to sysreg.h arm: Add support for read_sysreg() and write_sysreg() arm/Makefile.common | 3 +- arm/cstart.S

Re: [kvm-unit-tests PATCH v13 4/4] arm: pmu: Add CPI checking

2016-12-01 Thread Wei Huang
On 12/01/2016 02:27 PM, Andre Przywara wrote: > Hi, > > On 01/12/16 05:16, Wei Huang wrote: >> From: Christopher Covington <c...@codeaurora.org> >> >> Calculate the numbers of cycles per instruction (CPI) implied by ARM >> PMU cycle counter values. The c

Re: [Qemu-devel] [kvm-unit-tests PATCH v13 3/4] arm: pmu: Check cycle count increases

2016-12-01 Thread Wei Huang
On 12/01/2016 03:18 AM, Andrew Jones wrote: > On Wed, Nov 30, 2016 at 11:16:41PM -0600, Wei Huang wrote: >> From: Christopher Covington <c...@codeaurora.org> >> >> Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, >> even for the small

Re: [kvm-unit-tests PATCH v13 3/4] arm: pmu: Check cycle count increases

2016-12-01 Thread Wei Huang
On 12/01/2016 05:27 AM, Andre Przywara wrote: > Hi, > > On 01/12/16 05:16, Wei Huang wrote: >> From: Christopher Covington <c...@codeaurora.org> >> >> Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, >> even for the smallest delta of

Re: [Qemu-devel] [kvm-unit-tests PATCH v13 1/4] arm: Define macros for accessing system registers

2016-12-01 Thread Wei Huang
On 12/01/2016 02:59 AM, Andrew Jones wrote: > > Should this be From: Andre? > > On Wed, Nov 30, 2016 at 11:16:39PM -0600, Wei Huang wrote: >> This patch defines four macros to assist creating system register >> accessors under both ARMv7 and AArch64: >>

Re: [Qemu-devel] [kvm-unit-tests PATCH v11 1/3] arm: Add PMU test

2016-11-30 Thread Wei Huang
On 11/25/2016 08:26 AM, Andrew Jones wrote: > On Fri, Nov 25, 2016 at 12:32:24PM +, Andre Przywara wrote: >> Hi Drew, >> >> >> >> On 23/11/16 17:15, Andrew Jones wrote: > + > +#if defined(__arm__) I guess you should use the arch specific header files we have in place

[kvm-unit-tests PATCH v13 3/4] arm: pmu: Check cycle count increases

2016-11-30 Thread Wei Huang
From: Christopher Covington <c...@codeaurora.org> Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, even for the smallest delta of two subsequent reads. Signed-off-by: Christopher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> R

[kvm-unit-tests PATCH v13 4/4] arm: pmu: Add CPI checking

2016-11-30 Thread Wei Huang
topher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> Reviewed-by: Andrew Jones <drjo...@redhat.com> --- arm/pmu.c | 123 +- arm/unittests.cfg | 14 +++ 2 files changed, 136 insertions(+), 1 delet

[kvm-unit-tests PATCH v13 0/4] ARM PMU tests

2016-11-30 Thread Wei Huang
correctly under KVM mode. https://lists.cs.columbia.edu/pipermail/kvmarm/2016-November/022134.html. Thanks, -Wei Christopher Covington (3): arm: Add PMU test arm: pmu: Check cycle count increases arm: pmu: Add CPI checking Wei Huang (1): arm: Define macros for accessing system registers

[kvm-unit-tests PATCH v13 2/4] arm: Add PMU test

2016-11-30 Thread Wei Huang
; Signed-off-by: Wei Huang <w...@redhat.com> Reviewed-by: Andrew Jones <drjo...@redhat.com> --- arm/Makefile.common | 3 ++- arm/pmu.c | 62 + arm/unittests.cfg | 5 + 3 files changed, 69 insertions(+), 1 deletion(-)

[kvm-unit-tests PATCH v13 1/4] arm: Define macros for accessing system registers

2016-11-30 Thread Wei Huang
with consistent naming, get_##name() and set_##name(), which can be used by C code directly. Signed-off-by: Andre Przywara <andre.przyw...@arm.com> Signed-off-by: Wei Huang <w...@redhat.com> --- lib/arm/asm/processor.h | 37 - lib/arm64/asm/proc

Re: Unable to use perf in VM

2016-11-30 Thread Wei Huang
On 11/30/2016 07:37 AM, Marc Zyngier wrote: > On 30/11/16 11:48, Marc Zyngier wrote: >> + Shannon >> >> On 29/11/16 22:04, Itaru Kitayama wrote: >>> Hi, >>> >>> In a VM (virsh controlled, KVM acceleration enabled) on a recent >>> kvmarm kernel host, I find I am unable to use perf to obtain >>>

Re: [Qemu-devel] [kvm-unit-tests PATCH v11 1/3] arm: Add PMU test

2016-11-23 Thread Wei Huang
On 11/23/2016 11:15 AM, Andrew Jones wrote: > On Wed, Nov 23, 2016 at 01:16:08PM +, Andre Przywara wrote: >> Hi, >> >> On 22/11/16 18:29, Wei Huang wrote: >>> From: Christopher Covington <c...@codeaurora.org> >>> >>> Beginning w

[kvm-unit-tests PATCH v12 3/3] arm: pmu: Add CPI checking

2016-11-23 Thread Wei Huang
topher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> Reviewed-by: Andrew Jones <drjo...@redhat.com> --- arm/pmu.c | 123 +- arm/unittests.cfg | 14 +++ 2 files changed, 136 insertions(+), 1 delet

[kvm-unit-tests PATCH v12 2/3] arm: pmu: Check cycle count increases

2016-11-23 Thread Wei Huang
From: Christopher Covington <c...@codeaurora.org> Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, even for the smallest delta of two subsequent reads. Signed-off-by: Christopher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> R

[kvm-unit-tests PATCH v12 1/3] arm: Add PMU test

2016-11-23 Thread Wei Huang
From: Christopher Covington <c...@codeaurora.org> Beginning with a simple sanity check of the control register, add a unit test for the ARM Performance Monitors Unit (PMU). Signed-off-by: Christopher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redha

[kvm-unit-tests PATCH v12 0/3] ARM PMU tests

2016-11-23 Thread Wei Huang
Changes from v11: * Use report_info() to report PMU HW related info (implementer, id code, ...) * Print PMU PMCR info in the same line Note: 1) Current KVM code has bugs in handling PMCCFILTR write. A fix (see below) is required for this unit testing code to work correctly under KVM mode.

Re: [kvm-unit-tests PATCH v11 1/3] arm: Add PMU test

2016-11-23 Thread Wei Huang
On 11/23/2016 07:16 AM, Andre Przywara wrote: > Hi, > > On 22/11/16 18:29, Wei Huang wrote: >> From: Christopher Covington <c...@codeaurora.org> >> >> Beginning with a simple sanity check of the control register, add >> a unit test for the ARM Pe

[kvm-unit-tests PATCH v11 1/3] arm: Add PMU test

2016-11-22 Thread Wei Huang
From: Christopher Covington <c...@codeaurora.org> Beginning with a simple sanity check of the control register, add a unit test for the ARM Performance Monitors Unit (PMU). Signed-off-by: Christopher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> R

[kvm-unit-tests PATCH v11 3/3] arm: pmu: Add CPI checking

2016-11-22 Thread Wei Huang
topher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> --- arm/pmu.c | 123 +- arm/unittests.cfg | 14 +++ 2 files changed, 136 insertions(+), 1 deletion(-) diff --git a/arm/pmu.c b/arm/pmu.c index 176b0

[kvm-unit-tests PATCH v11 0/3] ARM PMU tests

2016-11-22 Thread Wei Huang
Changes from v10: * Change the name of loop test function to precise_instrs_loop() * Minor comment fixes to measure_instrs() and to explain isb() in loop funcs Note: 1) Current KVM code has bugs in handling PMCCFILTR write. A fix (see below) is required for this unit testing code to work

Re: [kvm-unit-tests PATCH v10 3/3] arm: pmu: Add CPI checking

2016-11-21 Thread Wei Huang
On 11/21/2016 03:40 PM, Christopher Covington wrote: > Hi Wei, > > On 11/21/2016 03:24 PM, Wei Huang wrote: >> From: Christopher Covington <c...@codeaurora.org> > > I really appreciate your work on these patches. If for any or all of these > you have more lines ad

[kvm-unit-tests PATCH v10 1/3] arm: Add PMU test

2016-11-21 Thread Wei Huang
From: Christopher Covington <c...@codeaurora.org> Beginning with a simple sanity check of the control register, add a unit test for the ARM Performance Monitors Unit (PMU). Signed-off-by: Christopher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> R

[kvm-unit-tests PATCH v10 2/3] arm: pmu: Check cycle count increases

2016-11-21 Thread Wei Huang
From: Christopher Covington <c...@codeaurora.org> Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, even for the smallest delta of two subsequent reads. Signed-off-by: Christopher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> --

[kvm-unit-tests PATCH v9 3/3] arm: pmu: Add CPI checking

2016-11-18 Thread Wei Huang
topher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> --- arm/pmu.c | 111 +- arm/unittests.cfg | 14 +++ 2 files changed, 124 insertions(+), 1 deletion(-) diff --git a/arm/pmu.c b/arm/pmu.c index fa87d

[kvm-unit-tests PATCH v9 2/3] arm: pmu: Check cycle count increases

2016-11-18 Thread Wei Huang
From: Christopher Covington <c...@codeaurora.org> Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, even for the smallest delta of two subsequent reads. Signed-off-by: Christopher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> --

[kvm-unit-tests PATCH v9 1/3] arm: Add PMU test

2016-11-18 Thread Wei Huang
From: Christopher Covington <c...@codeaurora.org> Beginning with a simple sanity check of the control register, add a unit test for the ARM Performance Monitors Unit (PMU). Signed-off-by: Christopher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> R

[kvm-unit-tests PATCH v9 0/3] ARM PMU tests

2016-11-18 Thread Wei Huang
. Thanks, -Wei Wei Huang (3): arm: Add PMU test arm: pmu: Check cycle count increases arm: pmu: Add CPI checking arm/Makefile.common | 3 +- arm/pmu.c | 339 arm/unittests.cfg | 19 +++ 3 files changed, 360 insertions(+), 1

Re: [kvm-unit-tests PATCH] arm/arm64: introduce is_aarch32

2016-11-16 Thread Wei Huang
On 11/16/2016 04:02 PM, Christopher Covington wrote: > On 11/16/2016 12:46 PM, Marc Zyngier wrote: >> On 16/11/16 14:38, Andrew Jones wrote: >>> ARMv7-A isn't exactly the same as ARMv8-A32 (AArch32). This >>> function allows unit tests to make the distinction. >> >> Hi Drew, >> >> Overall,

[PATCH v3 1/1] KVM: ARM64: Fix the issues when guest PMCCFILTR is configured

2016-11-16 Thread Wei Huang
To support this patch and to prevent duplicated definitions, a limited set of ARMv8 perf event types were relocated from perf_event.c to asm/perf_event.h. Signed-off-by: Wei Huang <w...@redhat.com> --- arch/arm64/include/asm/perf_event.h | 10 +- arch/arm64/kernel/perf_e

Re: [Qemu-devel] [kvm-unit-tests PATCH v8 2/3] arm: pmu: Check cycle count increases

2016-11-15 Thread Wei Huang
On 11/14/2016 09:12 AM, Christopher Covington wrote: > Hi Drew, Wei, > > On 11/14/2016 05:05 AM, Andrew Jones wrote: >> On Fri, Nov 11, 2016 at 01:55:49PM -0600, Wei Huang wrote: >>> >>> >>> On 11/11/2016 01:43 AM, Andrew Jones wrote: >>>&g

Re: [Qemu-devel] [kvm-unit-tests PATCH v8 2/3] arm: pmu: Check cycle count increases

2016-11-11 Thread Wei Huang
On 11/11/2016 01:43 AM, Andrew Jones wrote: > On Tue, Nov 08, 2016 at 12:17:14PM -0600, Wei Huang wrote: >> From: Christopher Covington <c...@codeaurora.org> >> >> Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, >> even for the small

Re: [Qemu-devel] [kvm-unit-tests PATCH v8 3/3] arm: pmu: Add CPI checking

2016-11-11 Thread Wei Huang
On 11/11/2016 02:08 AM, Andrew Jones wrote: > On Tue, Nov 08, 2016 at 12:17:15PM -0600, Wei Huang wrote: >> From: Christopher Covington <c...@codeaurora.org> >> >> Calculate the numbers of cycles per instruction (CPI) implied by ARM >> PMU cycle counter v

Re: [PATCH 1/2] arm64: perf: Move ARMv8 PMU perf event definitions to asm/perf_event.h

2016-11-10 Thread Wei Huang
On 11/10/2016 11:17 AM, Will Deacon wrote: > On Thu, Nov 10, 2016 at 03:32:12PM +, Marc Zyngier wrote: >> On 10/11/16 15:12, Wei Huang wrote: >>> >>> >>> On 11/10/2016 03:10 AM, Marc Zyngier wrote: >>>> Hi Wei, >>>> >>&

Re: [PATCH 1/2] arm64: perf: Move ARMv8 PMU perf event definitions to asm/perf_event.h

2016-11-10 Thread Wei Huang
On 11/10/2016 03:10 AM, Marc Zyngier wrote: > Hi Wei, > > On 09/11/16 19:57, Wei Huang wrote: >> This patch moves ARMv8-related perf event definitions from perf_event.c >> to asm/perf_event.h; so KVM code can use them directly. This also help >> remove a dupli

[PATCH 1/2] arm64: perf: Move ARMv8 PMU perf event definitions to asm/perf_event.h

2016-11-09 Thread Wei Huang
This patch moves ARMv8-related perf event definitions from perf_event.c to asm/perf_event.h; so KVM code can use them directly. This also help remove a duplicated definition of SW_INCR in perf_event.h. Signed-off-by: Wei Huang <w...@redhat.com> --- arch/arm64/include/asm/perf_event.h

[PATCH 2/2] KVM: ARM64: Fix the issues when guest PMCCFILTR is configured

2016-11-09 Thread Wei Huang
Signed-off-by: Wei Huang <w...@redhat.com> --- virt/kvm/arm/pmu.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/virt/kvm/arm/pmu.c b/virt/kvm/arm/pmu.c index 6e9c40e..69ccce3 100644 --- a/virt/kvm/arm/pmu.c +++ b/virt/kvm/arm/pmu.c @@ -305,

[kvm-unit-tests PATCH v8 2/3] arm: pmu: Check cycle count increases

2016-11-08 Thread Wei Huang
From: Christopher Covington <c...@codeaurora.org> Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, even for the smallest delta of two subsequent reads. Signed-off-by: Christopher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> -

[kvm-unit-tests PATCH v8 0/3] ARM PMU tests

2016-11-08 Thread Wei Huang
for this unit testing code to work correctly under KVM mode. https://lists.cs.columbia.edu/pipermail/kvmarm/2016-November/022134.html. 2) Because the code was changed, Drew's original reviewed-by needs to be acknowledged by him again. -Wei Wei Huang (3): arm: Add PMU test arm: pmu: Check cycle count

[kvm-unit-tests PATCH v8 1/3] arm: Add PMU test

2016-11-08 Thread Wei Huang
From: Christopher Covington <c...@codeaurora.org> Beginning with a simple sanity check of the control register, add a unit test for the ARM Performance Monitors Unit (PMU). Signed-off-by: Christopher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redha

[kvm-unit-tests PATCH v8 3/3] arm: pmu: Add CPI checking

2016-11-08 Thread Wei Huang
topher Covington <c...@codeaurora.org> Signed-off-by: Wei Huang <w...@redhat.com> --- arm/pmu.c | 101 +- arm/unittests.cfg | 14 2 files changed, 114 insertions(+), 1 deletion(-) diff --git a/arm/pmu.c b/arm/pmu.c inde

Re: [PATCH v2 1/6] KVM: arm/arm64: arch_timer: Gather KVM specific information in a structure

2016-02-18 Thread Wei Huang
On 02/11/2016 09:33 AM, Julien Grall wrote: > Introduce a structure which are filled up by the arch timer driver and > used by the virtual timer in KVM. > > The first member of this structure will be the timecounter. More members > will be added later. > > This is also dropping

Re: [PATCH v2 0/6] arm64: Add support of KVM with ACPI

2016-02-18 Thread Wei Huang
On 02/11/2016 09:33 AM, Julien Grall wrote: > Hello, > > This small series allows an ARM64 ACPI based platform to use KVM. > > Currently the KVM code has to parse the firmware table to get the necessary > information to setup the virtual timer and virtual GIC. > > However the parsing of those

Re: [PATCH 3/5] irqchip/gic-v2: Parse and export virtual GIC information

2016-02-09 Thread Wei Huang
On 02/09/2016 02:49 PM, Christoffer Dall wrote: > On Mon, Feb 08, 2016 at 04:47:27PM +, Julien Grall wrote: >> For now, the firmware tables are parsed 2 times: once in the GIC >> drivers, the other timer when initializing the vGIC. It means code >> duplication and make more tedious to add

Re: [PATCH V1 0/7] Enable ACPI support for ARM KVM GIC

2016-02-08 Thread Wei Huang
On 2/8/16 10:39, Julien Grall wrote: > Hi, > > On 08/02/16 09:59, Marc Zyngier wrote: >> On 05/02/16 17:07, Wei Huang wrote: >>> Wei Huang (7): >>>KVM: GIC: Move GIC DT probing code to GICv2 and GICv3 files >>>KVM: GIC: Add extra fields to st

Re: [PATCH V1 0/7] Enable ACPI support for ARM KVM GIC

2016-02-08 Thread Wei Huang
On 2/8/16 03:59, Marc Zyngier wrote: > Wei, > > On 05/02/16 17:07, Wei Huang wrote: >> This patch set enables ACPI support for KVM GIC. Note that the patches >> are in fact the V3 of previously submitted patches (search "Enable ACPI >> support for KVM AR

[PATCH V1 4/7] KVM: GICv2: Extract the common code from DT

2016-02-05 Thread Wei Huang
This patch extracts the common code from the DT probe function. With this patch the DT function only fills out the following info in *vgic. - maint_irq (mapped) - GICH resource - GICV resource Note that vgic->vctrl_base io-remapping is now moved to vgic_v2_probe(). Signed-off-by: Wei Hu

[PATCH V1 6/7] KVM: GICv3: Extract the common code from DT

2016-02-05 Thread Wei Huang
In preparation for ACPI probing, this patch extracts the DT-neutral code into vgic_v3_probe(). DT function nows fills out the following info in *vgic: - maint_irq (mapped) - GICv resources Signed-off-by: Wei Huang <w...@redhat.com> --- virt/kvm/arm/vgic-v3.

[PATCH V1 7/7] KVM: GICv3: Add ACPI probing function

2016-02-05 Thread Wei Huang
This patch implements ACPI probing for GICv3. Signed-off-by: Wei Huang <w...@redhat.com> --- virt/kvm/arm/vgic-v3.c | 64 -- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/virt/kvm/arm/vgic-v3.c b/virt/kvm/arm/vgic-v3.c

[PATCH V1 1/7] KVM: GIC: Move GIC DT probing code to GICv2 and GICv3 files

2016-02-05 Thread Wei Huang
This patch moves GIC DT probing code from vgic.c to GICv2 & GICv3 sub-files. The probing will start from GICv2. If the probing fails, KVM will try to probe GICv3 then. Signed-off-by: Wei Huang <w...@redhat.com> --- include/kvm/arm_vgic.h | 6 ++ virt/kvm/arm/vgic

[PATCH V1 2/7] KVM: GIC: Add extra fields to store GICH and GICV resource info

2016-02-05 Thread Wei Huang
This patch adds new fields in the struct vgic_params to store the resource info (base and size) of GICH & GICV interfaces. These new fields will be used by the DT and ACPI probing code later. Signed-off-by: Wei Huang <w...@redhat.com> --- include/kvm/arm_vgic.h | 8 +++- vi

[PATCH V1 5/7] KVM: GICv2: Add ACPI probing function

2016-02-05 Thread Wei Huang
This patch implements ACPI probing for GICv2. Signed-off-by: Wei Huang <w...@redhat.com> --- virt/kvm/arm/vgic-v2.c | 68 ++ 1 file changed, 68 insertions(+) diff --git a/virt/kvm/arm/vgic-v2.c b/virt/kvm/arm/vgic-v2.c index b60e73a..7

[PATCH V1 0/7] Enable ACPI support for ARM KVM GIC

2016-02-05 Thread Wei Huang
s revision, the version number is reset to v1. By following Marc's prior comments, the main design idea is to let DT or ACPI code to fill out the "struct vgic_params" which are extended to include all GIC related info. [1] https://lkml.org/lkml/2016/2/1/658 Thanks, -Wei Wei Huang (7):

Re: [PATCH] KVM: arm64: Count guest exit due to various reasons

2015-10-19 Thread Wei Huang
On 10/18/2015 02:53 PM, Christoffer Dall wrote: > On Sun, Oct 18, 2015 at 01:34:42PM +0530, Amit wrote: >> From: Amit Singh Tomar >> >> This patch adds guest exit statistics to debugfs, This can be helpful >> while measuring KVM performance. >> >> Signed-off-by: Amit

Re: [PATCH v3 07/20] KVM: ARM64: PMU: Add perf event map and introduce perf event creating function

2015-10-16 Thread Wei Huang
On 09/24/2015 05:31 PM, Shannon Zhao wrote: > When we use tools like perf on host, perf passes the event type and the > id of this event type category to kernel, then kernel will map them to > hardware event number and write this number to PMU PMEVTYPER_EL0 > register. When getting the event

Re: [PATCH v3 18/20] KVM: ARM64: Reset PMU state when resetting vcpu

2015-10-16 Thread Wei Huang
On 09/24/2015 05:31 PM, Shannon Zhao wrote: > Signed-off-by: Shannon Zhao Missing commit message here. > --- > arch/arm64/kvm/reset.c | 3 +++ > include/kvm/arm_pmu.h | 2 ++ > virt/kvm/arm/pmu.c | 18 ++ > 3 files changed, 23 insertions(+) >

Re: [PATCH v3 00/20] KVM: ARM64: Add guest PMU support

2015-10-15 Thread Wei Huang
On 09/24/2015 05:31 PM, Shannon Zhao wrote: > This patchset adds guest PMU support for KVM on ARM64. It takes > trap-and-emulate approach. When guest wants to monitor one event, it > will be trapped by KVM and KVM will call perf_event API to create a perf > event and call relevant perf_event

Re: [kvm-unit-tests PATCHv2] arm: Add PMU test

2015-10-05 Thread Wei Huang
On 10/02/2015 10:48 AM, Christopher Covington wrote: > Add test the ARM Performance Monitors Unit (PMU). The informational > fields from the control register are printed, but not checked, and > the number of cycles it takes to run a known-instruction-count loop > is printed, but not checked.

Re: [PATCH v2 00/22] KVM: ARM64: Add guest PMU support

2015-09-16 Thread Wei Huang
On 09/11/2015 03:54 AM, Shannon Zhao wrote: > From: Shannon Zhao > > This patchset adds guest PMU support for KVM on ARM64. It takes > trap-and-emulate approach. When guest wants to monitor one event, it > will be trapped by KVM and KVM will call perf_event API to

[PATCH V2 5/5] kvm: arm64: Implement ACPI probing code for GICv3

2015-06-09 Thread Wei Huang
This patches enables ACPI support for KVM virtual GICv3. KVM parses ACPI table for virt GIC related information and initializes resources. Signed-off-by: Wei Huang w...@redhat.com --- virt/kvm/arm/vgic-v3.c | 40 +++- 1 file changed, 39 insertions(+), 1

[PATCH V2 3/5] kvm: arm64: Detect GIC version for proper ACPI vGIC probing

2015-06-09 Thread Wei Huang
of ACPI 5.1, we use manual hardware discovery to find out GIC version. NOTE: This patch is based on a recent patch by Hanjun Guo. Signed-off-by: Hanjun Guo hanjun@linaro.org Signed-off-by: Wei Huang w...@redhat.com --- include/kvm/arm_vgic.h | 18 + virt/kvm/arm/vgic-v2.c | 10

[PATCH V2 4/5] kvm: arm64: Implement ACPI probing code for GICv2

2015-06-09 Thread Wei Huang
This patches enables ACPI support for KVM virtual GICv2. KVM parses ACPI table for virt GIC related information and initializes resources. Signed-off-by: Alexander Spyridaki a.spyrida...@virtualopensystems.com Signed-off-by: Wei Huang w...@redhat.com --- virt/kvm/arm/vgic-v2.c | 50

[PATCH V2 1/5] kvm: arm64: Enable ACPI support for virt arch timer

2015-06-09 Thread Wei Huang
This patches enables ACPI support for KVM virtual arch timer. It allows KVM to parse ACPI table for arch timer PPI when DT table is not present. Signed-off-by: Alexander Spyridaki a.spyrida...@virtualopensystems.com Signed-off-by: Wei Huang w...@redhat.com --- virt/kvm/arm/arch_timer.c | 75

Re: [PATCH V1 4/5] kvm: arm64: Implement ACPI probing code for GICv2

2015-05-29 Thread Wei Huang
On 05/29/2015 09:06 AM, Andrew Jones wrote: On Thu, May 28, 2015 at 01:34:33AM -0400, Wei Huang wrote: This patches enables ACPI support for KVM virtual GICv2. KVM parses ACPI table for virt GIC related information and initializes resources. Signed-off-by: Alexander Spyridaki a.spyrida

[PATCH V1 2/5] kvm: arm64: Dispatch virt GIC probing to device tree and ACPI

2015-05-27 Thread Wei Huang
This patch creates a dispatch function to support virt GIC probing in both device tree (DT) and ACPI environment. kvm_vgic_hyp_init() will probe DT first. If failed, it will try ACPI. Signed-off-by: Wei Huang w...@redhat.com --- include/kvm/arm_vgic.h | 18 +- virt/kvm/arm/vgic

[PATCH V1 0/5] Enable ACPI support for KVM ARM

2015-05-27 Thread Wei Huang
distributor (search ACPICA: Introduce GIC version for arm based system). This patchset can be applied cleanly on top of Linx 4.1-rc1. Wei Huang (5): kvm: arm64: Enable ACPI support for virt arch timer kvm: arm64: Dispatch virt GIC probing to device tree and ACPI kvm: arm64: Detect GIC version

[PATCH V1 4/5] kvm: arm64: Implement ACPI probing code for GICv2

2015-05-27 Thread Wei Huang
This patches enables ACPI support for KVM virtual GICv2. KVM parses ACPI table for virt GIC related information and initializes resources. Signed-off-by: Alexander Spyridaki a.spyrida...@virtualopensystems.com Signed-off-by: Wei Huang w...@redhat.com --- virt/kvm/arm/vgic-v2.c | 49

[PATCH V1 3/5] kvm: arm64: Detect GIC version for proper ACPI vGIC probing

2015-05-27 Thread Wei Huang
of ACPI 5.1, we use manual hardware discovery to find out GIC version. NOTE: This patch is based on a recent patch by Hanjun Guo. Signed-off-by: Hanjun Guo hanjun@linaro.org Signed-off-by: Wei Huang w...@redhat.com --- include/kvm/arm_vgic.h | 18 + virt/kvm/arm/vgic-v2.c | 10

[PATCH V1 1/5] kvm: arm64: Enable ACPI support for virt arch timer

2015-05-27 Thread Wei Huang
This patches enables ACPI support for KVM virtual arch timer. It allows KVM to parse ACPI table for arch timer PPI when DT table is not present. Signed-off-by: Alexander Spyridaki a.spyrida...@virtualopensystems.com Signed-off-by: Wei Huang w...@redhat.com --- virt/kvm/arm/arch_timer.c | 64