Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-09-01 Thread Fam Zheng
On Fri, 09/01 16:29, Philippe Mathieu-Daudé wrote: > On 08/30/2017 12:34 AM, Fam Zheng wrote: > > On Tue, 08/29 14:34, Philippe Mathieu-Daudé wrote: > > > > +self._args = [ \ > > > > +"-nodefaults", "-m", "2G", > > > > +"-cpu", "host", > > > > +

Re: [Qemu-devel] [PATCH] target/ppc: Remove old STATUS file

2017-09-01 Thread David Gibson
On Fri, Sep 01, 2017 at 09:38:12AM +0200, Thomas Huth wrote: > The target/ppc/STATUS file has seen its last real update 10 years > ago - so the information in there is not up to date anymore. Since > nobody seems to care about this file, let's simply remove it. > > Signed-off-by: Thomas Huth

Re: [Qemu-devel] [PATCH v19 0/2] virtio-crypto: virtio crypto device specification

2017-09-01 Thread Longpeng (Mike)
Hi Halil, On 2017/9/1 19:45, Halil Pasic wrote: > > > On 09/01/2017 02:47 AM, Longpeng (Mike) wrote: >> Ping... >> >> Stefan, Halil, do you have any suggestion ? >> > > Hi Longpeng, > > I've ran trough your patch, and it reads much better that > what I recall v18 used to read like. Because

Re: [Qemu-devel] [RFC v3 PATCH 4/5] mttcg: Implement implicit ordering semantics

2017-09-01 Thread Emilio G. Cota
On Tue, Aug 29, 2017 at 02:33:12 -0400, Pranith Kumar wrote: > Currently, we cannot use mttcg for running strong memory model guests > on weak memory model hosts due to missing ordering semantics. > > We implicitly generate fence instructions for stronger guests if an This confused me. By "We

Re: [Qemu-devel] [PATCH v6 11/29] libqtest: Inline qtest_query_target_endianness()

2017-09-01 Thread Philippe Mathieu-Daudé
On 09/01/2017 03:03 PM, Eric Blake wrote: There was only one caller; it's easier to inline things. Signed-off-by: Eric Blake Acked-by: Philippe Mathieu-Daudé --- tests/libqtest.c | 22 ++ 1 file changed, 6 insertions(+), 16

Re: [Qemu-devel] [PATCH v6 26/29] fw_cfg-test: Drop dependence on global_qtest

2017-09-01 Thread Philippe Mathieu-Daudé
On 09/01/2017 03:03 PM, Eric Blake wrote: As a general rule, we prefer avoiding implicit global state because it makes code harder to safely copy and paste without thinking about the global state. It turns out that with the recent changes to libqos, fw_cfg-test was not even using global_qtest

Re: [Qemu-devel] [PATCH 00/79] Patch Round-up for stable 2.9.1, freeze on 2017-09-04

2017-09-01 Thread Michael Roth
Quoting Michael Roth (2017-08-31 13:00:00) > Quoting Michael Roth (2017-08-28 19:13:35) > > Hi everyone, > > > > The following new patches are queued for QEMU stable v2.9.1: > > > > > >

Re: [Qemu-devel] [PATCH v6 29/29] libqtest: Rename qtest_init() to qtest_start()

2017-09-01 Thread John Snow
On 09/01/2017 02:03 PM, Eric Blake wrote: > We already have another qtest_init() in the tree, for the > top-level qtest.c device; having two functions with different > signatures is confusing. Rename the libqtest version to > qtest_start() to eliminate the duplication. > > Signed-off-by: Eric

Re: [Qemu-devel] [PATCH v6 28/29] libqtest: Remove qtest_start() and qtest_end() shortcuts

2017-09-01 Thread John Snow
On 09/01/2017 02:03 PM, Eric Blake wrote: > Remove the trivial wrappers qtest_start() and qtest_end(), to make > it obvious in the rest of the testsuite where we are still relying on > global_qtest. Doing this makes it easier to see what remaining > cleanups will be needed if we don't want an

Re: [Qemu-devel] [PATCH v6 17/29] ahci-test: Drop dependence on global_qtest

2017-09-01 Thread John Snow
On 09/01/2017 02:03 PM, Eric Blake wrote: > Managing parallel connections to two different monitors via > the implicit global_qtest makes it hard to copy-and-paste code > to tests that are not aware of the implicit state; the > management of global_qtest is even harder to follow because > it was

Re: [Qemu-devel] [PATCH v6 12/29] libqos: Track QTestState with QPCIBus

2017-09-01 Thread John Snow
On 09/01/2017 02:03 PM, Eric Blake wrote: > When initializing a QPCIBus, track which QTestState the bus is > associated with (so that a later patch can then explicitly use > that test state for all communication on the bus, rather than > blindly relying on global_qtest). Update the

Re: [Qemu-devel] [PATCH v6 14/29] libqos: Use explicit QTestState for fw_cfg operations

2017-09-01 Thread John Snow
On 09/01/2017 02:03 PM, Eric Blake wrote: > Drop one more client of global_qtest by teaching all fw_cfg test > functionality (invoked through alloc-pc) to pass in an explicit > QTestState, adjusting all callers. In particular, fw_cfg-test > had to reorder things to create the test state prior

Re: [Qemu-devel] [PATCH 3/3] Backup Tool: Test for Incremental Backup

2017-09-01 Thread John Snow
On 08/30/2017 10:02 PM, Fam Zheng wrote: > On Thu, 08/31 00:45, Ishani Chugh wrote: >> This patch is the test for incremental backup implementation in Backup tool. >> The test employs two basic subtests: >> 1) Backing up an empty guest and comparing it with base image. >> 2) Writing a pattern to

