Re: [Qemu-devel] [kvm-unit-tests PATCH v11 0/3] ARM PMU tests

2016-11-23 Thread Andrew Jones
On Tue, Nov 22, 2016 at 12:29:11PM -0600, Wei Huang wrote: > 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

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 09/11] arm/arm64: add initial gicv3 support

2016-11-24 Thread Andrew Jones
On Thu, Nov 24, 2016 at 10:54:35AM +0100, Auger Eric wrote: > Hi Drew, > > On 23/11/2016 17:54, Andrew Jones wrote: > > Reviewed-by: Alex Bennée > > Reviewed-by: Eric Auger > > Signed-off-by: Andrew Jones > > > > --- > > v7: split lib/arm/gic.

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 10/11] arm/arm64: gicv3: add an IPI test

2016-11-24 Thread Andrew Jones
On Thu, Nov 24, 2016 at 10:54:55AM +0100, Auger Eric wrote: > Hi Drew, > > On 23/11/2016 17:54, Andrew Jones wrote: > > Signed-off-by: Andrew Jones > > > > --- > > v7: > > - add common ipi_send_single/mask (replacing ipi_send). > >N

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 11/11] arm/arm64: gic: don't just use zero

2016-11-24 Thread Andrew Jones
On Thu, Nov 24, 2016 at 10:57:01AM +0100, Auger Eric wrote: > Hi, > > On 23/11/2016 17:54, Andrew Jones wrote: > > Allow user to select who sends ipis and with which irq, > > rather than just always sending irq=0 from cpu0. > > > > Signed-off-by: Andrew Jo

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

2016-11-25 Thread Andrew Jones
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

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 01/11] run_tests: allow forcing of acceleration mode

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:23PM +, Alex Bennée wrote: > While tests can be pegged to tcg it is useful to override this from time > to time, especially when testing correctness on real systems. > --- > run_tests.sh | 8 ++-- > scripts/runtime.bash | 4 > 2 files changed, 10

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 02/11] run_tests: allow disabling of timeouts

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:24PM +, Alex Bennée wrote: > Certainly during development of the tests and MTTCG there are times when > the timeout just gets in the way. > > Signed-off-by: Alex Bennée > --- > run_tests.sh | 8 ++-- > scripts/runtime.bash | 4 > 2 files changed

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 03/11] run_tests: allow passing of options to QEMU

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:25PM +, Alex Bennée wrote: > This introduces a the option -o for passing of options directly to QEMU > which is useful. In my case I'm using it to toggle MTTCG on an off: > > ./run_tests.sh -t -o "-tcg mttcg=on" > > Signed-off-by: Alex Bennée > --- > run_test

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 04/11] libcflat: add PRI(dux)32 format types

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:26PM +, Alex Bennée wrote: > So we can have portable formatting of uint32_t types. > > Signed-off-by: Alex Bennée > --- > lib/libcflat.h | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/lib/libcflat.h b/lib/libcflat.h > index bdcc561..6dab5be 10064

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 06/11] arm/Makefile.common: force -fno-pic

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:28PM +, Alex Bennée wrote: > As distro compilers move towards defaults for build hardening for things > like ASLR we need to force -fno-pic. Failure to do can lead to weird > relocation problems when we build our "lat" binaries. > > Signed-off-by: Alex Bennée > -

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 07/11] arm/tlbflush-code: Add TLB flush during code execution test

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:29PM +, Alex Bennée wrote: > This adds a fairly brain dead torture test for TLB flushes intended for > stressing the MTTCG QEMU build. It takes the usual -smp option for > multiple CPUs. > > By default it CPU0 will do a TLBIALL flush after each cycle. You can > pa

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 08/11] arm/tlbflush-data: Add TLB flush during data writes test

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:30PM +, Alex Bennée wrote: > This test is the cousin of the tlbflush-code test. Instead of flushing > running code it re-maps virtual addresses while a buffer is being filled > up. It then audits the results checking for writes that have ended up in > the wrong pla

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 09/11] arm/locking-tests: add comprehensive locking test

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:31PM +, Alex Bennée wrote: > This test has been written mainly to stress multi-threaded TCG behaviour > but will demonstrate failure by default on real hardware. The test takes > the following parameters: > > - "lock" use GCC's locking semantics > - "atomic" u

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:22PM +, Alex Bennée wrote: > Hi, > > Looking at my records it seems as though it has been a while since I > last posted these tests. As I'm hoping to get the final bits of MTTCG > merged upstream on the next QEMU development cycle I've been re-basing > these and g

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

2016-11-28 Thread Andrew Jones
On Thu, Nov 24, 2016 at 04:10:22PM +, Alex Bennée wrote: > Hi, > > Looking at my records it seems as though it has been a while since I > last posted these tests. As I'm hoping to get the final bits of MTTCG > merged upstream on the next QEMU development cycle I've been re-basing > these and g

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

2016-11-28 Thread Andrew Jones
On Mon, Nov 28, 2016 at 11:14:48AM +, Peter Maydell wrote: > On 28 November 2016 at 11:12, Alex Bennée wrote: > > > > Andrew Jones writes: > >> I've skimmed over everything looking at it from a framwork/sytle > >> perspective. I didn't dig in tryi

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

