Re: [Qemu-devel] [PATCH 00/23] arm: Add virtualization to GICv3, and enable EL2 on 64-bit CPUs

2016-12-13 Thread Andrew Jones
On Tue, Dec 13, 2016 at 10:36:01AM +, Peter Maydell wrote: > This patchset adds support for the Virtualization extensions to QEMU's > GICv3 emulation. This was the last missing piece that was stopping > us from turning on the EL2 support in the CPU model, so the patchset > also adds support

Re: [Qemu-devel] [PATCH 03/11] hw/arm/virt: use VirtMachineState.smp_cpus

2016-12-15 Thread Andrew Jones
On Thu, Dec 15, 2016 at 11:37:06AM +0100, Igor Mammedov wrote: > On Tue, 13 Dec 2016 22:45:14 +0100 > Andrew Jones <drjo...@redhat.com> wrote: > > > Most places we need smp_cpus we use vms->smp_cpus already. This > > cleanup makes sure we do everywhere, preparing for

[Qemu-devel] [PATCH 02/11] hw/arm/virt: use VirtMachineState.gic_version

2016-12-13 Thread Andrew Jones
-by: Andrew Jones <drjo...@redhat.com> --- hw/arm/virt.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index d451bc4f6b9b..67c0abb30b5b 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -319,7 +319,7 @@

[Qemu-devel] [PATCH 00/11] Remove VirtGuestInfo

2016-12-13 Thread Andrew Jones
available here https://github.com/rhdrjones/qemu/commits/virt/remove-guest-info Andrew Jones (11): hw/arm/virt: parameter passing cleanups hw/arm/virt: use VirtMachineState.gic_version hw/arm/virt: use VirtMachineState.smp_cpus hw/arm/virt: eliminate struct VirtGuestInfoState hw/arm/virt

[Qemu-devel] [PATCH 01/11] hw/arm/virt: parameter passing cleanups

2016-12-13 Thread Andrew Jones
Some simple cleanups made possible by "hw/arm/virt: Merge VirtBoardInfo and VirtMachineState" Signed-off-by: Andrew Jones <drjo...@redhat.com> --- hw/arm/virt.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/arm/virt.c b/hw/

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

2016-12-09 Thread Andrew Jones
On Fri, Dec 09, 2016 at 04:08:00PM +, Andre Przywara wrote: > On 08/12/16 17:50, Andrew Jones wrote: > > +u32 gicv3_iar_irqnr(u32 iar) > > +{ > > + return iar; > > I am probably a bit paranoid here, but the spec says that the interrupt > ID is in bits[23:0] onl

Re: [Qemu-devel] [PATCH] pflash_cfi01: fix per device sector length in CFI table

2017-01-12 Thread Andrew Jones
On Thu, Jan 12, 2017 at 10:42:41AM +, Peter Maydell wrote: > On 12 January 2017 at 10:35, David Engraf wrote: > > The CFI entry for sector length must be set to sector length per device. > > This is important for boards using multiple devices like the ARM Vexpress > >

Re: [Qemu-devel] [kvm-unit-tests PATCH v6 2/3] run_tests: put logs into per-test file

2017-01-12 Thread Andrew Jones
ch" "$check" "$accel" "$timeout" > testname=${BASH_REMATCH[1]} > smp=1 > kernel="" > @@ -45,6 +54,6 @@ function for_each_unittest() > timeout=${BASH_REMATCH[1]} > fi > done > - "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" > "$accel" "$timeout" > + run_task "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" > "$check" "$accel" "$timeout" > exec {fd}<&- > } > diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh > index d2bae19..3c1938e 100755 > --- a/scripts/mkstandalone.sh > +++ b/scripts/mkstandalone.sh > @@ -5,7 +5,7 @@ if [ ! -f config.mak ]; then > exit 1 > fi > source config.mak > -source scripts/functions.bash > +source scripts/common.bash > > escape () > { > -- > 2.7.4 > > Reviewed-by: Andrew Jones <drjo...@redhat.com>

Re: [Qemu-devel] [kvm-unit-tests PATCH v6 1/3] run_tests: fix errno for param parsing

2017-01-12 Thread Andrew Jones
gt; --- a/run_tests.sh > +++ b/run_tests.sh > @@ -41,7 +41,7 @@ while getopts "g:hv" opt; do > verbose="yes" > ;; > *) > -exit 1 > +exit 2 > ;; > esac > done > -- > 2.7.4 > > Reviewed-by: Andrew Jones <drjo...@redhat.com>

Re: [Qemu-devel] [kvm-unit-tests PATCH v6 3/3] run_tests: allow run tests in parallel

2017-01-12 Thread Andrew Jones
ttest() > @@ -22,6 +30,8 @@ function for_each_unittest() > local accel > local timeout > > + trap "wait; exit 130" SIGINT > + > exec {fd}<"$unittests" > > while read -u $fd line; do > @@ -55,5 +65,9 @@ function for_each_unittest() > fi > done > run_task "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" > "$check" "$accel" "$timeout" > + > + # wait until all tasks finish > + wait > + > exec {fd}<&- > } > -- > 2.7.4 > > Reviewed-by: Andrew Jones <drjo...@redhat.com>

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 1/2] run_tests: put logs into per-test file

2017-01-11 Thread Andrew Jones
On Wed, Jan 11, 2017 at 10:06:07AM +0100, Andrew Jones wrote: > On Wed, Jan 11, 2017 at 01:29:34PM +0800, Peter Xu wrote: > > We were using test.log before to keep all the test logs. This patch > > creates one log file per test case under logs/ directory with name > > "TE