Re: [Qemu-devel] [PATCH v3 1/3] backup: QEMU Backup Tool

2017-09-01 Thread John Snow
I suggest as your commit message here, something like: "backup: Add QEMU backup tool" A good commit message should say what applying the patch will do: "What will happen if I apply this patch?" "It will 'Add QEMU backup tool'" On 08/30/2017 01:14 PM, Ishani Chugh wrote: > qemu-backup will be a

Re: [Qemu-devel] [PATCH] pixman: drop submodule

2017-09-01 Thread Alistair Francis
On Fri, Sep 1, 2017 at 3:17 PM, Eric Blake wrote: > On 09/01/2017 05:13 PM, Alistair Francis wrote: >> 'On Fri, Sep 1, 2017 at 3:50 AM, Gerd Hoffmann wrote: >>> Drop pixman submodule and support for the "internal" pixman build. >>> pixman should be

Re: [Qemu-devel] [PATCH] pixman: drop submodule

2017-09-01 Thread Eric Blake
On 09/01/2017 05:13 PM, Alistair Francis wrote: > 'On Fri, Sep 1, 2017 at 3:50 AM, Gerd Hoffmann wrote: >> Drop pixman submodule and support for the "internal" pixman build. >> pixman should be reasonable well established meanwhile that we don't > > > Is there any use case

Re: [Qemu-devel] [PATCH] pixman: drop submodule

2017-09-01 Thread Alistair Francis
'On Fri, Sep 1, 2017 at 3:50 AM, Gerd Hoffmann wrote: > Drop pixman submodule and support for the "internal" pixman build. > pixman should be reasonable well established meanwhile that we don't s/reasonable/reasonably/g s/meanwhile/meaning/g > need the fallback submodule any

[Qemu-devel] [Bug 1714538] [NEW] Support for Raspberry Pi 3 Model B

2017-09-01 Thread Taylor Holberton
Public bug reported: The raspberry pi 3 B uses a 64-bit instruction set. It would be useful if qemu could emulate the boardn ** Affects: qemu Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to

[Qemu-devel] [PATCH] x86/acpi: build SRAT when memory hotplug is enabled

2017-09-01 Thread Thadeu Lima de Souza Cascardo
Linux uses SRAT to determine the maximum memory in a system, which is used to determine whether to use the swiotlb for IOMMU or not for a device that supports only 32 bits of addresses. When there is no NUMA configuration, qemu will not build SRAT. And when memory hotplug is done, some Linux

[Qemu-devel] QEMU simpletrace.py

2017-09-01 Thread Derrick McKee
Hi, I am having trouble using the simpleparser.py script in QEMU. Hopefully, I am doing something incorrect and you can quickly set me back on course. I have generated a trace file as per the instructions in docs/devel/tracing.txt. However, whenever I try to run the simpleparser.py script I

[Qemu-devel] [PATCH v2 4/6] xlnx-zynqmp-ipi: Initial version of the Xilinx IPI device

2017-09-01 Thread Alistair Francis
This is the initial version of the Inter Processor Interrupt device. Signed-off-by: Alistair Francis --- default-configs/microblaze-softmmu.mak | 1 + hw/intc/Makefile.objs | 1 + hw/intc/xlnx-zynqmp-ipi.c | 377

[Qemu-devel] [PATCH v2 1/6] xlnx-zynqmp-pmu: Initial commit of the ZynqMP PMU

2017-09-01 Thread Alistair Francis
The Xilinx ZynqMP SoC has two main processing systems in it. The ARM processing system (which is already modeled in QEMU) and the MicroBlaze Power Management Unit (PMU). This is the inital work for adding support for the PMU. The PMU susbsystem runs along side the ARM system on hardware, but due

[Qemu-devel] [PATCH v2 0/6] Add the ZynqMP PMU and IPI

2017-09-01 Thread Alistair Francis
This series adds the ZynqMP Power Management Unit (PMU) machine with basic functionality. The machine only has the CPU and memory connected, but that is enough to run some of the ROM code on the machine. The series also adds the IPI device and connects it to the ZynqMP ARM side and the ZynqMP

[Qemu-devel] [PATCH v2 2/6] xlnx-zynqmp-pmu: Add the CPU and memory

2017-09-01 Thread Alistair Francis
Connect the MicroBlaze CPU and the ROM and RAM memory regions. Signed-off-by: Alistair Francis --- hw/microblaze/xlnx-zynqmp-pmu.c | 65 +++-- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH v2 3/6] aarch64-softmmu.mak: Use an ARM specific config