2016-11-28 Thread Andrew Jones
On Mon, Nov 28, 2016 at 01:30:54PM +, Peter Maydell wrote: > On 28 November 2016 at 11:58, Andrew Jones wrote: > > On Mon, Nov 28, 2016 at 11:14:48AM +, Peter Maydell wrote: > >> On 28 November 2016 at 11:12, Alex Bennée wrote: > >> > > >> >

Re: [Qemu-devel] [kvm-unit-tests PATCH v7 00/11] QEMU MTTCG Test cases

2016-11-28 Thread Andrew Jones
On Mon, Nov 28, 2016 at 03:04:45PM +0100, Andrew Jones wrote: > On Mon, Nov 28, 2016 at 01:30:54PM +, Peter Maydell wrote: > > On 28 November 2016 at 11:58, Andrew Jones wrote: > > > On Mon, Nov 28, 2016 at 11:14:48AM +, Peter Maydell wrote: > > >> On 2

Re: [Qemu-devel] Linux kernel polling for QEMU

2016-11-29 Thread Andrew Jones
On Tue, Nov 29, 2016 at 10:17:46PM +0800, Fam Zheng wrote: > On Tue, 11/29 14:27, Paolo Bonzini wrote: > > > > > > On 29/11/2016 14:24, Fam Zheng wrote: > > > On Tue, 11/29 12:17, Paolo Bonzini wrote: > > >> > > >> > > >> On 29/11/2016 11:32, Fam Zheng wrote: > > >>> > > >>> The kernel change wil

Re: [Qemu-devel] Linux kernel polling for QEMU

2016-11-29 Thread Andrew Jones
On Tue, Nov 29, 2016 at 11:39:44PM +0800, Fam Zheng wrote: > On Tue, 11/29 16:24, Andrew Jones wrote: > > On Tue, Nov 29, 2016 at 10:17:46PM +0800, Fam Zheng wrote: > > > On Tue, 11/29 14:27, Paolo Bonzini wrote: > > > > > > > > > > > > On 2

Re: [Qemu-devel] Linux kernel polling for QEMU

2016-11-29 Thread Andrew Jones
On Tue, Nov 29, 2016 at 05:13:27PM +0100, Paolo Bonzini wrote: > > > On 29/11/2016 17:01, Andrew Jones wrote: > > OK, it may be due to scheduling then. Below is the test case (for AArch64) > > Also, I forgot to mention before that I can only see this with TCG, not > >

Re: [Qemu-devel] Linux kernel polling for QEMU

2016-11-30 Thread Andrew Jones
On Wed, Nov 30, 2016 at 07:19:12AM +, Peter Maydell wrote: > On 29 November 2016 at 19:38, Andrew Jones wrote: > > Thanks for making me look, I was simply assuming we were in the while > > loops above. > > > > I couldn't get the problem to reproduce with a

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

2016-12-01 Thread Andrew Jones
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: >* DEFINE_GET_SYSREG32(name, ...) >* DEFINE_SET_SYSREG32(name, ...) >* DEFINE_GET_SYSREG

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

2016-12-01 Thread Andrew Jones
; > Signed-off-by: Christopher Covington > Signed-off-by: Wei Huang > Reviewed-by: Andrew Jones > --- > arm/Makefile.common | 3 ++- > arm/pmu.c | 62 > + > arm/unittests.cfg | 5 + > 3 files chang

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

2016-12-01 Thread Andrew Jones
Wei Huang > Reviewed-by: Andrew Jones > --- > arm/pmu.c | 94 > +++ > 1 file changed, 94 insertions(+) > > diff --git a/arm/pmu.c b/arm/pmu.c > index 1fe2b1a..3566a27 100644 > --- a/arm/pmu.c > +++ b/arm/p

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

2016-12-01 Thread Andrew Jones
TCG mode in the configuration file. > > Signed-off-by: Christopher Covington > Signed-off-by: Wei Huang > Reviewed-by: Andrew Jones > --- > arm/pmu.c | 123 > +- > arm/unittests.cfg | 14 +++ > 2 files changed,

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

2016-12-01 Thread Andrew Jones
On Thu, Dec 01, 2016 at 09:59:03AM +0100, 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 unde

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

2016-12-01 Thread Andrew Jones
On Thu, Dec 01, 2016 at 11:11:55AM +, Andre Przywara wrote: > Hi, > > On 01/12/16 08:59, Andrew Jones wrote: > > > > Should this be From: Andre? > > No need from my side, this way all the bug reports are send to Wei ;-) > > > On Wed, Nov 30, 2016

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

2016-12-01 Thread Andrew Jones
On Thu, Dec 01, 2016 at 10:19:13AM +, Andre Przywara wrote: > Hi Drew, > > actually unrelated to this actual patch, but since you mentioned it: > > > As we work out how best to handle tcg-only tests in order to get Alex > > Bennee's MTTCG tests merged, we'll probably revisit this file, > > S

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

2016-12-01 Thread Andrew Jones
On Thu, Dec 01, 2016 at 09:27:59AM -0600, Wei Huang wrote: > > > 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

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

2016-12-02 Thread Andrew Jones
On Thu, Dec 01, 2016 at 11:36:55AM -0600, Wei Huang wrote: > > > 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 > >> > >> Ensure that reads of the PMCCNTR_EL0 a

Re: [Qemu-devel] [kvm-unit-tests RFC 03/15] arm/arm64: ITS skeleton