Re: [Qemu-devel] [kvm-unit-tests PATCH v4 2/2] run_tests: allow run tests in parallel

2017-01-10 Thread Andrew Jones
On Mon, Jan 09, 2017 at 12:04:54PM +0800, Peter Xu wrote: > run_task.sh is getting slow. This patch is trying to make it faster by > running the tests concurrently. > > We provide a new parameter "-j" for the run_tests.sh, which can be used > to specify how many run queues we want for the tests.

Re: [Qemu-devel] [kvm-unit-tests PATCH v4 1/2] run_tests: put logs into per-test file

2017-01-10 Thread Andrew Jones
On Mon, Jan 09, 2017 at 12:04:53PM +0800, Peter Xu wrote: > We were using test.log before to keep all the test logs. This patch > creates one log file per test case under logs/ directory with name > "TESTNAME.log". Meanwhile, we will keep the last time log into > logs.old/. > > Renaming

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 1/2] run_tests: put logs into per-test file

2017-01-11 Thread Andrew Jones
ATCH[1]} > smp=1 > kernel="" > @@ -45,6 +54,6 @@ function for_each_unittest() > timeout=${BASH_REMATCH[1]} > fi > done > - "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" "$check" > "$accel" "$timeout" > + run_task "$cmd" "$testname" "$groups" "$smp" "$kernel" "$opts" "$arch" > "$check" "$accel" "$timeout" > exec {fd}<&- > } > diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh > index d2bae19..3c1938e 100755 > --- a/scripts/mkstandalone.sh > +++ b/scripts/mkstandalone.sh > @@ -5,7 +5,7 @@ if [ ! -f config.mak ]; then > exit 1 > fi > source config.mak > -source scripts/functions.bash > +source scripts/common.bash > > escape () > { > -- > 2.7.4 > > Reviewed-by: Andrew Jones <drjo...@redhat.com>

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 2/2] run_tests: allow run tests in parallel

2017-01-11 Thread Andrew Jones
On Wed, Jan 11, 2017 at 12:00:23PM +0100, Andrew Jones wrote: > On Wed, Jan 11, 2017 at 01:29:35PM +0800, Peter Xu wrote: > > run_task.sh is getting slow. This patch is trying to make it faster by > > running the tests concurrently. > > > > We provide a new paramete

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 2/2] run_tests: allow run tests in parallel

2017-01-11 Thread Andrew Jones
On Wed, Jan 11, 2017 at 01:29:35PM +0800, Peter Xu wrote: > run_task.sh is getting slow. This patch is trying to make it faster by > running the tests concurrently. > > We provide a new parameter "-j" for the run_tests.sh, which can be used > to specify how many run queues we want for the tests.

Re: [Qemu-devel] [kvm-unit-tests PATCH v5 1/2] run_tests: put logs into per-test file

2017-01-11 Thread Andrew Jones
On Wed, Jan 11, 2017 at 06:12:44PM +0800, Peter Xu wrote: > On Wed, Jan 11, 2017 at 10:51:12AM +0100, Andrew Jones wrote: > > On Wed, Jan 11, 2017 at 10:06:07AM +0100, Andrew Jones wrote: > > > On Wed, Jan 11, 2017 at 01:29:34PM +0800, Peter Xu wrote: > > > > We were

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, > >

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 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 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 <c...@codeaurora.org> > >> > >> Ensure

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 <drjo...@redhat.com> wrote: > > Thanks for making me look, I was simply assuming we were in the while > > loops above. > > > > I couldn't get the

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

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] [kvm-unit-tests RFC 03/15] arm/arm64: ITS skeleton

2016-12-06 Thread Andrew Jones
t; eabiobjs = lib/arm/eabi_compat.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/l

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

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

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, ...) >*

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

2016-12-01 Thread Andrew Jones
newly defined macros. > > Signed-off-by: Christopher Covington <c...@codeaurora.org> > Signed-off-by: Wei Huang <w...@redhat.com> > Reviewed-by: Andrew Jones <drjo...@redhat.com> > --- > arm/Makefile.common | 3 ++- > arm/pmu.c | 62 > +++

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

2016-12-01 Thread Andrew Jones
-icount option in TCG mode in the configuration file. > > Signed-off-by: Christopher Covington <c...@codeaurora.org> > Signed-off-by: Wei Huang <w...@redhat.com> > Reviewed-by: Andrew Jones <drjo...@redhat.com> > --- > arm/pmu.c | 123 > +

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 3/4] arm: pmu: Check cycle count increases

2016-12-01 Thread Andrew Jones
Christopher Covington <c...@codeaurora.org> > Signed-off-by: Wei Huang <w...@redhat.com> > Reviewed-by: Andrew Jones <drjo...@redhat.com> > --- > arm/pmu.c | 94 > +++ > 1 file changed, 94 insertions(+) > >

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] [Bug 1653063] [NEW] qemu-system-arm hangs with -icount and -nodefaults

2016-12-29 Thread Andrew Jones
On Thu, Dec 29, 2016 at 08:02:16AM -, Hansni Bu wrote: > Public bug reported: ... > https://bugs.launchpad.net/bugs/1653063 ... > After console prints the message below: > "Uncompressing > Linux.. > done, booting the

[Qemu-devel] [PATCH v2 09/16] hw/arm/virt: move VirtMachineState/Class to virt.h

2017-01-02 Thread Andrew Jones
In preparation to share more Virt machine state than just guest-info with other mach-virt source files, move the State and Class structures to virt.h Signed-off-by: Andrew Jones <drjo...@redhat.com> Reviewed-by: Igor Mammedov <imamm...@redhat.com> Acked-by: Michael S. Tsirkin <

