[Qemu-devel] [PATCH 07/21] aspeed/timer: Add support for IRQ status register on the AST2600

2019-09-18 Thread Cédric Le Goater
The AST2600 timer replaces control register 2 with a interrupt status register. It is set by hardware when an IRQ occurs and cleared by software. Modify the vmstate version to take into account the new fields. Based on previous work from Joel Stanley. Signed-off-by: Cédric Le Goater ---

[Qemu-devel] [PATCH 12/21] aspeed/smc: Add AST2600 support

2019-09-18 Thread Cédric Le Goater
The AST2600 SoC SMC controller is a SPI only controller now and has a few extensions which we will need to take into account when SW requires it. - 4BYTE mode - HCLK divider has changed (SPI Training) - CE0-2 Read Timing Compensation registers This is enough to support u-boot. Signed-off-by:

[Qemu-devel] [PATCH 05/21] aspeed/timer: Add support for control register 3

2019-09-18 Thread Cédric Le Goater
The AST2500 timer has a third control register that is used to implement a set-to-clear feature for the main control register. This models the behaviour expected by the AST2500 while maintaining the same behaviour for the AST2400. The vmstate version is not increased yet because the structure is

[Qemu-devel] [PATCH 11/21] hw: wdt_aspeed: Add AST2600 support