2016-12-06 Thread Andrew Jones
mpat.o > diff --git a/lib/arm/asm/gic-v3-its.h b/lib/arm/asm/gic-v3-its.h > new file mode 100644 > index 000..2044565 > --- /dev/null > +++ b/lib/arm/asm/gic-v3-its.h > @@ -0,0 +1,22 @@ > +/* > + * All ITS* defines are lifted from include/linux/irqchip/arm-gic-v3.h &

Re: [Qemu-devel] [kvm-unit-tests RFC 05/15] arm/arm64: GICv3: add cpu count

2016-12-06 Thread Andrew Jones
On Mon, Dec 05, 2016 at 10:46:36PM +0100, Eric Auger wrote: > Add a new cpu_count field in gicv3_data indicating the > number of redistributors. This will be useful for enumeration > of their resources such as LPI pending tables. I'm fine with the additional state, but just curious, will it ever b

Re: [Qemu-devel] [kvm-unit-tests RFC 00/15] arm/arm64: add ITS framework

2016-12-06 Thread Andrew Jones
On Mon, Dec 05, 2016 at 10:46:31PM +0100, Eric Auger wrote: > This series proposes a framework to test the virtual ITS. > This is based on Drew's v7 series [1]. The last patch tests > several ITS commands (collection/device mapping, interrupt > translation service entry creation and LPI trigger thr

Re: [Qemu-devel] [kvm-unit-tests RFC 00/15] arm/arm64: add ITS framework

2016-12-06 Thread Andrew Jones
On Tue, Dec 06, 2016 at 11:14:41AM +, Andre Przywara wrote: > Hi, > > On 06/12/16 09:48, Andrew Jones wrote: > > On Mon, Dec 05, 2016 at 10:46:31PM +0100, Eric Auger wrote: > >> This series proposes a framework to test the virtual ITS. > >> This is based

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

2016-12-07 Thread Andrew Jones
ed > with __ACCESS_CP15() or __ACCESS_CP15_64() depending if it is 32-bit or > 64-bit. get_mpidr() is re-written with new macros. > > Suggested-by: Andrew Jones > Signed-off-by: Wei Huang > --- > lib/arm/asm/processor.h | 6 +++--- > lib/arm/asm/sysreg.h | 19 +++

Re: [Qemu-devel] [kvm-unit-tests PATCH v14 0/5] ARM PMU tests

2016-12-07 Thread Andrew Jones
On Tue, Dec 06, 2016 at 12:05:23PM -0600, Wei Huang wrote: > Changes from v13: > * Rename cp15.h to sysreg.h for ARMv7 and add a new file sysreg.h for ARMv8 > * Add macros for read_sysreg() and write_sysreg(). CP15 registers can be > defined with __ACCESS_CP15() or __ACCESS_CP15_64(). sysreg.h (A

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

2016-12-08 Thread Andrew Jones
On Tue, Dec 06, 2016 at 12:05:26PM -0600, Wei Huang wrote: > From: Christopher Covington > > 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 > Signed-off-by: Wei Huang > --- >

[Qemu-devel] [PATCH kvm-unit-tests v8 07/10] libcflat: add IS_ALIGNED() macro, and page sizes

2016-12-08 Thread Andrew Jones
From: Peter Xu These macros will be useful to do page alignment checks. Reviewed-by: Andre Przywara Reviewed-by: Eric Auger Signed-off-by: Peter Xu [drew: also added SZ_64K and changed to shifts] Signed-off-by: Andrew Jones --- v6: change to shifts [Alex] --- lib/libcflat.h | 6 ++ 1

[Qemu-devel] [PATCH kvm-unit-tests v8 03/10] arm/arm64: add some delay routines

2016-12-08 Thread Andrew Jones
Allow a thread to wait some specified amount of time. Can specify in cycles, usecs, and msecs. Signed-off-by: Andrew Jones --- v8: rewrote basing on new sysreg framework. Also decided delay functions warrant their own files (delay.[ch]) --- arm/Makefile.common | 1 + lib/arm/asm

[Qemu-devel] [PATCH kvm-unit-tests v8 01/10] arm/arm64: yield on cpu_relax

2016-12-08 Thread Andrew Jones
always a place it's needed. While this change is mostly for TCG, it's fine to do for KVM as well. The Linux kernel made the same change with 1baa82f4803 for armv8. As the yield instruction is also available on armv7, we make the change for both. Signed-off-by: Andrew Jones --- v8:

[Qemu-devel] [PATCH kvm-unit-tests v8 00/10] arm/arm64: add gic framework

2016-12-08 Thread Andrew Jones
functionality needed by the later gic patches 05-06: enable gicv2 and gicv2 IPI test 07-09: enable gicv3 and gicv3 IPI test 10: extend the IPI tests to use cpu1 and irq1 instead of zero Available here: https://github.com/rhdrjones/kvm-unit-tests/commits/arm/gic-v8 and based on https://gith

[Qemu-devel] [PATCH kvm-unit-tests v8 04/10] arm/arm64: irq enable/disable

2016-12-08 Thread Andrew Jones
Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/arm/asm/processor.h | 10 ++ lib/arm64/asm/processor.h | 10 ++ 2 files changed, 20 insertions(+) diff --git a/lib/arm/asm/processor.h b/lib/arm/asm/processor.h index 857bdd96a3cc

[Qemu-devel] [PATCH kvm-unit-tests v8 02/10] arm/arm64: smp: support more than 8 cpus

2016-12-08 Thread Andrew Jones
Reviewed-by: Andre Przywara Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- v8: in anticipation of get_mpidr() returning a u64 (patches will be in a future series), make sure we use that type everywhere get_mpidr is used v5: left cpus a u32 for now. Changing to u64 requires a

[Qemu-devel] [PATCH kvm-unit-tests v8 05/10] arm/arm64: add initial gicv2 support

2016-12-08 Thread Andrew Jones
Add some gicv2 support. This just adds init and enable functions, allowing unit tests to start messing with it. Reviewed-by: Andre Przywara Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- v6: added comments (register offset headers) [Alex] v5: share/use only the modern register names

[Qemu-devel] [PATCH kvm-unit-tests v8 10/10] arm/arm64: gic: don't just use zero

2016-12-08 Thread Andrew Jones
ender=1 is a bit limited for the long term, as we may want to test IPIs across host sockets with pinned vcpus. But we can improve on this later, possibly with the introduction of a command line parameter. Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- v8: - remove crufy command line pa

[Qemu-devel] [PATCH kvm-unit-tests v8 06/10] arm/arm64: gicv2: add an IPI test

2016-12-08 Thread Andrew Jones
Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- v8: - fix check_spurious print arguments and change the printf to a report_info - remove the self-ipi test issued when no subtest is given, i.e. require a subtest to be given - use report_summary for no supported gic present

[Qemu-devel] [PATCH kvm-unit-tests v8 08/10] arm/arm64: add initial gicv3 support

2016-12-08 Thread Andrew Jones
Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- v8: few sysreg framework and new delay rebase changes v7: split lib/arm/gic.c into gic-v2/3.c [Eric] v6: - added comments [Alex] - added stride parameter to gicv3_set_redist_base [Andre] - redist-wait s/rwp/uwp

[Qemu-devel] [PATCH kvm-unit-tests v8 09/10] arm/arm64: gicv3: add an IPI test

2016-12-08 Thread Andrew Jones
Signed-off-by: Andrew Jones --- v8: - keep the gic_common_ops concept completely local to lib/arm/gic.c by instead exposing the more useful concept of gic-specific functions - sysreg rebase changes - ordered ICC registers in spec-order (OCD kicked in...) v7: - add common

Re: [Qemu-devel] [PATCH V2 1/2] arm64: Add an option to turn on/off vPMU support

2016-09-14 Thread Andrew Jones
_dynamic_cast(OBJECT(cpu), TYPE_AARCH64_CPU)) { > @@ -501,10 +508,12 @@ int kvm_arch_init_vcpu(CPUState *cs) > if (!arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) { > cpu->kvm_init_features[0] |= 1 << KVM_ARM_VCPU_EL1_32BIT; > } > -if (kvm_irqchip_in_kernel() && > -kvm_check_extension(cs->kvm_state, KVM_CAP_ARM_PMU_V3)) { > -cpu->has_pmu = true; > -cpu->kvm_init_features[0] |= 1 << KVM_ARM_VCPU_PMU_V3; > +/* enable PMU based on KVM mode, hw capability, and user setting */ > +cpu->has_pmu &= kvm_irqchip_in_kernel() && > +kvm_check_extension(cs->kvm_state, KVM_CAP_ARM_PMU_V3); > +cpu->kvm_init_features[0] |= cpu->has_pmu << KVM_ARM_VCPU_PMU_V3; > +if (!cpu->has_pmu) { > +unset_feature(&env->features, ARM_FEATURE_PMU); nit: I think I'd like the following more if (cpu->has_pmu) { cpu->kvm_init_features[0] |= 1 << KVM_ARM_VCPU_PMU_V3; } else { unset_feature(&env->features, ARM_FEATURE_PMU); } but whatever. > } > > /* Do KVM_ARM_VCPU_INIT ioctl */ > -- > 1.8.3.1 > > With some changes to the commit message Reviewed-by: Andrew Jones

Re: [Qemu-devel] [PATCH V2 2/2] arm: virt: add PMU property to machvirt machine type

2016-09-14 Thread Andrew Jones
On Wed, Sep 14, 2016 at 02:09:03AM -0400, Wei Huang wrote: > CPU vPMU is now turned off by default, but it was ON in virt-2.7 > machine type. To solve this problem, this patch adds a PMU option > in machine state, which is used to control CPU's vPMU status. This > PMU option is not exposed to comma

Re: [Qemu-devel] [PATCH V2 2/2] arm: virt: add PMU property to machvirt machine type

2016-09-14 Thread Andrew Jones
On Wed, Sep 14, 2016 at 10:37:19AM +0200, Andrew Jones wrote: > On Wed, Sep 14, 2016 at 02:09:03AM -0400, Wei Huang wrote: > > CPU vPMU is now turned off by default, but it was ON in virt-2.7 > > machine type. To solve this problem, this patch adds a PMU option > > in machine

Re: [Qemu-devel] [PATCH V3 1/2] arm64: Add an option to turn on/off vPMU support

2016-09-15 Thread Andrew Jones
On Thu, Sep 15, 2016 at 01:04:15AM -0400, Wei Huang wrote: > This patch adds a pmu=[on/off] option to enable/disable vPMU support > in guest vCPU. This option is only available for cortex-a57/cortex-53/ > host under both TCG and KVM modes, but unavailable on ARMv7 and other > processors. It allows

Re: [Qemu-devel] [PATCH V3 2/2] arm: virt: add PMU property to mach-virt machine type

2016-09-15 Thread Andrew Jones
_options(MachineClass *mc) > virt_machine_2_7_options(mc); > SET_MACHINE_COMPAT(mc, VIRT_COMPAT_2_6); > vmc->disallow_affinity_adjustment = true; > + /* Disable PMU for 2.6 and down as PMU support was first introduced > + * and enabled in 2.7. > + */ > +vmc->pmu_default_on = false; > } > DEFINE_VIRT_MACHINE(2, 6) > -- > 1.8.3.1 > > Otherwise, Reviewed-by: Andrew Jones