[Qemu-devel] [PATCH v2 08/16] hw/arm/virt: remove include/hw/arm/virt-acpi-build.h

2017-01-02 Thread Andrew Jones
include/hw/arm/virt-acpi-build.h is only used for VirtGuestInfo, which doesn't even necessarily have to be ACPI specific. Move VirtGuestInfo to include/hw/arm/virt.h, allowing us to remove include/hw/arm/virt-acpi-build.h, and to prepare for even more code motion. Signed-off-by: Andrew Jones

[Qemu-devel] [PATCH v2 04/16] hw/arm/virt-acpi-build: fadt: improve flag naming

2017-01-02 Thread Andrew Jones
Signed-off-by: Andrew Jones <drjo...@redhat.com> --- hw/arm/virt-acpi-build.c| 4 ++-- include/hw/acpi/acpi-defs.h | 6 ++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index b6b64296f119..a6c6180f4bce 100644 --

[Qemu-devel] [PATCH v2 06/16] hw/arm/virt: use VirtMachineState.gic_version

2017-01-02 Thread Andrew Jones
-by: Andrew Jones <drjo...@redhat.com> Reviewed-by: Igor Mammedov <imamm...@redhat.com> Acked-by: Michael S. Tsirkin <m...@redhat.com> --- hw/arm/virt.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/hw/arm/virt.c b/h

[Qemu-devel] [PATCH v2 02/16] hw/arm/virt-acpi-build: name GIC CPU Interface Structure appropriately

2017-01-02 Thread Andrew Jones
Also move the enabled flag definition from mach-virt code to acpi common. Signed-off-by: Andrew Jones <drjo...@redhat.com> --- hw/arm/virt-acpi-build.c | 8 include/hw/acpi/acpi-defs.h | 9 ++--- include/hw/arm/virt-acpi-build.h | 2 -- 3 files changed, 10 inse

[Qemu-devel] [PATCH v2 15/16] hw/arm/virt-acpi-build: use SMC if booting in EL2

2017-01-02 Thread Andrew Jones
Signed-off-by: Andrew Jones <drjo...@redhat.com> --- hw/arm/virt-acpi-build.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index b5e17a680d51..7c00ee683f44 100644 --- a/hw/arm/virt-acpi-build.c +++ b/

[Qemu-devel] [PATCH v2 12/16] hw/arm/virt-acpi-build: don't save VirtGuestInfo on AcpiBuildState

2017-01-02 Thread Andrew Jones
We can get to VirtMachineState without the need for saving a pointer on AcpiBuildState. This is the mach-virt equivalent to "acpi: Don't save PcGuestInfo on AcpiBuildState" Signed-off-by: Andrew Jones <drjo...@redhat.com> Acked-by: Michael S. Tsirkin <m...@redhat.com>

[Qemu-devel] [PATCH v2 14/16] hw/arm/virt-acpi-build: Don't incorrectly claim architectural timer to be edge-triggered

2017-01-02 Thread Andrew Jones
This is the ACPI equivalent to "hw/arm/virt: Don't incorrectly claim architectural timer to be edge-triggered" which fixes the DT for machine types 2.9 and later. Signed-off-by: Andrew Jones <drjo...@redhat.com> Acked-by: Michael S. Tsirkin <m...@redhat.com> --- hw/arm/vir

[Qemu-devel] [PATCH v2 00/16] Remove VirtGuestInfo

2017-01-02 Thread Andrew Jones
are cleanups to mach-virt's acpi code. Patches available here https://github.com/rhdrjones/qemu/commits/virt/remove-guest-info-v2 Andrew Jones (16): hw/arm/virt-acpi-build: add all missing cpu_to_le's hw/arm/virt-acpi-build: name GIC CPU Interface Structure appropriately hw/arm/virt-acpi-build

[Qemu-devel] [PATCH v2 05/16] hw/arm/virt: parameter passing cleanups

2017-01-02 Thread Andrew Jones
Some simple cleanups made possible by "hw/arm/virt: Merge VirtBoardInfo and VirtMachineState" Signed-off-by: Andrew Jones <drjo...@redhat.com> Reviewed-by: Igor Mammedov <imamm...@redhat.com> Acked-by: Michael S. Tsirkin <m...@redhat.com> --- hw/arm/virt.c | 19

[Qemu-devel] [PATCH v2 03/16] hw/arm/virt-acpi-build: gtdt: improve flag naming

2017-01-02 Thread Andrew Jones
Also remove all unused flags. Signed-off-by: Andrew Jones <drjo...@redhat.com> --- hw/arm/virt-acpi-build.c| 10 +- include/hw/acpi/acpi-defs.h | 17 ++--- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-b

[Qemu-devel] [PATCH v2 01/16] hw/arm/virt-acpi-build: add all missing cpu_to_le's

2017-01-02 Thread Andrew Jones
Signed-off-by: Andrew Jones <drjo...@redhat.com> --- hw/arm/virt-acpi-build.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index d4160dfa7d34..f4b43562287a 100644 --- a/hw/arm/vir

[Qemu-devel] [PATCH v2 07/16] hw/arm/virt: eliminate struct VirtGuestInfoState

2017-01-02 Thread Andrew Jones
Instead of allocating a new struct just for VirtGuestInfo and the machine_done Notifier, place them inside VirtMachineState. This is the mach-virt equivalent of "pc: Eliminate struct PcGuestInfoState" Suggested-by: Eduardo Habkost <ehabk...@redhat.com> Signed-off-by: An

[Qemu-devel] [PATCH v2 16/16] hw/arm/virt-acpi-build: madt: add vgic maint irq