2017-09-01 Thread Alistair Francis
In preperation for having an ARM and MicroBlaze ZynqMP machine let's split out the current ARM specific config options. Signed-off-by: Alistair Francis --- default-configs/aarch64-softmmu.mak | 1 + hw/arm/Makefile.objs| 2 +-

[Qemu-devel] [PATCH v2 6/6] xlnx-zynqmp: Connect the IPI device to the ZynqMP SoC

2017-09-01 Thread Alistair Francis
Signed-off-by: Alistair Francis --- hw/arm/xlnx-zynqmp.c | 14 ++ include/hw/arm/xlnx-zynqmp.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index 9eceadbdc8..1988cb47f4 100644 ---

[Qemu-devel] [PATCH v2 5/6] xlnx-zynqmp-pmu: Connect the IPI device to the PMU

2017-09-01 Thread Alistair Francis
Signed-off-by: Alistair Francis --- hw/microblaze/xlnx-zynqmp-pmu.c | 28 1 file changed, 28 insertions(+) diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pmu.c index 33584cfa4d..a6c14495ec 100644 ---

Re: [Qemu-devel] [PATCH v3 3/7] Convert single line fprintf(.../n) to warn_report()

2017-09-01 Thread James Hogan
On Fri, Sep 01, 2017 at 09:51:15AM -0700, Alistair Francis wrote: > diff --git a/target/mips/kvm.c b/target/mips/kvm.c > index 3317905e71..a23aa438d2 100644 > --- a/target/mips/kvm.c > +++ b/target/mips/kvm.c > @@ -95,11 +95,11 @@ void kvm_mips_reset_vcpu(MIPSCPU *cpu) > CPUMIPSState *env =

Re: [Qemu-devel] [PATCH 1/8] tcg: Add generic vector infrastructure and ops for add/sub/logic

2017-09-01 Thread Richard Henderson
On 08/29/2017 06:31 PM, Philippe Mathieu-Daudé wrote: > Hi Richard, > > I can't find anything to say about this patch... Hardcore stuff. > Some part could be more a bit more verbose but after a while focusing it makes > sens. > I wonder how long it took you to write this :) "roughly 2h" Not

Re: [Qemu-devel] [PATCH v5 01/12] gitignore: Ignore vm test images

2017-09-01 Thread Philippe Mathieu-Daudé
On 08/31/2017 03:42 AM, Fam Zheng wrote: Reviewed-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Fam Zheng --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index

Re: [Qemu-devel] [PATCH v5 03/12] scripts: Add archive-source.sh

2017-09-01 Thread Philippe Mathieu-Daudé
On 08/31/2017 03:42 AM, Fam Zheng wrote: Signed-off-by: Fam Zheng --- scripts/archive-source.sh | 29 + 1 file changed, 29 insertions(+) create mode 100755 scripts/archive-source.sh diff --git a/scripts/archive-source.sh

Re: [Qemu-devel] [PATCH 1/1] block: add block device shared field

2017-09-01 Thread Eric Blake
On 09/01/2017 03:10 PM, Brian Steffens wrote: > This adds a boolean option called 'shared' to block devices. It defaults > to off/false. When enabled for a particular block device, the 'shared' option > causes the block migration code to skip over syncing of that device. This > allows controlling

Re: [Qemu-devel] [PATCH v3 0/3] docker: Add test-block

2017-09-01 Thread Eric Blake
On 09/01/2017 10:21 AM, Fam Zheng wrote: > A few tweaks to the docker images and running commands allow us to run > qemu-iotests in the fedora container. This will be added to the patchew test > cases later. > > v3: Add nbd, luks and limit to quick group. > > v2: Add nettle-devel because a few

[Qemu-devel] [PATCH 1/1] block: add block device shared field

2017-09-01 Thread Brian Steffens
This adds a boolean option called 'shared' to block devices. It defaults to off/false. When enabled for a particular block device, the 'shared' option causes the block migration code to skip over syncing of that device. This allows controlling exactly which block devices get synced during a

Re: [Qemu-devel] [PATCH 0/2] Fix / skip recent iotests with LUKS driver

2017-09-01 Thread Eric Blake
On 09/01/2017 09:33 AM, Daniel P. Berrange wrote: > On Fri, Sep 01, 2017 at 09:26:30AM -0500, Eric Blake wrote: >> On 09/01/2017 05:54 AM, Daniel P. Berrange wrote: >>> Two recently added iotests are currently breaking 'check -luks', >>> fix the easy one and disable the hard one. >>> >>> Daniel P.

Re: [Qemu-devel] [PATCH v5 05/12] tests: Add ubuntu.i386 image

2017-09-01 Thread Philippe Mathieu-Daudé
Hi Fam, On 08/31/2017 03:42 AM, Fam Zheng wrote: This adds a 32bit guest. The official LTS cloud image is downloaded and initialized with cloud-init. Signed-off-by: Fam Zheng --- tests/vm/ubuntu.i386 | 88 1 file