Re: [Qemu-devel] [PATCH RFC] docs: add PCIe devices placement guidelines

2016-09-15 Thread Andrew Jones
On Wed, Sep 07, 2016 at 10:39:28PM +0300, Marcel Apfelbaum wrote: > On 09/07/2016 08:55 PM, Laine Stump wrote: > > On 09/07/2016 04:06 AM, Marcel Apfelbaum wrote: [snip] > > > Good point, maybe libvirt can avoid adding switches unless the user > > > explicitly > > > asked for them. I checked and it

Re: [Qemu-devel] [PATCH V4 0/2] Add option to configure guest vPMU

2016-09-21 Thread Andrew Jones
On Tue, Sep 20, 2016 at 10:33:52PM -0400, Wei Huang wrote: > This patchset adds a pmu=[on/off] option to enable/disable vPMU support > for guest VM. There are several reasons to justify this option. First, > vPMU can be problematic for cross-migration between different SoC as perf > counters are a

Re: [Qemu-devel] [PATCH V4 1/2] arm64: Add an option to turn on/off vPMU support

2016-09-21 Thread Andrew Jones
On Tue, Sep 20, 2016 at 10:33:53PM -0400, Wei Huang wrote: > This patch adds a pmu=[on/off] option to enable/disable vPMU support > in guest vCPU. This option is only available for cortex-a57/cortex-53/ > host under both TCG and KVM modes, but unavailable on ARMv7 and other > processors. It allows