2017-01-02 Thread Andrew Jones
When virtualization is enabled and we have a v3 gic, then we add the vgic maintenance interrupt to the DT. This patch is the ACPI equivalent. Signed-off-by: Andrew Jones <drjo...@redhat.com> --- hw/arm/virt-acpi-build.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/arm/vir

[Qemu-devel] [PATCH v2 10/16] hw/arm/virt: pass VirtMachineState instead of VirtGuestInfo

2017-01-02 Thread Andrew Jones
Only two functions take VirtGuestInfo parameters. Now that guest-info is part of VirtMachineState, and VirtMachineState is defined in the virt header, pass that instead. Signed-off-by: Andrew Jones <drjo...@redhat.com> Reviewed-by: Igor Mammedov <imamm...@redhat.com> Acked-by: Michae

[Qemu-devel] [PATCH v2 11/16] hw/arm/virt-acpi-build: remove redundant members from VirtGuestInfo

2017-01-02 Thread Andrew Jones
Now that we pass VirtMachineState, and guest-info is just part of that state, we can remove all the redundant members and access the VirtMachineState directly. Signed-off-by: Andrew Jones <drjo...@redhat.com> Reviewed-by: Igor Mammedov <imamm...@redhat.com> Acked-by: Michael S

[Qemu-devel] [PATCH v2 13/16] hw/arm/virt: remove VirtGuestInfo

2017-01-02 Thread Andrew Jones
by moving VirtGuestInfo.fw_cfg to VirtMachineState. This is the mach-virt equivalent of "pc: Move PcGuestInfo.fw_cfg to PCMachineState" and "pc: Eliminate PcGuestInfo struct" combined. Signed-off-by: Andrew Jones <drjo...@redhat.com> Acked-by: Michael S. Tsirkin <m...

Re: [Qemu-devel] [kvm-unit-tests PATCH v3 2/2] run_tests: allow run tests in parallel

2017-01-06 Thread Andrew Jones
On Fri, Jan 06, 2017 at 11:33:01AM +0800, Peter Xu wrote: > run_task.sh is getting slow. This patch is trying to make it faster by > running the tests concurrently. > > We provide a new parameter "-j" for the run_tests.sh, which can be used > to specify how many run queues we want for the tests.

Re: [Qemu-devel] [kvm-unit-tests PATCH v3 1/2] run_tests: put logs into per-test file

2017-01-06 Thread Andrew Jones
On Fri, Jan 06, 2017 at 11:33:00AM +0800, Peter Xu wrote: > We were using test.log before to keep all the test logs. This patch > creates one log file per test case under logs/ directory with name > "TESTNAME.log". > > A new file global.bash is added to store global informations. > >

Re: [Qemu-devel] [PATCH 23/23] hw/arm/virt: Add board property to enable EL2

2016-12-28 Thread Andrew Jones
, and report the > virtualization support in the GICv3 device tree node. > > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > --- > hw/arm/virt.c | 45 +++-- > 1 file changed, 43 insertions(+), 2 deletions(-) > Reviewed-by: Andrew Jones <drjo...@redhat.com>

Re: [Qemu-devel] [PATCH] doc/pcie: correct command line examples

2016-12-28 Thread Andrew Jones
On Wed, Dec 28, 2016 at 03:24:30PM +0200, Marcel Apfelbaum wrote: > On 12/27/2016 09:40 AM, Cao jin wrote: > > Nit picking: Multi-function PCI Express Root Ports should mean that > > 'addr' property is mandatory, and slot is optional because it is default > > to 0, and 'chassis' is mandatory for

Re: [Qemu-devel] [PATCH 22/23] target-arm: Enable EL2 feature bit on A53 and A57

2016-12-28 Thread Andrew Jones
.@linaro.org> > --- > target-arm/cpu.h | 2 ++ > hw/arm/virt.c| 4 > hw/arm/xlnx-zynqmp.c | 2 ++ > target-arm/cpu.c | 12 > target-arm/cpu64.c | 2 ++ > 5 files changed, 22 insertions(+) > Reviewed-by: Andrew Jones <drjo...@redhat.com>

Re: [Qemu-devel] [PATCH 21/23] hw/arm/virt: Support using SMC for PSCI

2016-12-28 Thread Andrew Jones
HVC. > > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > --- > hw/arm/virt.c | 29 ++--- > 1 file changed, 22 insertions(+), 7 deletions(-) > Reviewed-by: Andrew Jones <drjo...@redhat.com>

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

2016-12-27 Thread Andrew Jones
On Tue, Dec 27, 2016 at 10:27:25AM -0500, Christopher Covington wrote: > On 12/09/2016 07:15 AM, Andrew Jones wrote: > > On Fri, Dec 09, 2016 at 11:41:06AM +, Andre Przywara wrote: > >> Hi, > >> > >> On 08/12/16 17:50, Andrew Jones wrote: > >>&

Re: [Qemu-devel] [kvm-unit-tests PATCH v8 00/14] VT-d unit test