Re: [Qemu-devel] [PATCH v2] tests: Enable the drive_del test also on s390x

2017-09-01 Thread Eric Blake
On 09/01/2017 05:39 AM, Thomas Huth wrote: /* Start with a drive used by a device that unplugs instantaneously */ -qtest_start("-drive if=none,id=drive0,file=null-co://,format=raw" -" -device virtio-scsi-pci" -" -device

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-09-01 Thread Philippe Mathieu-Daudé
On 08/30/2017 12:34 AM, Fam Zheng wrote: On Tue, 08/29 14:34, Philippe Mathieu-Daudé wrote: +self._args = [ \ +"-nodefaults", "-m", "2G", +"-cpu", "host", +"-netdev", "user,id=vnet,hostfwd=:0.0.0.0:0-:22", +"-device",

Re: [Qemu-devel] [PATCH] isa-fdc: assert replaced by proper error exit

2017-09-01 Thread John Snow
On 09/01/2017 07:07 AM, Eduardo Otubo wrote: > When not available, isa-fdc falls into assert instead of proper error > exit. This patch fixes this behavior. > > Signed-off-by: Eduardo Otubo > --- > hw/block/fdc.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) >

Re: [Qemu-devel] [PATCH] scripts: Support building with Python 3

2017-09-01 Thread Max Reitz
On 2017-08-31 15:14, Daniel P. Berrange wrote: [...] > NB, some distros have already changed /usr/bin/python to point to py3 > so all the files with #!/usr/bin/python in QEMU are already broken on > those distros. For what it's worth, I (at least used to) build qemu regularly on Arch Linux and

Re: [Qemu-devel] [PATCH v6 14/29] libqos: Use explicit QTestState for fw_cfg operations

2017-09-01 Thread Philippe Mathieu-Daudé
On 09/01/2017 03:03 PM, Eric Blake wrote: Drop one more client of global_qtest by teaching all fw_cfg test functionality (invoked through alloc-pc) to pass in an explicit QTestState, adjusting all callers. In particular, fw_cfg-test had to reorder things to create the test state prior to

Re: [Qemu-devel] [PATCH v6 13/29] libqos: Use explicit QTestState for pci operations

2017-09-01 Thread Philippe Mathieu-Daudé
On 09/01/2017 03:03 PM, Eric Blake wrote: Now that the QPCIBus tracks QTestState, use that state instead of an implicit reliance on global_qtest. Signed-off-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé --- tests/libqos/pci-pc.c| 47

[Qemu-devel] [PATCH v6 14.5/29] fixup! libqos: Use explicit QTestState for fw_cfg operations

2017-09-01 Thread Eric Blake
Signed-off-by: Eric Blake --- Fix older gcc duplicate typedef warning [patchew] --- tests/libqos/fw_cfg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libqos/fw_cfg.h b/tests/libqos/fw_cfg.h index 396dd4ee1e..0353416af0 100644 ---

Re: [Qemu-devel] [PATCH v6 12/29] libqos: Track QTestState with QPCIBus

2017-09-01 Thread Philippe Mathieu-Daudé
Hi Eric, On 09/01/2017 03:03 PM, Eric Blake wrote: When initializing a QPCIBus, track which QTestState the bus is associated with (so that a later patch can then explicitly use that test state for all communication on the bus, rather than blindly relying on global_qtest). Update the

[Qemu-devel] [Bug 1701798] Re: dynamically linked binaries crash for big-endian targets

2017-09-01 Thread George Kraft
For s390x, the hang definitely still occurs using a chroot with qemu- s390x-static copied in and no QEMU_LD_PREFIX. I'm not in a good position to test other big-endian architectures though. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to

Re: [Qemu-devel] [Qemu-stable] [PATCH 00/79] Patch Round-up for stable 2.9.1, freeze on 2017-09-04

2017-09-01 Thread Bruce Rogers
>>> On 8/28/2017 at 6:13 PM, wrote: > Hi everyone, > > The following new patches are queued for QEMU stable v2.9.1: > > https://github.com/mdroth/qemu/commits/stable-2.9-staging > > The release is planned for 2017-09-07: > > http://wiki.qemu.org/Planning/2.9 >

Re: [Qemu-devel] [Qemu-block] [PATCH v3 0/9] IDE: replace printfs with tracing

2017-09-01 Thread John Snow
On 09/01/2017 06:56 AM, Stefan Hajnoczi wrote: > On Thu, Aug 31, 2017 at 08:14:53PM -0400, John Snow wrote: >> Wherever possible, replace all printfs with proper tracing. >> In most places I've tried to do a straight replacement, but >> forthcoming patches may calibrate the tracing to be a

Re: [Qemu-devel] [PATCH v6 00/29] Preliminary libqtest cleanups

2017-09-01 Thread Eric Blake
On 09/01/2017 01:31 PM, no-re...@patchew.org wrote: > Hi, > > This series failed automatic build test. Please find the testing commands and > their output below. If you have docker installed, you can probably reproduce > it > locally. > > CC tests/libqos/pci.o > CC

Re: [Qemu-devel] [PATCH v3 3/3] docker: Add test-block

2017-09-01 Thread Eric Blake
On 09/01/2017 10:22 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > tests/docker/test-block | 22 ++ > 1 file changed, 22 insertions(+) > create mode 100755 tests/docker/test-block > > diff --git a/tests/docker/test-block b/tests/docker/test-block >

Re: [Qemu-devel] [PATCH v6 00/29] Preliminary libqtest cleanups

2017-09-01 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 20170901180340.30009-1-ebl...@redhat.com Subject: [Qemu-devel] [PATCH v6 00/29] Preliminary libqtest cleanups

Re: [Qemu-devel] [Xen-devel] [PATCH] xen: use vMSI related #define-s from public interface

2017-09-01 Thread Roger Pau Monné
On Fri, Sep 01, 2017 at 10:25:42AM -0600, Jan Beulich wrote: > Xen and qemu having identical #define-s (with different names) is a > strong hint that these should have been part of the public interface > from the very start. Use them if they're available, falling back to > privately defined values

[Qemu-devel] [PATCH v6 23/29] tests/acpi-utils: Drop dependence on global_qtest

2017-09-01 Thread Eric Blake
As a general rule, we prefer avoiding implicit global state because it makes code harder to safely copy and paste without thinking about the global state. Adjust the helper code to use explicit state instead, and update all callers. Signed-off-by: Eric Blake ---

[Qemu-devel] [PATCH v6 28/29] libqtest: Remove qtest_start() and qtest_end() shortcuts

2017-09-01 Thread Eric Blake
Remove the trivial wrappers qtest_start() and qtest_end(), to make it obvious in the rest of the testsuite where we are still relying on global_qtest. Doing this makes it easier to see what remaining cleanups will be needed if we don't want an implicit dependency on global state. Many tests can

[Qemu-devel] [PATCH v6 22/29] tests/boot-sector: Drop dependence on global_qtest

2017-09-01 Thread Eric Blake
As a general rule, we prefer avoiding implicit global state because it makes code harder to safely copy and paste without thinking about the global state. Adjust the helper code to use explicit state instead, and update all callers. Fix some trailing whitespace while touching the file.

[Qemu-devel] [PATCH v6 21/29] qmp-test: Drop dependence on global_qtest

2017-09-01 Thread Eric Blake
As a general rule, we prefer avoiding implicit global state because it makes code harder to safely copy and paste without thinking about the global state. Although qmp-test does not maintain parallel qtest connections, it was the last test assigning to global_qtest. It's just as easy to be

[Qemu-devel] [PATCH v6 26/29] fw_cfg-test: Drop dependence on global_qtest

2017-09-01 Thread Eric Blake
As a general rule, we prefer avoiding implicit global state because it makes code harder to safely copy and paste without thinking about the global state. It turns out that with the recent changes to libqos, fw_cfg-test was not even using global_qtest any more. Avoid a pointless strdup while at

[Qemu-devel] [PATCH v6 27/29] libqtest: Make qtest_init() accept format string

2017-09-01 Thread Eric Blake
Several callers were formatting a string into a temporary variable before calling qtest_init(); factor that into the common code. Signed-off-by: Eric Blake --- tests/libqtest.h | 7 --- tests/libqtest.c | 13 ++-- tests/bios-tables-test.c | 7

[Qemu-devel] [PATCH v6 20/29] vhost-user-test: Drop dependence on global_qtest

2017-09-01 Thread Eric Blake
Managing parallel connections to two different monitors via the implicit global_qtest makes it hard to copy-and-paste code to tests that are not aware of the implicit state. Now that libqos is fully-explicit, it is easy to expand the rest of vhost-user-test to also use explicit state everywhere.

[Qemu-devel] [PATCH v6 24/29] bios-tables-test: Drop dependence on global_qtest

2017-09-01 Thread Eric Blake
As a general rule, we prefer avoiding implicit global state because it makes code harder to safely copy and paste without thinking about the global state. Although bios-tables-test does not maintain parallel qtest connections, it's just as easy to be explicit about the state; once all tests have

[Qemu-devel] [PATCH v6 25/29] wdt_ib700-test: Drop dependence on global_qtest

2017-09-01 Thread Eric Blake
As a general rule, we prefer avoiding implicit global state because it makes code harder to safely copy and paste without thinking about the global state. Improve this test to be explicit about the state. Signed-off-by: Eric Blake --- tests/wdt_ib700-test.c | 63

[Qemu-devel] [PATCH v6 12/29] libqos: Track QTestState with QPCIBus

2017-09-01 Thread Eric Blake
When initializing a QPCIBus, track which QTestState the bus is associated with (so that a later patch can then explicitly use that test state for all communication on the bus, rather than blindly relying on global_qtest). Update the initialization functions to take another parameter, and update

[Qemu-devel] [PATCH v6 19/29] postcopy-test: Drop dependence on global_qtest

2017-09-01 Thread Eric Blake
Managing parallel connections to two different monitors via the implicit global_qtest makes it hard to copy-and-paste code to tests that are not aware of the implicit state. We are already half-using the explicit APIs, so fix the remaining spots to also be explicit about which connection is in

[Qemu-devel] [PATCH v6 18/29] ivshmem-test: Drop dependence on global_qtest

2017-09-01 Thread Eric Blake
Managing parallel connections to two different monitors via the implicit global_qtest makes it hard to copy-and-paste code to tests that are not aware of the implicit state. Since we have already fixed qpci to avoid global_qtest, we can now simplify by not using global_qtest anywhere in

[Qemu-devel] [PATCH v6 13/29] libqos: Use explicit QTestState for pci operations

2017-09-01 Thread Eric Blake
Now that the QPCIBus tracks QTestState, use that state instead of an implicit reliance on global_qtest. Signed-off-by: Eric Blake --- tests/libqos/pci-pc.c| 47 --- tests/libqos/pci-spapr.c | 20 ++-- 2 files

[Qemu-devel] [PATCH v6 11/29] libqtest: Inline qtest_query_target_endianness()

2017-09-01 Thread Eric Blake
There was only one caller; it's easier to inline things. Signed-off-by: Eric Blake --- tests/libqtest.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index 5d16351e24..b6dd26e54a 100644 ---

[Qemu-devel] [PATCH v6 29/29] libqtest: Rename qtest_init() to qtest_start()

2017-09-01 Thread Eric Blake
We already have another qtest_init() in the tree, for the top-level qtest.c device; having two functions with different signatures is confusing. Rename the libqtest version to qtest_start() to eliminate the duplication. Signed-off-by: Eric Blake --- tests/libqtest.h

[Qemu-devel] [PATCH v6 14/29] libqos: Use explicit QTestState for fw_cfg operations

2017-09-01 Thread Eric Blake
Drop one more client of global_qtest by teaching all fw_cfg test functionality (invoked through alloc-pc) to pass in an explicit QTestState, adjusting all callers. In particular, fw_cfg-test had to reorder things to create the test state prior to creating the fw_cfg. Signed-off-by: Eric Blake

[Qemu-devel] [PATCH v6 05/29] numa-test: Use hmp()

2017-09-01 Thread Eric Blake
Don't open-code something that has a convenient helper available. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé --- tests/numa-test.c | 21 +++-- 1 file changed, 3

[Qemu-devel] [PATCH v6 06/29] tests: Clean up wait for event

2017-09-01 Thread Eric Blake
From: Markus Armbruster We still use hacks like qmp("") to wait for an event, even though we have qmp_eventwait() since commit 8fe941f, and qmp_eventwait_ref() since commit 7ffe312. Both commits neglected to convert all the existing hacks. Make up what they missed. Bonus:

[Qemu-devel] [PATCH v6 16/29] libqos: Use explicit QTestState for virtio operations

2017-09-01 Thread Eric Blake
Drop one more client of global_qtest by teaching all virtio test functionality to pass in an explicit QTestState in constructors, where it is then reused for later access. Adjust all callers. This gets us one step closer to eliminating implicit use of global_qtest. Signed-off-by: Eric Blake

[Qemu-devel] [PATCH v6 10/29] libqtest: Topologically sort functions

2017-09-01 Thread Eric Blake
Put static functions prior to public ones, in part so that improvements to qtest_start() can benefit from the static helpers without needing forward references. Code motion, with no semantic change. Signed-off-by: Eric Blake --- tests/libqtest.c | 263

[Qemu-devel] [PATCH v6 15/29] libqos: Use explicit QTestState for rtas operations

2017-09-01 Thread Eric Blake
Drop one more client of global_qtest by teaching all rtas test functionality to pass in an explicit QTestState, adjusting all callers. Signed-off-by: Eric Blake --- tests/libqos/rtas.h | 9 ++--- tests/libqos/pci-spapr.c | 18 -- tests/libqos/rtas.c

[Qemu-devel] [PATCH v6 00/29] Preliminary libqtest cleanups

2017-09-01 Thread Eric Blake
Markus gave some good advice on my 'v4: Clean up around qmp() and hmp()' series [1], but Paolo made the suggestion on v5 [2] that we are probably better off avoiding dependence on a magic global variable, rather than making such dependence even more prominent. So, this round of patches starts to

[Qemu-devel] [PATCH v6 17/29] ahci-test: Drop dependence on global_qtest

2017-09-01 Thread Eric Blake
Managing parallel connections to two different monitors via the implicit global_qtest makes it hard to copy-and-paste code to tests that are not aware of the implicit state; the management of global_qtest is even harder to follow because it was masked behind set_context(). Instead, explicitly

[Qemu-devel] [PATCH v6 08/29] libqtest: Let socket_send() compute length

2017-09-01 Thread Eric Blake
Rather than make multiple callers call strlen(), it's easier if socket_send() itself can compute a length via strlen() if none was provided (caller passes -1). Callers that can get at the length more efficiently are left that way. Signed-off-by: Eric Blake ---

[Qemu-devel] [PATCH v6 03/29] test-qga: Kill broken and dead QGA_TEST_SIDE_EFFECTING code

2017-09-01 Thread Eric Blake
Back when the test was introduced, in commit 62c39b307, the test was set up to run qemu-ga directly on the host performing the test, and defaults to limiting itself to safe commands. At the time, it was envisioned that setting QGA_TEST_SIDE_EFFECTING in the environment could cover a few more

[Qemu-devel] [PATCH v6 07/29] libqtest: Remove dead qtest_instances variable

2017-09-01 Thread Eric Blake
Prior to commit 063c23d9, we were tracking a list of parallel qtest objects, in order to safely clean up a SIGABRT handler only after the last connection quits. But when we switched to more of glib's infrastructure, the list became dead code that is never assigned to. Signed-off-by: Eric Blake

[Qemu-devel] [PATCH v6 09/29] libqtest: Use qemu_strtoul()

2017-09-01 Thread Eric Blake
This will keep checkpatch happy when the next patch does code motion. Fix the include order to match HACKING when adding the needed header. Signed-off-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé --- tests/libqtest.c | 19 +-- 1 file

[Qemu-devel] [PATCH v6 01/29] tests: Improve .gitignore for tests/multiboot

2017-09-01 Thread Eric Blake
Right now, tests/multiboot is not run by default during 'make check'; but when it is run in-tree, it was leaving some junk behind that could accidentally get checked in with a careless 'git add tests'. Signed-off-by: Eric Blake --- tests/.gitignore | 2 ++ 1 file changed, 2

[Qemu-devel] [PATCH v6 04/29] qtest: Don't perform side effects inside assertion

2017-09-01 Thread Eric Blake
Assertions should be separate from the side effects, since in theory, g_assert() can be disabled (in practice, we can't really ever do that). Signed-off-by: Eric Blake --- qtest.c | 80 ++--- 1 file changed, 57

[Qemu-devel] [PATCH v6 02/29] tests: Sort .gitignore

2017-09-01 Thread Eric Blake
It doesn't matter if things are unsorted, but finding stuff in a list is easier when it is sorted. (Sorted under LC_ALL=C rules, rather than en_US.UTF-8). Signed-off-by: Eric Blake --- tests/.gitignore | 30 +++--- 1 file changed, 15 insertions(+), 15

Re: [Qemu-devel] [PATCH v3 0/7] More warning reporting fixed

2017-09-01 Thread Alistair Francis
On Fri, Sep 1, 2017 at 10:17 AM, wrote: > Hi, > > This series failed automatic build test. Please find the testing commands and > their output below. If you have docker installed, you can probably reproduce > it > locally. > > Message-id:

Re: [Qemu-devel] [PATCH v2 02/13] hvf: add code base from Google's QEMU repository

2017-09-01 Thread Izik Eidus
Hi, Sergio, I was trying to applying patch 1/13 and 2/13 and then I ran: ./configure and saw: 'HVF support yes' after that 'make' was happy and: ./x86_64-softmmu/qemu-system-x86_64 --help | grep accel \property accel=accel1[:accel2[:...]] selects accelerator

Re: [Qemu-devel] RFC: changing ROM bundling in tar dists for releases

2017-09-01 Thread Gerd Hoffmann
Hi, > > i.e. something like this: > > > > https://www.kraxel.org/cgit/qemu-firmware/ > > > > (only seabios is there for now) > > So presumably we'd want a 'make install' target there too, to place > the > various ROMS in the location QEMU expects ? Yes. Or place them in

[Qemu-devel] [PATCH v7 18/20] hw/arm/virt-acpi-build: Add smmuv3 node in IORT table

2017-09-01 Thread Eric Auger
From: Prem Mallappa This patch builds the smmuv3 node in the ACPI IORT table. As the smmu is dynamically instantianted using the platform bus, the dt node creation function fills the information used by the IORT table generation function (base address, base irq, type

[Qemu-devel] [PATCH v7 17/20] hw/arm/sysbus-fdt: Allow smmuv3 dynamic instantiation

2017-09-01 Thread Eric Auger
This patch adds a node creation function for the smmuv3. Using "-device smmuv3" it is now possible to get the iommu instantiated on ARM VIRT machine. The node creation function handles the creation of the smmuv3 node and also add the iommu-map property on the generic PCI host controller node.

[Qemu-devel] [PATCH v7 20/20] hw/arm/smmuv3: [not for upstream] Add caching-mode option

2017-09-01 Thread Eric Auger
In VFIO use cases, the virtual smmu translates IOVA->IPA (stage 1) whereas the physical SMMU translates IPA -> host PA (stage 2). The 2 stages of the physical SMMU are currently not used. Instead both stage 1 and stage2 mappings are combined together and programmed in a single stage (S1) in the

[Qemu-devel] [PATCH v7 15/20] hw/arm/sysbus-fdt: Pass the VirtMachineState to the node creation functions

2017-09-01 Thread Eric Auger
The VirtMachineState contains some dt phandles that will be used in some node creation functions. For instance we plan to use the PCI host controller phandle in the smmu node creation function. So let's pass the VirtMachineState handle down to the node creation functions by enhancing the involved

[Qemu-devel] [PATCH v7 14/20] hw/arm/virt: Store the PCI host controller dt phandle

2017-09-01 Thread Eric Auger
Let's allocate a phandle for the PCI host controller dt node and store this latter in the Virt Machine State. This will simplify fdt operations when we bind smmu and PCI host controller. Signed-off-by: Eric Auger --- hw/arm/virt.c | 5 - include/hw/arm/virt.h

[Qemu-devel] [PATCH v7 19/20] hw/arm/smmuv3: [not for upstream] add SMMU_CMD_TLBI_NH_VA_AM handling

2017-09-01 Thread Eric Auger
SMMUV3 does not support any IOVA range TLBI command: SMMU_CMD_TLBI_NH_VA invalidates TLB entries by page. That's an issue when running DPDK on guest. DPDK uses hugepages but each time a hugepage is mapped on guest side, a storm of SMMU_CMD_TLBI_NH_VA commands get sent by the guest smmuv3 driver

[Qemu-devel] [PATCH v7 09/20] hw/arm/smmuv3: Event queue recording helper

2017-09-01 Thread Eric Auger
Let's introduce a helper function aiming at recording an event in the event queue. Signed-off-by: Eric Auger --- At the moment, for some events we do not fill all the fields. Typically filling the FetchAddr field resulting of an abort on page table walk would require to

[Qemu-devel] [PATCH v7 13/20] hw/arm/smmuv3: Implement IOMMU memory region replay callback

2017-09-01 Thread Eric Auger
memory_region_iommu_replay() is used for VFIO integration. However its default implementation is not adapted to SMMUv3 IOMMU memory region. Indeed the input address range is too huge and its execution is too slow as it calls the translate() callback on each granule. Let's implement the replay

[Qemu-devel] [PATCH v7 10/20] hw/arm/smmuv3: Implement translate callback

2017-09-01 Thread Eric Auger
This patch implements the IOMMU Memory Region translate() callback. Most of the code relates to the translation configuration decoding and check (STE, CD). Signed-off-by: Eric Auger --- hw/arm/smmuv3-internal.h | 182 +++- hw/arm/smmuv3.c |

[Qemu-devel] [PATCH v7 16/20] hw/arm/sysbus-fdt: Pass the platform bus base address in PlatformBusFDTData

2017-09-01 Thread Eric Auger
The Base address of the platform bus may be useful for device node creation function. This is typically the case if the node creation function also prepares data for ACPI table generation. Signed-off-by: Eric Auger --- hw/arm/sysbus-fdt.c | 2 ++ 1 file changed, 2

[Qemu-devel] [PATCH v7 08/20] hw/arm/smmuv3: Implement MMIO write operations

2017-09-01 Thread Eric Auger
Now we have relevant helpers for queue and irq management, let's implement MMIO write operations Signed-off-by: Eric Auger --- hw/arm/smmuv3-internal.h | 103 +++- hw/arm/smmuv3.c | 204 ++-

[Qemu-devel] [PATCH v7 07/20] hw/arm/smmuv3: Queue helpers

2017-09-01 Thread Eric Auger
We introduce helpers to read/write into the circular queues. smmuv3_read_cmdq and smmuv3_write_evtq will become static later on. Signed-off-by: Eric Auger --- hw/arm/smmuv3-internal.h | 48 ++- hw/arm/smmuv3.c | 75

[Qemu-devel] [PATCH v7 06/20] hw/arm/smmuv3: Wired IRQ and GERROR helpers

2017-09-01 Thread Eric Auger
We introduce some helpers to handle wired IRQs and especially GERROR interrupt. SMMU writes GERROR register on GERROR event and SW acks GERROR interrupts by setting GERRORn. The Wired interrupts are edge sensitive. Signed-off-by: Eric Auger --- Is CMD_SYNC interrupt

[Qemu-devel] [PATCH v7 12/20] hw/arm/smmuv3: Implement data structure and TLB invalidation notifications

2017-09-01 Thread Eric Auger
When the guest invalidates data structure (STE, CD) or TLB we need to notify the IOMMU region notifiers. This allows vhost integration and also prepares for VFIO integration. Signed-off-by: Eric Auger --- v6 -> v7: - move SMMU_CMD_TLBI_NH_VA_AM in a separate patch -

[Qemu-devel] [PATCH v7 04/20] hw/arm/smmu-common: VMSAv8-64 page table walk

2017-09-01 Thread Eric Auger
This patch implements the page table walk for VMSAv8-64. The page table walk function is devised to walk the tables for a range of IOVAs and to call a callback for each valid leaf entry (frame or block). smmu_page_walk_level_64() handles the walk from a specific level. The advantage of using

[Qemu-devel] [PATCH v7 05/20] hw/arm/smmuv3: Skeleton

2017-09-01 Thread Eric Auger
From: Prem Mallappa This patch implements a skeleton for the smmuv3 device. Datatypes and register definitions are introduced. The MMIO region, the interrupts and the queue are initialized (PRI is not supported). Only the MMIO read operation is implemented here.

  1   2   3   4   >