Re: [Qemu-devel] [PATCH V4 2/2] arm: virt: add PMU property to mach-virt machine type

2016-09-21 Thread Andrew Jones
On Tue, Sep 20, 2016 at 10:33:54PM -0400, Wei Huang wrote: > CPU vPMU is now turned off by default, but it was ON in virt-2.7 > machine type. To solve this problem, this patch adds a PMU option > in machine state, which is used to control CPU's vPMU status. This > PMU option is not exposed to comma

Re: [Qemu-devel] [PATCH V4 1/2] arm64: Add an option to turn on/off vPMU support

2016-09-21 Thread Andrew Jones
On Wed, Sep 21, 2016 at 08:35:41AM -0500, Wei Huang wrote: > On 09/21/2016 02:53 AM, Andrew Jones wrote: > > On Tue, Sep 20, 2016 at 10:33:53PM -0400, Wei Huang wrote: [snip] > >> +if (cpu->has_pmu == ON_OFF_AUTO_ON && !kvm_enabled()) { > >> +

Re: [Qemu-devel] [RFC PATCH] kvm-unit-tests: arm/arm64: strip GIC headers

2016-11-08 Thread Andrew Jones
On Tue, Nov 08, 2016 at 09:48:02AM +, Andre Przywara wrote: > Hi, > > this is an illustrative patch which shows what can be removed from > the kvm-unit-tests GIC headers. If this patch finds mercy, it should be > squashed into the in-flight GIC patches, eventually. > The rationale for this pat

[Qemu-devel] [kvm-unit-tests PATCH v4 01/11] lib: xstr: allow multiple args

2016-11-08 Thread Andrew Jones
Make implementation equivalent to Linux's include/linux/stringify.h Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/libcflat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcflat.h b/lib/libcflat.h index 72b1bf9668ef..82005f5d014f 100644 ---

[Qemu-devel] [kvm-unit-tests PATCH v4 00/11] arm/arm64: add gic framework

2016-11-08 Thread Andrew Jones
r and irq Available here: https://github.com/rhdrjones/kvm-unit-tests/commits/arm/gic-v4 Andrew Jones (10): lib: xstr: allow multiple args arm64: fix get_"sysreg32" and make MPIDR 64bit arm/arm64: smp: support more than 8 cpus arm/arm64: add some delay routines arm/arm64: irq enab

[Qemu-devel] [kvm-unit-tests PATCH v4 02/11] arm64: fix get_"sysreg32" and make MPIDR 64bit

2016-11-08 Thread Andrew Jones
mrs is always 64bit, so we should always use a 64bit register. Sometimes we'll only want to return the lower 32, but not for MPIDR, as that does define fields in the upper 32. Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/arm64/asm/processor.h

[Qemu-devel] [kvm-unit-tests PATCH v4 10/11] arm/arm64: gicv3: add an IPI test

2016-11-08 Thread Andrew Jones
Signed-off-by: Andrew Jones --- v4: - heavily comment gicv3_ipi_send_tlist() [Eric] - changes needed for gicv2 iar/irqstat fix to other patch v2: - use IRM for gicv3 broadcast --- arm/gic.c | 195 ++--- arm/unittests.cfg | 6

[Qemu-devel] [kvm-unit-tests PATCH v4 04/11] arm/arm64: add some delay routines

2016-11-08 Thread Andrew Jones
Allow a thread to wait some specified amount of time. Can specify in cycles, usecs, and msecs. Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/arm/asm/processor.h | 19 +++ lib/arm/processor.c | 15 +++ lib/arm64/asm

[Qemu-devel] [kvm-unit-tests PATCH v4 03/11] arm/arm64: smp: support more than 8 cpus

2016-11-08 Thread Andrew Jones
Signed-off-by: Andrew Jones --- v4: improved commit message --- arm/run | 19 --- arm/selftest.c| 5 - lib/arm/asm/processor.h | 9 +++-- lib/arm/asm/setup.h | 4 ++-- lib/arm/setup.c | 12 +++- lib/arm64/asm

[Qemu-devel] [kvm-unit-tests PATCH v4 05/11] arm/arm64: irq enable/disable

2016-11-08 Thread Andrew Jones
Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/arm/asm/processor.h | 10 ++ lib/arm64/asm/processor.h | 10 ++ 2 files changed, 20 insertions(+) diff --git a/lib/arm/asm/processor.h b/lib/arm/asm/processor.h index afc903ca7d4a

[Qemu-devel] [kvm-unit-tests PATCH v4 11/11] arm/arm64: gic: don't just use zero

2016-11-08 Thread Andrew Jones
Allow user to select who sends ipis and with which irq, rather than just always sending irq=0 from cpu0. Signed-off-by: Andrew Jones --- v4: improve structure and make sure spurious checking is done even when the sender isn't cpu0 v2: actually check that the irq received was the irq

[Qemu-devel] [kvm-unit-tests PATCH v4 06/11] arm/arm64: add initial gicv2 support

2016-11-08 Thread Andrew Jones
Add some gicv2 support. This just adds init and enable functions, allowing unit tests to start messing with it. Signed-off-by: Andrew Jones --- v4: - only take defines from kernel we need now [Andre] - moved defines to asm/gic.h so they'll be shared with v3 [drew] - simplify enable b

[Qemu-devel] [kvm-unit-tests PATCH v4 08/11] libcflat: add IS_ALIGNED() macro, and page sizes

2016-11-08 Thread Andrew Jones
From: Peter Xu These macros will be useful to do page alignment checks. Signed-off-by: Peter Xu [drew: also added SZ_64K] Signed-off-by: Andrew Jones --- lib/libcflat.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/libcflat.h b/lib/libcflat.h index 82005f5d014f..143fc53061fe

[Qemu-devel] [kvm-unit-tests PATCH v4 09/11] arm/arm64: add initial gicv3 support

2016-11-08 Thread Andrew Jones
Signed-off-by: Andrew Jones --- v4: - only take defines from kernel we need now [Andre] - simplify enable by not caring if we reinit the distributor [drew] v2: - configure irqs as NS GRP1 --- lib/arm/asm/arch_gicv3.h | 42 + lib/arm/asm/gic-v3.h | 92

[Qemu-devel] [kvm-unit-tests PATCH v4 07/11] arm/arm64: gicv2: add an IPI test

2016-11-08 Thread Andrew Jones
Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- v4: properly mask irqnr in ipi_handler v2: add more details in the output if a test fails, report spurious interrupts if we get them --- arm/Makefile.common | 6 +- arm/gic.c | 195

Re: [Qemu-devel] [kvm-unit-tests PATCH v4 10/11] arm/arm64: gicv3: add an IPI test

2016-11-09 Thread Andrew Jones
Argh. I forgot to compile/test arm32/gicv3... Just did now and found a copy+paste error. On Tue, Nov 08, 2016 at 09:21:38PM +0100, Andrew Jones wrote: [...] > diff --git a/lib/arm/asm/arch_gicv3.h b/lib/arm/asm/arch_gicv3.h > index 81a1e5f6c29c..cbcec024a2a6 100644 > --- a/lib/arm/asm/a

Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support

2016-11-09 Thread Andrew Jones
On Wed, Nov 09, 2016 at 11:01:46AM +0800, Dave Young wrote: > Hi, > > Latest linux kernel enabled kaslr to randomiz phys/virt memory > addresses, we had some effort to support kexec/kdump so that crash > utility can still works in case crashed kernel has kaslr enabled. > > But according to Dave A

Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support

2016-11-09 Thread Andrew Jones
On Wed, Nov 09, 2016 at 11:37:35AM +, Daniel P. Berrange wrote: > On Wed, Nov 09, 2016 at 12:26:17PM +0100, Laszlo Ersek wrote: > > On 11/09/16 11:40, Andrew Jones wrote: > > > On Wed, Nov 09, 2016 at 11:01:46AM +0800, Dave Young wrote: > > >> Hi, > > &

Re: [Qemu-devel] [kvm-unit-tests PATCH v4 03/11] arm/arm64: smp: support more than 8 cpus

2016-11-09 Thread Andrew Jones
On Wed, Nov 09, 2016 at 11:12:03AM +, Andre Przywara wrote: [...] > > diff --git a/lib/arm/setup.c b/lib/arm/setup.c > > index 7e7b39f11dde..b6e2d5815e72 100644 > > --- a/lib/arm/setup.c > > +++ b/lib/arm/setup.c > > @@ -24,12 +24,22 @@ extern unsigned long stacktop; > > extern void io_init(vo

Re: [Qemu-devel] [kvm-unit-tests PATCH v4 06/11] arm/arm64: add initial gicv2 support

2016-11-09 Thread Andrew Jones
t; +/* > > + * Copyright (C) 2016, Red Hat Inc, Andrew Jones > > + * > > + * This work is licensed under the terms of the GNU LGPL, version 2. > > + */ > > +#ifndef _ASMARM_GIC_H_ > > +#define _ASMARM_GIC_H_ > > + > > +#include > > + > >

Re: [Qemu-devel] [kvm-unit-tests PATCH v4 03/11] arm/arm64: smp: support more than 8 cpus

2016-11-09 Thread Andrew Jones
On Wed, Nov 09, 2016 at 12:01:42PM +, Andre Przywara wrote: > Hi, > > On 09/11/16 11:57, Andrew Jones wrote: > > On Wed, Nov 09, 2016 at 11:12:03AM +, Andre Przywara wrote: > > [...] > >>> diff --git a/lib/arm/setup.c b/lib/arm/setup.c > >>

Re: [Qemu-devel] virsh dump (qemu guest memory dump?): KASLR enabled linux guest support

2016-11-09 Thread Andrew Jones
On Wed, Nov 09, 2016 at 11:58:19AM +, Daniel P. Berrange wrote: > On Wed, Nov 09, 2016 at 12:48:09PM +0100, Andrew Jones wrote: > > On Wed, Nov 09, 2016 at 11:37:35AM +, Daniel P. Berrange wrote: > > > On Wed, Nov 09, 2016 at 12:26:17PM +0100, Laszlo Ersek wrote: > &g

Re: [Qemu-devel] [kvm-unit-tests PATCH v4 09/11] arm/arm64: add initial gicv3 support

2016-11-09 Thread Andrew Jones
@@ > > +/* > > + * All GIC* defines are lifted from include/linux/irqchip/arm-gic-v3.h > > + * > > + * Copyright (C) 2016, Red Hat Inc, Andrew Jones > > + * > > + * This work is licensed under the terms of the GNU LGPL, version 2. > > + */ > > +#ifnde

Re: [Qemu-devel] [kvm-unit-tests PATCH v4 09/11] arm/arm64: add initial gicv3 support

2016-11-09 Thread Andrew Jones
On Wed, Nov 09, 2016 at 02:43:53PM +, Andre Przywara wrote: > Hi, > > On 09/11/16 13:08, Andrew Jones wrote: > > On Wed, Nov 09, 2016 at 12:35:48PM +, Andre Przywara wrote: > > [...] > >>> diff --git a/lib/arm/asm/gic-v3.h b/lib/arm/asm/gic-v3.h >

[Qemu-devel] [kvm-unit-tests PATCH v4 02/11] arm64: fix get_"sysreg32" and make MPIDR 64bit

2016-11-10 Thread Andrew Jones
mrs is always 64bit, so we should always use a 64bit register. Sometimes we'll only want to return the lower 32, but not for MPIDR, as that does define fields in the upper 32. Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/arm64/asm/processor.h

[Qemu-devel] [kvm-unit-tests PATCH v4 01/11] lib: xstr: allow multiple args

2016-11-10 Thread Andrew Jones
Make implementation equivalent to Linux's include/linux/stringify.h Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/libcflat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcflat.h b/lib/libcflat.h index 72b1bf9668ef..82005f5d014f 100644 ---

[Qemu-devel] [kvm-unit-tests PATCH v4 04/11] arm/arm64: add some delay routines

2016-11-10 Thread Andrew Jones
Allow a thread to wait some specified amount of time. Can specify in cycles, usecs, and msecs. Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/arm/asm/processor.h | 19 +++ lib/arm/processor.c | 15 +++ lib/arm64/asm

[Qemu-devel] [kvm-unit-tests PATCH v4 03/11] arm/arm64: smp: support more than 8 cpus

2016-11-10 Thread Andrew Jones
Signed-off-by: Andrew Jones --- v4: improved commit message --- arm/run | 19 --- arm/selftest.c| 5 - lib/arm/asm/processor.h | 9 +++-- lib/arm/asm/setup.h | 4 ++-- lib/arm/setup.c | 12 +++- lib/arm64/asm

[Qemu-devel] [kvm-unit-tests PATCH v4 11/11] arm/arm64: gic: don't just use zero

2016-11-10 Thread Andrew Jones
Allow user to select who sends ipis and with which irq, rather than just always sending irq=0 from cpu0. Signed-off-by: Andrew Jones --- v4: improve structure and make sure spurious checking is done even when the sender isn't cpu0 v2: actually check that the irq received was the irq

[Qemu-devel] [kvm-unit-tests PATCH v4 00/11] arm/arm64: add gic framework

2016-11-10 Thread Andrew Jones
r and irq Available here: https://github.com/rhdrjones/kvm-unit-tests/commits/arm/gic-v4 Andrew Jones (10): lib: xstr: allow multiple args arm64: fix get_"sysreg32" and make MPIDR 64bit arm/arm64: smp: support more than 8 cpus arm/arm64: add some delay routines arm/arm64: irq enab

[Qemu-devel] [kvm-unit-tests PATCH v4 05/11] arm/arm64: irq enable/disable

2016-11-10 Thread Andrew Jones
Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/arm/asm/processor.h | 10 ++ lib/arm64/asm/processor.h | 10 ++ 2 files changed, 20 insertions(+) diff --git a/lib/arm/asm/processor.h b/lib/arm/asm/processor.h index afc903ca7d4a

[Qemu-devel] [kvm-unit-tests PATCH v4 10/11] arm/arm64: gicv3: add an IPI test

2016-11-10 Thread Andrew Jones
Signed-off-by: Andrew Jones --- v4: - heavily comment gicv3_ipi_send_tlist() [Eric] - changes needed for gicv2 iar/irqstat fix to other patch v2: - use IRM for gicv3 broadcast --- arm/gic.c | 195 ++--- arm/unittests.cfg | 6

[Qemu-devel] [kvm-unit-tests PATCH v4 06/11] arm/arm64: add initial gicv2 support

2016-11-10 Thread Andrew Jones
Add some gicv2 support. This just adds init and enable functions, allowing unit tests to start messing with it. Signed-off-by: Andrew Jones --- v4: - only take defines from kernel we need now [Andre] - moved defines to asm/gic.h so they'll be shared with v3 [drew] - simplify enable b

[Qemu-devel] [kvm-unit-tests PATCH v4 07/11] arm/arm64: gicv2: add an IPI test

2016-11-10 Thread Andrew Jones
Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- v4: properly mask irqnr in ipi_handler v2: add more details in the output if a test fails, report spurious interrupts if we get them --- arm/Makefile.common | 6 +- arm/gic.c | 195

[Qemu-devel] [kvm-unit-tests PATCH v4 09/11] arm/arm64: add initial gicv3 support

2016-11-10 Thread Andrew Jones
Signed-off-by: Andrew Jones --- v4: - only take defines from kernel we need now [Andre] - simplify enable by not caring if we reinit the distributor [drew] v2: - configure irqs as NS GRP1 --- lib/arm/asm/arch_gicv3.h | 42 + lib/arm/asm/gic-v3.h | 92

[Qemu-devel] [kvm-unit-tests PATCH v4 08/11] libcflat: add IS_ALIGNED() macro, and page sizes

2016-11-10 Thread Andrew Jones
From: Peter Xu These macros will be useful to do page alignment checks. Signed-off-by: Peter Xu [drew: also added SZ_64K] Signed-off-by: Andrew Jones --- lib/libcflat.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/libcflat.h b/lib/libcflat.h index 82005f5d014f..143fc53061fe

[Qemu-devel] [kvm-unit-tests PATCH v5 05/11] arm/arm64: irq enable/disable

2016-11-10 Thread Andrew Jones
Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/arm/asm/processor.h | 10 ++ lib/arm64/asm/processor.h | 10 ++ 2 files changed, 20 insertions(+) diff --git a/lib/arm/asm/processor.h b/lib/arm/asm/processor.h index bc46d1f980ee

[Qemu-devel] [kvm-unit-tests PATCH v5 06/11] arm/arm64: add initial gicv2 support

2016-11-10 Thread Andrew Jones
Add some gicv2 support. This just adds init and enable functions, allowing unit tests to start messing with it. Signed-off-by: Andrew Jones --- v5: share/use only the modern register names [Andre] v4: - only take defines from kernel we need now [Andre] - moved defines to asm/gic.h so they&#x

Re: [Qemu-devel] [kvm-unit-tests PATCH v4 00/11] arm/arm64: add gic framework

2016-11-10 Thread Andrew Jones
he real v5 is coming... Thanks, Your Friendly Spammer > > Cheers, > Andre. > > On 10/11/16 16:07, Andrew Jones wrote: > > v4: > > - Eric's r-b's > > - Andre's suggestion to only take defines we need > > - several other changes listed in in

[Qemu-devel] [kvm-unit-tests PATCH v5 01/11] lib: xstr: allow multiple args

2016-11-10 Thread Andrew Jones
Make implementation equivalent to Linux's include/linux/stringify.h Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/libcflat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcflat.h b/lib/libcflat.h index 72b1bf9668ef..82005f5d014f 100644 ---

[Qemu-devel] [kvm-unit-tests PATCH v5 00/11] arm/arm64: add gic framework

2016-11-10 Thread Andrew Jones
08-10: enable gicv3 and gicv3 IPI test 11: extend the IPI tests to take variable sender and irq Available here: https://github.com/rhdrjones/kvm-unit-tests/commits/arm/gic-v5 Andrew Jones (10): lib: xstr: allow multiple args arm64: fix get_"sysreg32" and make MPIDR 64bit arm

[Qemu-devel] [kvm-unit-tests PATCH v5 09/11] arm/arm64: add initial gicv3 support

2016-11-10 Thread Andrew Jones
Signed-off-by: Andrew Jones --- v5: use modern register names [Andre] v4: - only take defines from kernel we need now [Andre] - simplify enable by not caring if we reinit the distributor [drew] v2: - configure irqs as NS GRP1 --- lib/arm/asm/arch_gicv3.h | 42 + lib/arm

[Qemu-devel] [kvm-unit-tests PATCH v5 02/11] arm64: fix get_"sysreg32" and make MPIDR 64bit

2016-11-10 Thread Andrew Jones
mrs is always 64bit, so we should always use a 64bit register. Sometimes we'll only want to return the lower 32, but not for MPIDR, as that does define fields in the upper 32. Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- v5: switch arm32's ge

<    8   9   10   11   12   13   14   15   16   17   >