2016-12-22 Thread Andrew Jones
Alex, Are you happy with v8? If so, then, as far as I'm concerned, this series is ready. I'd like to try driving the edu device from ARM tests too. Thanks, drew On Mon, Dec 12, 2016 at 11:08:06AM +0800, Peter Xu wrote: > This is v8 of vt-d unit test series. > > (CC qemu-devel list this

Re: [Qemu-devel] [PATCH 01/23] target-arm: Log AArch64 exception returns

2016-12-20 Thread Andrew Jones
On Tue, Dec 13, 2016 at 10:36:02AM +, Peter Maydell wrote: > We already log exception entry; add logging of the AArch64 exception > return path as well. > > Signed-off-by: Peter Maydell > Reviewed-by: Edgar E. Iglesias > --- >

Re: [Qemu-devel] [PATCH 06/23] hw/arm/virt: Rename 'vbi' variables to 'vms'

2016-12-20 Thread Andrew Jones
' > this commit is purely a search-and-replace of 'vbi' with 'vms'. > > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > --- > hw/arm/virt.c | 489 > +- > 1 file changed, 244 insertions(+), 245 delet

Re: [Qemu-devel] [PATCH 00/23] arm: Add virtualization to GICv3, and enable EL2 on 64-bit CPUs

2016-12-16 Thread Andrew Jones
On Tue, Dec 13, 2016 at 10:36:01AM +, Peter Maydell wrote: > This patchset adds support for the Virtualization extensions to QEMU's > GICv3 emulation. This was the last missing piece that was stopping > us from turning on the EL2 support in the CPU model, so the patchset > also adds support

Re: [Qemu-devel] [PATCH v3] Allow setting NUMA distance for different NUMA nodes

2017-03-23 Thread Andrew Jones
On Thu, Mar 23, 2017 at 03:23:35PM +0800, He Chen wrote: > > > > And maybe should also point out how to set an unreachable node with 255. > > > Thanks for your careful review. Regarding setting unreachable node, > which way is good? Set exact 255 as distance or distance that is larger > than 255

Re: [Qemu-devel] [PATCH v2 6/9] [optional] hw: misc: added testdev for smmu

2017-03-27 Thread Andrew Jones
On Mon, Aug 22, 2016 at 09:47:37PM +0530, Prem Mallappa wrote: > A simple PCI device which does DMA from 'src' to 'dst' given > src_addr, dst_addr and size, and is used by unit test. uses > pci_dma_read and pci_dma_write in a crude way but serves the purpose. > > Signed-off-by: Prem Mallappa

Re: [Qemu-devel] [PATCH v3] Allow setting NUMA distance for different NUMA nodes

2017-03-30 Thread Andrew Jones
On Thu, Mar 30, 2017 at 12:00:48PM -0300, Eduardo Habkost wrote: > On Wed, Mar 29, 2017 at 02:30:38PM +0200, Andrew Jones wrote: > > On Wed, Mar 29, 2017 at 01:44:58PM +0200, Igor Mammedov wrote: > > > On Wed, 29 Mar 2017 16:50:00 +0800 > > > He Chen <

Re: [Qemu-devel] [PATCH v3] Allow setting NUMA distance for different NUMA nodes

2017-03-29 Thread Andrew Jones
On Wed, Mar 29, 2017 at 01:44:58PM +0200, Igor Mammedov wrote: > On Wed, 29 Mar 2017 16:50:00 +0800 > He Chen wrote: > > > > +static void default_numa_distance(void) > > > > +{ > > > > +int src, dst; > > > > + > > > fill in defaults only if there weren't any '-numa

Re: [Qemu-devel] [PATCH v2] x86: Allow to set NUMA distance for different NUMA nodes

2017-03-16 Thread Andrew Jones
On Thu, Mar 16, 2017 at 04:38:24PM +0800, He Chen wrote: > Current, QEMU does not provide a clear command to set vNUMA distance for > guest although we already have `-numa` command to set vNUMA nodes. > > vNUMA distance makes sense in certain scenario. > But now, if we create a guest that has 4

Re: [Qemu-devel] [PATCH v2] x86: Allow to set NUMA distance for different NUMA nodes

2017-03-16 Thread Andrew Jones
On Thu, Mar 16, 2017 at 04:38:24PM +0800, He Chen wrote: > Current, QEMU does not provide a clear command to set vNUMA distance for > guest although we already have `-numa` command to set vNUMA nodes. > > vNUMA distance makes sense in certain scenario. > But now, if we create a guest that has 4

Re: [Qemu-devel] [PATCH for-2.9] virtio: Fix error handling in virtio_bus_device_plugged

2017-03-17 Thread Andrew Jones
On Fri, Mar 17, 2017 at 07:33:53PM +0800, Fam Zheng wrote: > For one thing we shouldn't continue if an error happened, for the other > two steps failing can cause an abort() in error_setg because we reuse > the same errp blindly. > > Add error handling checks to fix both issues. > >

Re: [Qemu-devel] [PATCH] configure: Warn about deprecated hosts

2017-03-17 Thread Andrew Jones
On Fri, Mar 17, 2017 at 11:49:53AM +, Daniel P. Berrange wrote: > On Fri, Mar 17, 2017 at 11:08:22AM +, Peter Maydell wrote: > > This list is definitely too all-encompassing, and we should > > move at least some of the BSDs into "not-deprecated". > > I'm posting the patch for the moment

Re: [Qemu-devel] [PATCH for-2.9 v2] virtio: Fix error handling in virtio_bus_device_plugged

2017-03-17 Thread Andrew Jones
(local_err) { > +error_propagate(errp, local_err); > +return; > +} > > if (klass->device_plugged != NULL) { > -klass->device_plugged(qbus->parent, errp); > +klass->device_plugged(qbus->parent, _err); > +} > +if (local_err) { > +error_propagate(errp, local_err); > +return; > } > > if (klass->get_dma_as != NULL && has_iommu) { > -- > 2.9.3 > > Reviewed-by: Andrew Jones <drjo...@redhat.com>

Re: [Qemu-devel] [PATCH v3] Allow setting NUMA distance for different NUMA nodes

2017-03-22 Thread Andrew Jones
You should have CC'ed me, considering this version is addressing my review comments, but whatever, I usually skim the list so I found it... On Wed, Mar 22, 2017 at 05:32:46PM +0800, He Chen wrote: > Current, QEMU does not provide a clear command to set vNUMA distance for > guest although we

Re: [Qemu-devel] [PATCH v4] Allow setting NUMA distance for different NUMA nodes

2017-04-03 Thread Andrew Jones
On Sat, Apr 01, 2017 at 06:25:26PM +0800, He Chen wrote: > Current, QEMU does not provide a clear command to set vNUMA distance for > guest although we already have `-numa` command to set vNUMA nodes. > > vNUMA distance makes sense in certain scenario. > But now, if we create a guest that has 4

Re: [Qemu-devel] [PATCH v5] Allow setting NUMA distance for different NUMA nodes

2017-04-06 Thread Andrew Jones
On Thu, Apr 06, 2017 at 10:18:53AM +0800, He Chen wrote: > This patch is going to add SLIT table support in QEMU, and provides > additional option `dist` for command `-numa` to allow user set vNUMA > distance by QEMU command. > > With this patch, when a user wants to create a guest that contains

Re: [Qemu-devel] [PATCH] hw/arm/virt: generate 64-bit addressable ACPI objects

2017-04-07 Thread Andrew Jones
> +++ b/include/hw/acpi/acpi-defs.h > @@ -238,6 +238,17 @@ struct AcpiRsdtDescriptorRev1 > typedef struct AcpiRsdtDescriptorRev1 AcpiRsdtDescriptorRev1; > > /* > + * ACPI 2.0 eXtended System Description Table (XSDT) > + */ > +struct AcpiXsdtDescriptorRev2 > +{ > +ACPI_TABLE_HEADER_DEF /* ACPI common table header */ > +uint64_t table_offset_entry[0]; /* Array of pointers to other */ > +/* ACPI tables */ > +} QEMU_PACKED; > +typedef struct AcpiXsdtDescriptorRev2 AcpiXsdtDescriptorRev2; > + > +/* > * ACPI 1.0 Firmware ACPI Control Structure (FACS) > */ > struct AcpiFacsDescriptorRev1 > -- > 2.9.3 > > Otherwise Reviewed-by: Andrew Jones <drjo...@redhat.com>

Re: [Qemu-devel] [PATCH v6] Allow setting NUMA distance for different NUMA nodes

2017-04-11 Thread Andrew Jones
pus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}] > @itemx -numa > node[,memdev=@var{id}][,cpus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}] > +@itemx -numa dist,src=@var{source},dst=@var{destination},val=@var{distance} > @findex -numa > Define a NUMA node and assign RAM and VCPUs to it. > +Set the NUMA distance from a source node to a destination node. > > @var{firstcpu} and @var{lastcpu} are CPU indexes. Each > @samp{cpus} option represent a contiguous range of CPU indexes > @@ -167,6 +170,17 @@ split equally between them. > @samp{mem} and @samp{memdev} are mutually exclusive. Furthermore, > if one node uses @samp{memdev}, all of them have to use it. > > +@var{source} and @var{destination} are NUMA node IDs. > +@var{distance} is the NUMA distance from @var{source} to @var{destination}. > +The distance from a node to itself is always 10. If any pair of nodes is > +given a distance, then all pairs must be given distances. Although, when > +distances are only given in one direction for each pair of nodes, then > +the distances in the opposite directions are assumed to be the same. If, > +however, an asymmetrical pair of distances is given for even one node > +pair, then all node pairs must be provided distance values for both > +directions, even when they are symmetrical. When a node is unreachable > +from another node, set the pair's distance to 255. > + > Note that the -@option{numa} option doesn't allocate any of the > specified resources, it just assigns existing resources to NUMA > nodes. This means that one still has to use the @option{-m}, > -- > 2.7.4 > > Besides the "", looks good to me Reviewed-by: Andrew Jones <drjo...@redhat.com>