2019-09-18 Thread Cédric Le Goater
From: Joel Stanley The AST2600 has four watchdogs, and they each have a 0x40 of registers. When running as part of an ast2600 system we must check a different offset for the system reset control register in the SCU. Signed-off-by: Joel Stanley [clg: - reworked model integration into new objet

[Qemu-devel] [PATCH 21/21] aspeed/soc: Add ASPEED Video stub

2019-09-18 Thread Cédric Le Goater
From: Joel Stanley Signed-off-by: Joel Stanley Signed-off-by: Cédric Le Goater --- include/hw/arm/aspeed_soc.h | 1 + hw/arm/aspeed_ast2600.c | 5 + hw/arm/aspeed_soc.c | 6 ++ 3 files changed, 12 insertions(+) diff --git a/include/hw/arm/aspeed_soc.h

[Qemu-devel] [PATCH 01/21] aspeed/wdt: Check correct register for clock source

2019-09-18 Thread Cédric Le Goater
From: Amithash Prasad When WDT_RESTART is written, the data is not the contents of the WDT_CTRL register. Hence ensure we are looking at WDT_CTRL to check if bit WDT_CTRL_1MHZ_CLK is set or not. Signed-off-by: Amithash Prasad [clg: improved Suject prefix ] Signed-off-by: Cédric Le Goater ---

[Qemu-devel] [PATCH 04/21] aspeed/timer: Introduce an object class per SoC

2019-09-18 Thread Cédric Le Goater
The most important changes will be on the register range 0x34 - 0x3C memops. Introduce class read/write operations to handle the differences between SoCs. Signed-off-by: Cédric Le Goater --- include/hw/timer/aspeed_timer.h | 15 + hw/arm/aspeed_soc.c | 3 +-

[Qemu-devel] [PATCH 06/21] aspeed/timer: Add AST2600 support

2019-09-18 Thread Cédric Le Goater
The AST2600 timer has a third control register that is used to implement a set-to-clear feature for the main control register. On the AST2600, it is not configurable via 0x38 (control register 3) as it is on the AST2500. Based on previous work from Joel Stanley. Signed-off-by: Cédric Le Goater

[Qemu-devel] [PATCH 02/21] hw/sd/aspeed_sdhci: New device

2019-09-18 Thread Cédric Le Goater
From: Eddie James The Aspeed SOCs have two SD/MMC controllers. Add a device that encapsulates both of these controllers and models the Aspeed-specific registers and behavior. Tested by reading from mmcblk0 in Linux: qemu-system-arm -machine romulus-bmc -nographic \ -drive

[Qemu-devel] [PATCH 00/21] aspeed: Add support for the AST2600 SoC

2019-09-18 Thread Cédric Le Goater
Hello, The series starts with a watchdog fix and a new model for the SDHCI controller. Follows the code for the AST2600 SoC. Most of the Aspeed models are reworked with an object class to introduce the AST2600 variant. A model for the AST2600 SoC and a simple AST2600 EVB machine is proposed at

[Qemu-devel] [PATCH 03/21] hw: aspeed_scu: Add AST2600 support

2019-09-18 Thread Cédric Le Goater
From: Joel Stanley The SCU controller on the AST2600 SoC has extra registers. Increase the number of regs of the model and introduce a new field in the class to customize the MemoryRegion operations depending on the SoC model. Signed-off-by: Joel Stanley [clg: - improved commit log -

[Qemu-devel] COMPARE_AND_WRITE support for rbd driver

2019-09-18 Thread Yaowei Bai
baiyao...@cmss.chinamobile.com Bcc: Subject: COMPARE_AND_WRITE support for rbd driver Reply-To: baiyao...@cmss.chinamobile.com Hey guys, I noticed that COMPARE_AND_WRITE had been supported by CEPH/librbd since v12.1.1. And in my company, we use this COMPARE_AND_WRITE support in CEPH with the

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-18 Thread Yan Zhao
On Thu, Sep 19, 2019 at 09:05:12AM +0800, Jason Wang wrote: > > On 2019/9/18 下午4:37, Tian, Kevin wrote: > >> From: Jason Wang [mailto:jasow...@redhat.com] > >> Sent: Wednesday, September 18, 2019 2:10 PM > >> > Note that the HVA to GPA mapping is not an 1:1 mapping. One HVA > >> range >

Re: [Qemu-devel] [PATCH-for-4.2 v11 00/11] ARM virt: ACPI memory hotplug support

2019-09-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190918130633.4872-1-shameerali.kolothum.th...@huawei.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. ===

[Qemu-devel] [PATCH] target/i386: Correct extra enter and spaces in comment

2019-09-18 Thread Tao Xu
There is an extra line in comment of CPUID_8000_0008_EBX_WBNOINVD, remove the extra enter and spaces. Signed-off-by: Tao Xu --- target/i386/cpu.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 5f6e3a029a..71b6193390 100644 ---

Re: [Qemu-devel] [RFC] error: auto propagated local_err

2019-09-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190918130244.24257-1-vsement...@virtuozzo.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [RFC] error: auto propagated local_err Message-id:

[Qemu-devel] [Bug 1844597] [NEW] fc1120a7f5f2d4b601003205c598077d3eb11ad2 causes a kernel panic in vfp_init on a clang built kernel

2019-09-18 Thread Nathan Chancellor
/vfpmodule.c because of an illegal instruction: [0.058685] VFP support v0.3: [0.059159] Internal error: Oops - undefined instruction: 0 [#1] SMP ARM [0.059525] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.3.0-next-20190918-dirty #1 [0.059547] Hardware name: Generic DT based syst

Re: [Qemu-devel] [PATCH v11 05/11] numa: Extend CLI to provide initiator information for numa nodes

2019-09-18 Thread Liu, Jingqi
> -Original Message- > From: Xu, Tao3 > Sent: Thursday, September 12, 2019 1:37 PM > To: imamm...@redhat.com; ebl...@redhat.com; ehabk...@redhat.com > Cc: Xu, Tao3 ; Liu, Jingqi ; > Williams, Dan J ; > jonathan.came...@huawei.com; Du, Fan ; qemu-devel@nongnu.org > Subject: [PATCH v11

Re: [Qemu-devel] [RESEND PATCH] tests/acceptance: Specify arch for QueryCPUModelExpansion

2019-09-18 Thread Cleber Rosa
On Wed, Sep 18, 2019 at 05:06:54PM +1000, David Gibson wrote: > At the moment this test runs on whatever the host arch is. But it looks > for 'unavailable-features' which is an x86 specific cpu property. Tag it > to always use qemu-system-x86_64. > > Signed-off-by: David Gibson > Reviewed-by:

Re: [Qemu-devel] [PULL 12/12] qemu-ga: Convert invocation documentation to rST

2019-09-18 Thread Eric Blake
On 9/13/19 10:49 AM, Peter Maydell wrote: > The qemu-ga documentation is currently in qemu-ga.texi in > Texinfo format, which we present to the user as: > * a qemu-ga manpage > * a section of the main qemu-doc HTML documentation > > Convert the documentation to rST format, and present it to >

Re: [Qemu-devel] [PATCH] BootLinuxSshTest: Only run the tests when explicitly requested

2019-09-18 Thread Cleber Rosa
On Wed, Sep 18, 2019 at 02:27:48PM +0200, Philippe Mathieu-Daudé wrote: > Currently the Avocado framework does not distinct the time spent > downloading assets vs. the time spent running a test. With big > assets (like a full VM image) the tests likely fail. > > This is a limitation known by the

Re: [Qemu-devel] [PATCH] iotests: Require Python 3.5 or later

2019-09-18 Thread Eduardo Habkost
On Wed, Sep 18, 2019 at 02:49:25PM -0400, John Snow wrote: > On 9/18/19 4:55 AM, Kevin Wolf wrote: > > Running iotests is not required to build QEMU, so we can have stricter > > version requirements for Python here and can make use of new features > > and drop compatibility code earlier. > > > >

Re: [Qemu-devel] Problems with MIPS Malta SSH tests in make check-acceptance

2019-09-18 Thread Cleber Rosa
On Wed, Sep 18, 2019 at 05:16:54PM +1000, David Gibson wrote: > Hi, > > I'm finding make check-acceptance is currently useless for me as a > pre-pull test, because a bunch of the tests are not at all reliable. > There are a bunch which I'm still investigating, but for now I'm > looking at the

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-18 Thread Jason Wang
On 2019/9/18 下午4:37, Tian, Kevin wrote: From: Jason Wang [mailto:jasow...@redhat.com] Sent: Wednesday, September 18, 2019 2:10 PM Note that the HVA to GPA mapping is not an 1:1 mapping. One HVA range could be mapped to several GPA ranges. This is fine. Currently vfio_dma maintains

Re: [Qemu-devel] [GIT PULL for qemu-pseries] pseries: Update SLOF firmware image

2019-09-18 Thread Alexey Kardashevskiy
Please ignore this one, this qemu tag includes more than just a SLOF update, I'll resend. On 12/09/2019 11:36, Alexey Kardashevskiy wrote: > The following changes since commit 0d0b906ae20d763db0f07fc74aef2c355b8474c7: > > spapr: Render full FDT on ibm,client-architecture-support (2019-09-11

Re: [Qemu-devel] [Qemu-riscv] [PATCH v1 10/28] target/riscv: Convert mie and mstatus to pointers

2019-09-18 Thread Alistair Francis
On Tue, Sep 17, 2019 at 7:00 PM Jonathan Behrens wrote: > > I went through the uses of mie in the entire hypervisor patch series and it > seems like it would be much simpler to just have two non-pointer fields in > the CPU struct: mie and vsie. To if an interrupt is pending, you are either >

[Qemu-devel] [PATCH v3 16/22] fuzz: add fuzzer skeleton

2019-09-18 Thread Oleinik, Alexander
tests/fuzz/fuzz.c serves as the entry point for the virtual-device fuzzer. Namely, libfuzzer invokes the LLVMFuzzerInitialize and LLVMFuzzerTestOneInput functions, both of which are defined in this file. This change adds a "FuzzTarget" struct, along with the fuzz_add_target function, which should

[Qemu-devel] [PATCH v3 17/22] fuzz: add support for fork-based fuzzing.

2019-09-18 Thread Oleinik, Alexander
fork() is a simple way to ensure that state does not leak in between fuzzing runs. Unfortunately, the fuzzer mutation engine relies on bitmaps which contain coverage information for each fuzzing run, and these bitmaps should be copied from the child to the parent(where the mutation occurs). These

[Qemu-devel] [PATCH v3 12/22] libqos: move useful qos-test funcs to qos_external

2019-09-18 Thread Oleinik, Alexander
The moved functions are not specific to qos-test and might be useful elsewhere. For example the virtual-device fuzzer makes use of them for qos-assisted fuzz-targets. Signed-off-by: Alexander Oleinik --- tests/Makefile.include | 1 + tests/libqos/qos_external.c | 151

[Qemu-devel] [PATCH v3 14/22] libqtest: add in-process qtest.c tx/rx handlers

2019-09-18 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- tests/libqtest.c | 46 ++ tests/libqtest.h | 5 + 2 files changed, 51 insertions(+) diff --git a/tests/libqtest.c b/tests/libqtest.c index d770462869..fc10322d52 100644 --- a/tests/libqtest.c +++

[Qemu-devel] [PATCH v3 10/22] tests: provide test variables to other targets

2019-09-18 Thread Oleinik, Alexander
Before, when tests/Makefile.include was included, the contents would be ignored if config-host.mak was defined. Moving the ifneq responsible for this allows a target to depend on both testing-related and host-related objects. For example the virtual-device fuzzer relies on both libqtest/libqos

[Qemu-devel] [PATCH v3 09/22] qtest: add in-process incoming command handler

2019-09-18 Thread Oleinik, Alexander
The handler allows a qtest client to send commands to the server by directly calling a function, rather than using a file/CharBackend Signed-off-by: Alexander Oleinik --- include/sysemu/qtest.h | 1 + qtest.c| 7 +++ 2 files changed, 8 insertions(+) diff --git

[Qemu-devel] [PATCH v3 22/22] fuzz: add documentation to docs/devel/

2019-09-18 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- docs/devel/fuzzing.txt | 114 + 1 file changed, 114 insertions(+) create mode 100644 docs/devel/fuzzing.txt diff --git a/docs/devel/fuzzing.txt b/docs/devel/fuzzing.txt new file mode 100644 index

[Qemu-devel] [PATCH v3 21/22] fuzz: add virtio-net fuzz target

2019-09-18 Thread Oleinik, Alexander
The virtio-net fuzz target feeds inputs to all three virtio-net virtqueues, and uses forking to avoid leaking state between fuzz runs. Signed-off-by: Alexander Oleinik --- tests/fuzz/Makefile.include | 1 + tests/fuzz/virtio_net_fuzz.c | 120 +++ 2 files

[Qemu-devel] [PATCH v3 06/22] fuzz: add configure flag --enable-fuzzing

2019-09-18 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- configure | 13 + 1 file changed, 13 insertions(+) diff --git a/configure b/configure index 30aad233d1..775f46f55a 100755 --- a/configure +++ b/configure @@ -498,6 +498,7 @@ libxml2="" debug_mutex="no" libpmem="" default_devices="yes"

[Qemu-devel] [PATCH v3 20/22] fuzz: add i440fx fuzz targets

2019-09-18 Thread Oleinik, Alexander
These three targets should simply fuzz reads/writes to a couple ioports, but they mostly serve as examples of different ways to write targets. They demonstrate using qtest and qos for fuzzing, as well as using rebooting and forking to reset state, or not resetting it at all. Signed-off-by:

[Qemu-devel] [PATCH v3 15/22] fuzz: Add target/fuzz makefile rules

2019-09-18 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- Makefile| 12 +++- Makefile.objs | 6 +- Makefile.target | 1 + 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3a43492340..5e5033a500 100644 --- a/Makefile +++ b/Makefile @@ -426,6 +426,7 @@

[Qemu-devel] [PATCH v3 07/22] fuzz: Add target/fuzz makefile rules

2019-09-18 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- Note that with this you cannot configure with --enable-fuzzing to build /all targets. Even if you could, you would need to clean all of the *.o between builds, since fuzzing adds instrumentation CFLAGS. Makefile| 15 ++-

[Qemu-devel] [PATCH v3 18/22] fuzz: expose fuzz target name

2019-09-18 Thread Oleinik, Alexander
This is needed for the qos-assisted fuzzers which walk the qos tree and need a way to check if the current path matches the name of the fuzz target. Signed-off-by: Alexander Oleinik --- tests/fuzz/fuzz.c | 3 +++ tests/fuzz/fuzz.h | 1 + 2 files changed, 4 insertions(+) diff --git

[Qemu-devel] [PATCH v3 11/22] libqos: split qos-test and libqos makefile vars

2019-09-18 Thread Oleinik, Alexander
Most qos-related objects were specified in the qos-test-obj-y variable. qos-test-obj-y also included qos-test.o which defines a main(). This made it difficult to repurpose qos-test-obj-y to link anything beside tests/qos-test against libqos. This change separates objects that are libqos-specific

[Qemu-devel] [PATCH v3 04/22] qtest: add qtest_server_send abstraction

2019-09-18 Thread Oleinik, Alexander
qtest_server_send is a function pointer specifying the handler used to transmit data to the qtest client. In the standard configuration, this calls the CharBackend handler, but now it is possible for other types of handlers, e.g direct-function calls if the qtest client and server exist within the

[Qemu-devel] [PATCH v3 13/22] libqtest: make qtest_bufwrite send "atomic"

2019-09-18 Thread Oleinik, Alexander
When using qtest "in-process" communication, qtest_sendf directly calls a function in the server (qtest.c). Combining the contents of the subsequent socket_sends into the qtest_sendf, makes it so the server can immediately handle the command, without building a local buffer and waiting for a

[Qemu-devel] [PATCH v3 19/22] fuzz: add support for qos-assisted fuzz targets

2019-09-18 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- tests/fuzz/qos_fuzz.c | 212 ++ tests/fuzz/qos_fuzz.h | 19 2 files changed, 231 insertions(+) create mode 100644 tests/fuzz/qos_fuzz.c create mode 100644 tests/fuzz/qos_fuzz.h diff --git

[Qemu-devel] [PATCH v3 05/22] libqtest: Add a layer of abstraciton to send/recv

2019-09-18 Thread Oleinik, Alexander
This makes it simple to swap the transport functions for qtest commands to and from the qtest client. For example, now it is possible to directly pass qtest commands to a server handler that exists within the same process, without the standard way of writing to a file descriptor. Signed-off-by:

[Qemu-devel] [PATCH v3 03/22] fuzz: Add FUZZ_TARGET module type

2019-09-18 Thread Oleinik, Alexander
Signed-off-by: Alexander Oleinik --- include/qemu/module.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/qemu/module.h b/include/qemu/module.h index 65ba596e46..684753d808 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -46,6 +46,7 @@ typedef

[Qemu-devel] [PATCH v3 08/22] module: check module wasn't already initialized

2019-09-18 Thread Oleinik, Alexander
The virtual-device fuzzer must initialize QOM, prior to running vl:qemu_init, so that it can use the qos_graph to identify the arguments required to initialize a guest for libqos-assisted fuzzing. This change prevents errors when vl:qemu_init tries to (re)initialize the previously initialized QOM

[Qemu-devel] [PATCH v3 01/22] softmmu: split off vl.c:main() into main.c

2019-09-18 Thread Oleinik, Alexander
A program might rely on functions implemented in vl.c, but implement its own main(). By placing main into a separate source file, there are no complaints about duplicate main()s when linking against vl.o. For example, the virtual-device fuzzer uses a main() provided by libfuzzer, and needs to

[Qemu-devel] [PATCH v3 02/22] libqos: Rename i2c_send and i2c_recv

2019-09-18 Thread Oleinik, Alexander
The names i2c_send and i2c_recv collide with functions defined in hw/i2c/core.c. This causes an error when linking against libqos and softmmu simultaneously (for example when using qtest inproc). Rename the libqos functions to avoid this. Signed-off-by: Alexander Oleinik ---

[Qemu-devel] [PATCH v3 00/22] Add virtual device fuzzing support

2019-09-18 Thread Oleinik, Alexander
This series adds a framework for coverage-guided fuzzing of virtual-devices. Fuzzing targets are based on qtest and can make use of the libqos abstractions. Build instructions in docs/devel/fuzzing.txt V3: * Rebased onto v4.1.0+ * Add the fuzzer as a new build-target type in the build-system

Re: [Qemu-devel] [PATCH 2/4] block/dirty-bitmap: add bs link

2019-09-18 Thread John Snow
On 9/16/19 10:19 AM, Vladimir Sementsov-Ogievskiy wrote: > Add bs field to BdrvDirtyBitmap structure. Drop BlockDriverState > parameter from bitmap APIs where possible. > > Signed-off-by: Vladimir Sementsov-Ogievskiy I've thought about doing this before, but couldn't figure out if it was

Re: [Qemu-devel] [PATCH] edk2 build scripts: work around TianoCore#1607 without forcing Python 2

2019-09-18 Thread John Snow
On 9/18/19 1:11 PM, Laszlo Ersek wrote: > It turns out that forcing python2 for running the edk2 "build" utility is > neither necessary nor sufficient. > > Forcing python2 is not sufficient for two reasons: > > - QEMU is moving away from python2, with python2 nearing EOL, > Thank you :) >

[Qemu-devel] Docker Tests

2019-09-18 Thread John Snow
Hi, I'm having a regular trainwreck here w/ the Docker test suite and I have a few questions; 1. Which tests should I expect to work by default? for instance, make-debug doesn't but I think that might be normal. Is that the only one? 2. Should all tests work for all targets? 3. Which images can

[Qemu-devel] [PATCH] docker: remove python2.7 from docker9-mxe

2019-09-18 Thread John Snow
When it was based on docker8 which uses python-minimal, it needed this. It no longer does. Goodbye, python2.7. Signed-off-by: John Snow --- tests/docker/dockerfiles/debian9-mxe.docker | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [PATCH] hw/arm: set machine 'virt' as default

2019-09-18 Thread Dan Streetman
On Wed, Sep 18, 2019 at 4:34 PM Alex Bennée wrote: > > > Dan Streetman writes: > > > From: Dan Streetman > > > > There is currently no default machine type for arm so one must be specified > > with --machine. This sets the 'virt' machine type as default. > > We should really have a FAQ entry

Re: [Qemu-devel] [PATCH 7/8] block: Pass truncate exact=true where reasonable

2019-09-18 Thread Maxim Levitsky
On Wed, 2019-09-18 at 11:51 +0200, Max Reitz wrote: > This is a change in behavior, so all instances need a good > justification. The comments added here should explain my reasoning. > > qed already had a comment that suggests it always expected > bdrv_truncate()/blk_truncate() to behave as if

Re: [Qemu-devel] [PATCH 5/8] block: Evaluate @exact in protocol drivers

2019-09-18 Thread Maxim Levitsky
On Wed, 2019-09-18 at 11:51 +0200, Max Reitz wrote: > We have two protocol drivers that return success when trying to shrink a > block device even though they cannot shrink it. This behavior is now > only allowed with exact=false, so they should return an error with > exact=true. > >

Re: [Qemu-devel] [PATCH 4/8] block: Add @exact parameter to bdrv_co_truncate()

2019-09-18 Thread Maxim Levitsky
On Wed, 2019-09-18 at 11:51 +0200, Max Reitz wrote: > We have two drivers (iscsi and file-posix) that (in some cases) return > success from their .bdrv_co_truncate() implementation if the block > device is larger than the requested offset, but cannot be shrunk. Some > callers do not want that

Re: [Qemu-devel] [PATCH 8/8] Revert "qemu-img: Check post-truncation size"

2019-09-18 Thread Maxim Levitsky
On Wed, 2019-09-18 at 11:51 +0200, Max Reitz wrote: > This reverts commit 5279b30392da7a3248b320c75f20c61e3a95863c. > > We no longer need this check because exact=true forces the block driver > to give the image the exact size requested by the user. Looks very good to me. Reviewed-by: Maxim

Re: [Qemu-devel] [PATCH 3/8] block: Do not truncate file node when formatting

2019-09-18 Thread Maxim Levitsky
On Wed, 2019-09-18 at 11:51 +0200, Max Reitz wrote: > There is no reason why the format drivers need to truncate the protocol > node when formatting it. When using the old .bdrv_co_create_ops() > interface, the file will be created with no size option anyway, which > generally gives it a size of

Re: [Qemu-devel] [PATCH 6/8] block: Let format drivers pass @exact

2019-09-18 Thread Maxim Levitsky
On Wed, 2019-09-18 at 11:51 +0200, Max Reitz wrote: > When truncating a format node, the @exact parameter is generally handled > simply by virtue of the format storing the new size in the image > metadata. Such formats do not need to pass on the parameter to their > file nodes. > > There are

Re: [Qemu-devel] [PATCH 2/8] block/cor: Drop cor_co_truncate()

2019-09-18 Thread Maxim Levitsky
On Wed, 2019-09-18 at 11:51 +0200, Max Reitz wrote: > No other filter driver has a .bdrv_co_truncate() implementation, and > there is no need to because the general block layer code can handle it > just as well. > > Signed-off-by: Max Reitz > --- > block/copy-on-read.c | 8 > 1 file

Re: [Qemu-devel] [PATCH 1/8] block: Handle filter truncation like native impl.

2019-09-18 Thread Maxim Levitsky
On Wed, 2019-09-18 at 11:51 +0200, Max Reitz wrote: > Make the filter truncation (passing it through to bs->file) a > first-class citizen and handle it exactly as if it was the filter > driver's native implementation of .bdrv_co_truncate(). > > I do not see a reason not to, it makes the code a

Re: [Qemu-devel] [PATCH] hw/arm: set machine 'virt' as default

2019-09-18 Thread Alex Bennée
Dan Streetman writes: > From: Dan Streetman > > There is currently no default machine type for arm so one must be specified > with --machine. This sets the 'virt' machine type as default. We should really have a FAQ entry for why we don't have a default for ARM. In short unlike PC's every

Re: [Qemu-devel] [Qemu-block] [PATCH] block/backup: install notifier during creation

2019-09-18 Thread John Snow
On 9/10/19 9:23 AM, John Snow wrote: > > > On 9/10/19 4:19 AM, Stefan Hajnoczi wrote: >> On Wed, Aug 21, 2019 at 04:01:52PM -0400, John Snow wrote: >>> >>> >>> On 8/21/19 10:41 AM, Vladimir Sementsov-Ogievskiy wrote: 09.08.2019 23:13, John Snow wrote: > Backup jobs may yield prior to

Re: [Qemu-devel] [PATCH v2 2/2] block/nvme: add support for discard

2019-09-18 Thread John Snow
On 9/13/19 9:36 AM, Maxim Levitsky wrote: > Signed-off-by: Maxim Levitsky Same comments as 1/2; but not worth holding anything up. We'll find out from users if there are problems, but I wish we had a nicer way to test it. Reviewed-by: John Snow > --- > block/nvme.c | 83

Re: [Qemu-devel] [PATCH v2 1/2] block/nvme: add support for write zeros

2019-09-18 Thread John Snow
On 9/13/19 9:36 AM, Maxim Levitsky wrote: > Signed-off-by: Maxim Levitsky It'd still be nice to have a commit message... > --- Or here, what changed from V1. > block/nvme.c | 72 +++- > block/trace-events | 1 + > include/block/nvme.h |

Re: [Qemu-devel] [PATCH v12 2/2] block/backup: fix backup_cow_with_offload for last cluster

2019-09-18 Thread John Snow
On 9/17/19 12:07 PM, Vladimir Sementsov-Ogievskiy wrote: We shouldn't try to copy bytes beyond EOF. Fix it. Fixes: 9ded4a0114968e Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH v12 1/2] block/backup: fix max_transfer handling for copy_range

2019-09-18 Thread John Snow
On 9/17/19 12:07 PM, Vladimir Sementsov-Ogievskiy wrote: Of course, QEMU_ALIGN_UP is a typo, it should be QEMU_ALIGN_DOWN, as we are trying to find aligned size which satisfy both source and target. Also, don't ignore too small max_transfer. In this case seems safer to disable copy_range.

Re: [Qemu-devel] [PATCH] iotests: Require Python 3.5 or later

2019-09-18 Thread John Snow
On 9/18/19 4:55 AM, Kevin Wolf wrote: Running iotests is not required to build QEMU, so we can have stricter version requirements for Python here and can make use of new features and drop compatibility code earlier. This makes qemu-iotests skip all Python tests if a Python version before 3.5

Re: [Qemu-devel] [PATCH 4/4] iotests: Add test for failing mirror complete

2019-09-18 Thread John Snow
On 9/12/19 9:56 AM, Max Reitz wrote: Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 44 ++ tests/qemu-iotests/041.out | 4 ++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041

Re: [Qemu-devel] [PATCH v4 1/4] iotests: add script_initialize

2019-09-18 Thread John Snow
On 9/18/19 9:05 AM, Thomas Huth wrote: On 18/09/2019 00.29, John Snow wrote: On 9/16/19 10:56 AM, Vladimir Sementsov-Ogievskiy wrote: [...] Finally do we support something except linux for iotests? for bash tests _supported_os also used only with "Linux" in 87 tests.. The iotests in

Re: [Qemu-devel] [PATCH v4 6/7] iotests: Test driver whitelisting in 136

2019-09-18 Thread John Snow
On 9/17/19 5:20 AM, Max Reitz wrote: null-aio may not be whitelisted. Skip all test cases that require it. Signed-off-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/136 | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v4 5/7] iotests: Test driver whitelisting in 093

2019-09-18 Thread John Snow
On 9/17/19 5:20 AM, Max Reitz wrote: null-aio may not be whitelisted. Skip all test cases that require it. (And skip the whole test if null-co is not whitelisted.) Signed-off-by: Max Reitz Sorry for the goose chase on v(n-1). I feel like maybe there's a nicer way to do this, but I

Re: [Qemu-devel] [RFC] error: auto propagated local_err

2019-09-18 Thread Eric Blake
On 9/18/19 1:05 PM, Eric Blake wrote: >>> #define MAKE_ERRP_SAFE() \ >>> g_auto(ErrorPropagationStruct) (__auto_errp_prop) = {.errp = errp}; \ >>> errp = &__auto_errp_prop.local_err >>> I tried to see if this could be done with just a single declaration line, as in: typedef struct

Re: [Qemu-devel] [PATCH v4 3/7] iotests: Use case_skip() in skip_if_unsupported()

2019-09-18 Thread John Snow
On 9/17/19 5:20 AM, Max Reitz wrote: skip_if_unsupported() should use the stronger variant case_skip(), because this allows it to be used even with setUp() (in a meaningful way). In the process, make it explicit what we expect the first argument of the func_wrapper to be (namely something

Re: [Qemu-devel] [RFC] error: auto propagated local_err

2019-09-18 Thread Eric Blake
On 9/18/19 12:46 PM, Vladimir Sementsov-Ogievskiy wrote: >>> +/* >>> + * Third variant: >>> + * Pros: >>> + * - simpler movement for functions which don't have local_err yet >>> + * the only thing to do is to call one macro at function start. >>> + * This extremely simplifies

[Qemu-devel] [RFC v2 3/5] cputlb: Introduce TLB_BSWAP

2019-09-18 Thread Richard Henderson
Handle bswap on ram directly in load/store_helper. This fixes a bug with the previous implementation in that one cannot use the I/O path for RAM. Fixes: a26fc6f5152b47f1 Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 2 + accel/tcg/cputlb.c | 105

[Qemu-devel] [RFC v2 5/5] cputlb: Move NOTDIRTY handling from I/O path to TLB path

2019-09-18 Thread Richard Henderson
Pages that we want to track for NOTDIRTY are RAM. We do not really need to go through the I/O path to handle them. Signed-off-by: Richard Henderson --- include/exec/cpu-common.h | 1 - accel/tcg/cputlb.c| 23 ++--- exec.c| 54

Re: [Qemu-devel] [PATCH 10/17] s390x/css: Pass local error object pointer to error_append_hint()

2019-09-18 Thread Eric Blake
On 9/18/19 5:26 AM, Cornelia Huck wrote: > On Tue, 17 Sep 2019 18:36:20 +0200 > Greg Kurz wrote: > >> On Tue, 17 Sep 2019 13:24:12 +0200 >> Cornelia Huck wrote: >> >>> On Tue, 17 Sep 2019 12:21:34 +0200 >>> Greg Kurz wrote: >>> Ensure that hints are added even if errp is _fatal or

[Qemu-devel] [RFC v2 2/5] cputlb: Replace switches in load/store_helper with callback

2019-09-18 Thread Richard Henderson
Add a function parameter to perform the actual load/store to ram. With optimization, this results in identical code. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 159 +++-- 1 file changed, 83 insertions(+), 76 deletions(-) diff --git

[Qemu-devel] [RFC v2 4/5] exec: Adjust notdirty tracing

2019-09-18 Thread Richard Henderson
The memory_region_tb_read tracepoint is unreachable, since notdirty is supposed to apply only to writes. The memory_region_tb_write tracepoint is mis-named, because notdirty is not only used for TB invalidation. It is also used for e.g. VGA RAM updates and migration. Replace

[Qemu-devel] [RFC v2 0/5] Move notdirty handling to cputlb

2019-09-18 Thread Richard Henderson
RFC because it *still* doesn't work, just like v1. However this time the changes are extremely minimal, and now I really *really* don't understand why they don't work, because as far as I can tell the new locking is *identical* with the current i/o path. In particular, the actual access happens

[Qemu-devel] [RFC v2 1/5] cputlb: Disable __always_inline__ without optimization

2019-09-18 Thread Richard Henderson
This forced inlining can result in missing symbols, which makes a debugging build harder to follow. Reported-by: Peter Maydell Signed-off-by: Richard Henderson --- include/qemu/compiler.h | 11 +++ accel/tcg/cputlb.c | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [RFC] error: auto propagated local_err

2019-09-18 Thread Vladimir Sementsov-Ogievskiy
18.09.2019 20:10, Eric Blake wrote: > On 9/18/19 8:02 AM, Vladimir Sementsov-Ogievskiy wrote: >> Hi all! >> >> Here is a proposal (three of them, actually) of auto propagation for >> local_err, to not call error_propagate on every exit point, when we >> deal with local_err. >> >> It also may help

Re: [Qemu-devel] [PATCH v4 1/4] iotests: add script_initialize

2019-09-18 Thread Vladimir Sementsov-Ogievskiy
18.09.2019 13:30, Vladimir Sementsov-Ogievskiy wrote: > 18.09.2019 1:29, John Snow wrote: >> >> >> On 9/16/19 10:56 AM, Vladimir Sementsov-Ogievskiy wrote: >>> 12.09.2019 3:16, John Snow wrote: Like script_main, but doesn't require a single point of entry. Replace all existing

Re: [Qemu-devel] [RFC] error: auto propagated local_err

2019-09-18 Thread Eric Blake
On 9/18/19 8:02 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > Here is a proposal (three of them, actually) of auto propagation for > local_err, to not call error_propagate on every exit point, when we > deal with local_err. > > It also may help make Greg's series[1] about

Re: [Qemu-devel] [PATCH 1/1] s390x/cpumodel: Add the z15 name to the description of gen15a

2019-09-18 Thread Cornelia Huck
On Wed, 18 Sep 2019 16:42:14 +0200 Christian Borntraeger wrote: > We now know that gen15a is called z15. > > Signed-off-by: Christian Borntraeger > --- > target/s390x/cpu_models.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/s390x/cpu_models.c

[Qemu-devel] [PULL SUBSYSTEM s390x 0/3] Minor fixes for the s390-ccw firmware

2019-09-18 Thread Thomas Huth
This pull request is not for master ! Hi Cornelia, the following changes since commit f8c3db33a5e863291182f8862ddf81618a7c6194: target/sparc: Switch to do_transaction_failed() hook (2019-09-17 12:01:00 +0100) are available in the Git repository at: https://gitlab.com/huth/qemu.git

[Qemu-devel] [PATCH v4 24/25] ppc/pnv: Improve trigger data definition

2019-09-18 Thread Cédric Le Goater
The trigger definition is used for triggers both for HW source interrupts, PHB, PSI, as well as for rerouting interrupts between Interrupt Controller. HW source controllers set bit0 of word0 to ‘0’ as they provide EAS information (EAS block + EAS index) in the 8 byte data and not END information,

[Qemu-devel] [PATCH v4 21/25] ppc/pnv: Quiesce some XIVE errors

2019-09-18 Thread Cédric Le Goater
When dumping the END and NVT tables, the error logging is too noisy. Signed-off-by: Cédric Le Goater --- hw/intc/pnv_xive.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index 8fa78e1c6cd9..4c1fa024cdf5 100644 ---

Re: [Qemu-devel] [PATCH v5 5/5] iotests: use python logging for iotests.log()

2019-09-18 Thread John Snow
On 9/18/19 10:52 AM, Vladimir Sementsov-Ogievskiy wrote: > 18.09.2019 2:45, John Snow wrote: >> We can turn logging on/off globally instead of per-function. >> >> Remove use_log from run_job, and use python logging to turn on >> diffable output when we run through a script entry point. >> >>

[Qemu-devel] [PATCH] edk2 build scripts: work around TianoCore#1607 without forcing Python 2

2019-09-18 Thread Laszlo Ersek
It turns out that forcing python2 for running the edk2 "build" utility is neither necessary nor sufficient. Forcing python2 is not sufficient for two reasons: - QEMU is moving away from python2, with python2 nearing EOL, - according to my most recent testing, the lacking dependency information

[Qemu-devel] [PATCH v4 23/25] ppc/xive: Check V bit in TM_PULL_POOL_CTX

2019-09-18 Thread Cédric Le Goater
A context should be 'valid' when pulled from the thread interrupt context registers. Signed-off-by: Cédric Le Goater --- hw/intc/xive.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/intc/xive.c b/hw/intc/xive.c index cdc4ea8b0e51..07b7c3586c12 100644 --- a/hw/intc/xive.c +++

[Qemu-devel] [PATCH v4 17/25] ppc/pnv: Dump the XIVE NVT table

2019-09-18 Thread Cédric Le Goater
This is to track the configuration of the base END index of the vCPU and the Interrupt Pending Buffer. The NVT IPB is updated when an interrupt can not be presented to a vCPU. Signed-off-by: Cédric Le Goater --- include/hw/ppc/xive_regs.h | 2 ++ hw/intc/pnv_xive.c | 22

Re: [Qemu-devel] [PATCH v2] vhost-user: save features if the char dev is closed

2019-09-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190918084834.9729-1-amore...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash

[Qemu-devel] [PATCH v4 22/25] ppc/xive: Introduce a xive_os_cam_decode() helper

2019-09-18 Thread Cédric Le Goater
The OS CAM line has a special encoding exploited by the HW. Provide a helper routine to hide the details to the TIMA command handlers. This also clarifies the endian ness of different variables : 'qw1w2' is big-endian and 'cam' is native. Signed-off-by: Cédric Le Goater --- hw/intc/xive.c | 35

[Qemu-devel] [PATCH v4 15/25] ppc/xive: Synthesize interrupt from the saved IPB in the NVT

2019-09-18 Thread Cédric Le Goater
When an interrupt can not be presented to a vCPU, the XIVE presenter updates the Interrupt Pending Buffer of the XIVE NVT if backlog is activated in the END. Later, when the same vCPU is dispatched, its context is pushed in the thread context registers and the VO bit is set in the CAM line word

Re: [Qemu-devel] [PATCH v4 1/4] iotests: add script_initialize

2019-09-18 Thread John Snow
On 9/18/19 12:44 PM, Vladimir Sementsov-Ogievskiy wrote: > 18.09.2019 13:30, Vladimir Sementsov-Ogievskiy wrote: >> 18.09.2019 1:29, John Snow wrote: >>> >>> >>> On 9/16/19 10:56 AM, Vladimir Sementsov-Ogievskiy wrote: 12.09.2019 3:16, John Snow wrote: > Like script_main, but doesn't

[Qemu-devel] [PATCH v4 14/25] ppc/xive: Introduce helpers for the NVT id

2019-09-18 Thread Cédric Le Goater
The NVT space is 19 bits wide, giving a maximum of 512K per chip. When dispatched on a HW thread, the NVT identifier of a vCPU is pushed/stored in the CAM line (word2) of the thread interrupt context. Signed-off-by: Cédric Le Goater --- include/hw/ppc/xive.h | 5 -

Re: [Qemu-devel] [PATCH v4 5/7] iotests: Test driver whitelisting in 093

2019-09-18 Thread Andrey Shinkevich
On 18/09/2019 09:29, Max Reitz wrote: > On 17.09.19 16:25, Andrey Shinkevich wrote: >> >> >> On 17/09/2019 12:20, Max Reitz wrote: >>> null-aio may not be whitelisted. Skip all test cases that require it. >>> >>> (And skip the whole test if null-co is not whitelisted.) >> This solution has been

  1   2   3   4   >