Re: [Qemu-devel] [PATCH 2/2] arm: kvm: set MPIDR when we can

2017-03-02 Thread Andrew Jones
On Thu, Mar 02, 2017 at 04:13:40PM +, Peter Maydell wrote: > On 27 February 2017 at 17:37, Andrew Jones <drjo...@redhat.com> wrote: > > If KVM supports user provided MPIDRs for the vcpus, then provide > > them. This simplifies management of vcpus as we can be sure of >

[Qemu-devel] [PATCH] [RFT] target/arm/arm-powerctl: Fix psci info return values

2017-03-03 Thread Andrew Jones
The power state spec section 5.1.5 AFFINITY_INFO defines the affinity info return values as 0 ON 1 OFF 2 ON_PENDING I grepped QEMU for power_state to ensure that no assumptions of OFF=0 were being made. Signed-off-by: Andrew Jones <drjo...@redhat.com> --- I found this with t

Re: [Qemu-devel] [PATCH 21/28] arm: replace cpu_arm_init() with cpu_generic_init()

2017-08-14 Thread Andrew Jones
uot;Unable to find CPU definition"); > diff --git a/target/arm/helper.c b/target/arm/helper.c > index 2594faa..86e69a6 100644 > --- a/target/arm/helper.c > +++ b/target/arm/helper.c > @@ -5237,11 +5237,6 @@ void register_cp_regs_for_features(ARMCPU *cpu) > } > } > > -ARMCPU *cpu_arm_init(const char *cpu_model) > -{ > -return ARM_CPU(cpu_generic_init(TYPE_ARM_CPU, cpu_model)); > -} > - > void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu) > { > CPUState *cs = CPU(cpu); > -- > 2.7.4 > > I agree with the motivation described in the cover letter and the changes (which are even mostly verified by the compiler) look good to me. Reviewed-by: Andrew Jones <drjo...@redhat.com>

Re: [Qemu-devel] [PATCH 2/3] target/arm/kvm: split pmu init from creation

2017-07-18 Thread Andrew Jones
On Tue, Jul 18, 2017 at 01:44:34PM +0100, Peter Maydell wrote: > On 18 July 2017 at 13:38, Andrew Jones <drjo...@redhat.com> wrote: > > On Mon, Jul 10, 2017 at 04:27:35PM +0100, Peter Maydell wrote: > >> On 1 July 2017 at 17:47, Andrew Jones <drjo...@redhat.com> w

Re: [Qemu-devel] [PATCH 2/3] target/arm/kvm: split pmu init from creation

2017-07-18 Thread Andrew Jones
On Mon, Jul 10, 2017 at 04:27:35PM +0100, Peter Maydell wrote: > On 1 July 2017 at 17:47, Andrew Jones <drjo...@redhat.com> wrote: > > When adding a PMU with a userspace irqchip we only do the INIT > > stage of the device creation. > > Can you explain why? My assu

Re: [Qemu-devel] virtio-net-pci possible limitation on AArch64

2017-07-24 Thread Andrew Jones
On Fri, Jul 21, 2017 at 06:37:26PM +, Alexandru Avadanii wrote: > Hi, > I ran into an interesting limitation (or possibly bug) while trying to attach > more than 3 (three) virtio-net-pci NICs to an AArch64 guest. > I created 4 network with virsh (see below for xml defitions) - nothing fancy,

Re: [Qemu-devel] virtio-net-pci possible limitation on AArch64

2017-07-25 Thread Andrew Jones
> > > > > >function='0x0'/> > > > > > > > >function='0x0'/> > > > > > > > > >

[Qemu-devel] [PATCH v2 2/4] target/arm/kvm: pmu: split init and set-irq stages

2017-07-19 Thread Andrew Jones
When adding a PMU with a userspace irqchip we skip the set-irq stage of device creation. Split the 'create' function into two functions 'init' and 'set-irq' so they may be called separately. Signed-off-by: Andrew Jones <drjo...@redhat.com> --- hw/arm/virt.c| 11 +-- targ

[Qemu-devel] [PATCH v2 4/4] target/arm/kvm: pmu: improve error handling

2017-07-19 Thread Andrew Jones
the capability was introduced. Let's just abort if this should-never-happen stuff does happen, because, if it does, then something is obviously horribly wrong. Signed-off-by: Andrew Jones <drjo...@redhat.com> --- hw/arm/virt.c| 9 +++-- target/arm/kvm32.c | 3 +-- target/arm

[Qemu-devel] [PATCH v2 0/4] ARM: KVM: Enable in-kernel PMU with user space gic

2017-07-19 Thread Andrew Jones
v2: - renamed the kvm pmu 'create' function to 'set_irq' after doing the create/set-irq split - added another patch that improves the error handling of the kvm pmu init and set-irq calls Andrew Jones (4): hw/arm/virt: add pmu interrupt state target/arm/kvm: pmu: split init and set-irq

[Qemu-devel] [PATCH v2 3/4] hw/arm/virt: allow pmu instantiation with userspace irqchip

2017-07-19 Thread Andrew Jones
Move the in-kernel-irqchip test to only guard the set-irq stage, not the init stage of the PMU. Also add the PMU to the KVM device irq line synchronization to enable its use. Signed-off-by: Andrew Jones <drjo...@redhat.com> --- hw/arm/virt.c | 3 ++- target/arm/kvm.c | 6 +-

[Qemu-devel] [PATCH v2 1/4] hw/arm/virt: add pmu interrupt state

2017-07-19 Thread Andrew Jones
Mimicking gicv3-maintenance-interrupt, add the PMU's interrupt to CPU state. Signed-off-by: Andrew Jones <drjo...@redhat.com> Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> --- hw/arm/virt.c| 3 +++ target/arm/cpu.c | 2 ++ target/arm/cpu.h | 2 ++ 3 files changed,

Re: [Qemu-devel] [PATCH v2 1/4] hw/arm/virt: add pmu interrupt state

2017-07-21 Thread Andrew Jones
On Fri, Jul 21, 2017 at 01:16:07PM +0200, Christoffer Dall wrote: > On Wed, Jul 19, 2017 at 09:39:54AM -0400, Andrew Jones wrote: > > Mimicking gicv3-maintenance-interrupt, add the PMU's interrupt to > > CPU state. > > > > Signed-off-by: Andrew Jones <drjo...@redh

[Qemu-devel] [PATCH 0/3] ARM: KVM: Enable in-kernel PMU with user space gic

2017-07-01 Thread Andrew Jones
Andrew Jones (3): hw/arm/virt: add pmu interrupt state target/arm/kvm: split pmu init from creation hw/arm/virt: allow pmu instantiation with userspace irqchip hw/arm/virt.c| 13 +++-- target/arm/cpu.c | 2 ++ target/arm/cpu.h | 2 ++ target/arm/kvm.c | 6

[Qemu-devel] [PATCH 1/3] hw/arm/virt: add pmu interrupt state

2017-07-01 Thread Andrew Jones
Mimicking gicv3-maintenance-interrupt, add the PMU's interrupt to CPU state. Signed-off-by: Andrew Jones <drjo...@redhat.com> --- hw/arm/virt.c| 3 +++ target/arm/cpu.c | 2 ++ target/arm/cpu.h | 2 ++ 3 files changed, 7 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c

[Qemu-devel] [PATCH 2/3] target/arm/kvm: split pmu init from creation

2017-07-01 Thread Andrew Jones
When adding a PMU with a userspace irqchip we only do the INIT stage of the device creation. Signed-off-by: Andrew Jones <drjo...@redhat.com> --- hw/arm/virt.c| 10 -- target/arm/kvm32.c | 6 ++ target/arm/kvm64.c

[Qemu-devel] [PATCH 3/3] hw/arm/virt: allow pmu instantiation with userspace irqchip

2017-07-01 Thread Andrew Jones
Move the in-kernel-irqchip test to only guard the creation, not the init'ing of the PMU. Also add the PMU to the KVM device irq line synchronization to enable its use. Signed-off-by: Andrew Jones <drjo...@redhat.com> --- hw/arm/virt.c | 2 +- target/arm/kvm.c | 6 +- target/arm

Re: [Qemu-devel] [PATCH] ARM: KVM: Enable in-kernel timers with user space gic

2017-06-27 Thread Andrew Jones
On Tue, Jun 27, 2017 at 03:00:10PM +0200, Alexander Graf wrote: > > > +/* XXX PMU IRQ is missing */ > > > > So I was wondering why you chose not to wire up the PMU in order to finish > > Because the PMU IRQ is only available from the machine file, so it'll need > some more plumbing to

Re: [Qemu-devel] [PATCH v3] ARM: KVM: Enable in-kernel timers with user space gic

2017-06-28 Thread Andrew Jones
t; for > timer events. It does not handle PMU events yet. > > Signed-off-by: Alexander Graf <ag...@suse.de> > Reviewed-by: Andrew Jones <drjo...@redhat.com> > > --- > > v1 -> v2: > > - whitespace fixes > - use !! to determine whether bit is s

Re: [Qemu-devel] [PATCH v3] ARM: KVM: Enable in-kernel timers with user space gic

2017-06-28 Thread Andrew Jones
On Wed, Jun 28, 2017 at 02:36:17PM +0200, Alexander Graf wrote: > > > On 28.06.17 13:51, Andrew Jones wrote: > > On Tue, Jun 27, 2017 at 05:35:37PM +0200, Alexander Graf wrote: > > > When running with KVM enabled, you can choose between emulating the > >

Re: [Qemu-devel] [PATCH] ARM: KVM: Enable in-kernel timers with user space gic

2017-06-27 Thread Andrew Jones
On Tue, Jun 27, 2017 at 03:59:51PM +0200, Andrew Jones wrote: > On Tue, Jun 27, 2017 at 03:00:10PM +0200, Alexander Graf wrote: > > > > +/* XXX PMU IRQ is missing */ > > > > > > So I was wondering why you chose not to wire up the PMU in order to finish >

Re: [Qemu-devel] [PATCH for-2.10 14/23] virt-arm: get numa node mapping from possible_cpus instead of numa_get_node_for_cpu()

2017-04-26 Thread Andrew Jones
On Wed, Apr 26, 2017 at 12:54:33PM +0200, Igor Mammedov wrote: > On Tue, 25 Apr 2017 19:06:34 +0200 > Andrew Jones <drjo...@redhat.com> wrote: > > > On Wed, Mar 22, 2017 at 02:32:39PM +0100, Igor Mammedov wrote: > > > Signed-off-by: Igor Mammedov <imamm...@redhat.

Re: [Qemu-devel] [PATCH v9] Allow setting NUMA distance for different NUMA nodes

2017-04-27 Thread Andrew Jones
; +"-numa node[,memdev=id][,cpus=firstcpu[-lastcpu]][,nodeid=node]\n" > +"-numa dist,src=source,dst=destination,val=distance\n", QEMU_ARCH_ALL) > STEXI > @item -numa > node[,mem=@var{size}][,cpus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}] > @itemx -numa > node[,memdev=@var{id}][,cpus=@var{firstcpu}[-@var{lastcpu}]][,nodeid=@var{node}] > +@itemx -numa dist,src=@var{source},dst=@var{destination},val=@var{distance} > @findex -numa > Define a NUMA node and assign RAM and VCPUs to it. > +Set the NUMA distance from a source node to a destination node. > > @var{firstcpu} and @var{lastcpu} are CPU indexes. Each > @samp{cpus} option represent a contiguous range of CPU indexes > @@ -167,6 +170,17 @@ split equally between them. > @samp{mem} and @samp{memdev} are mutually exclusive. Furthermore, > if one node uses @samp{memdev}, all of them have to use it. > > +@var{source} and @var{destination} are NUMA node IDs. > +@var{distance} is the NUMA distance from @var{source} to @var{destination}. > +The distance from a node to itself is always 10. If any pair of nodes is > +given a distance, then all pairs must be given distances. Although, when > +distances are only given in one direction for each pair of nodes, then > +the distances in the opposite directions are assumed to be the same. If, > +however, an asymmetrical pair of distances is given for even one node > +pair, then all node pairs must be provided distance values for both > +directions, even when they are symmetrical. When a node is unreachable > +from another node, set the pair's distance to 255. > + > Note that the -@option{numa} option doesn't allocate any of the > specified resources, it just assigns existing resources to NUMA > nodes. This means that one still has to use the @option{-m}, > -- > 2.7.4 > > Reviewed-by: Andrew Jones <drjo...@redhat.com> Thanks, drew

Re: [Qemu-devel] [PATCH for-2.10 08/23] virt-arm: add node-id property to CPU

2017-04-25 Thread Andrew Jones
On Wed, Mar 22, 2017 at 02:32:33PM +0100, Igor Mammedov wrote: > it will allow switching from cpu_index to property based > numa mapping in follow up patches. > > Signed-off-by: Igor Mammedov > --- > hw/arm/virt.c| 15 +++ > target/arm/cpu.c | 1 + > 2

<    4   5   6   7   8   9   10   11   12   13   >