[PATCH v5 2/2] lockable: replaced locks with lock guard macros where appropriate

2020-04-03 Thread dnbrdsky
From: Daniel Brodsky - ran regexp "qemu_mutex_lock\(.*\).*\n.*if" to find targets - replaced result with QEMU_LOCK_GUARD if all unlocks at function end - replaced result with WITH_QEMU_LOCK_GUARD if unlock not at end Signed-off-by: Daniel Brodsky --- block/iscsi.c | 7 ++

Re: [PATCH for-5.0] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-03 Thread Andrey Shinkevich
From: Alberto Garcia Sent: Friday, April 3, 2020 7:57 PM To: qemu-de...@nongnu.org Cc: Alberto Garcia; qemu-block@nongnu.org; Andrey Shinkevich; Max Reitz; Kevin Wolf; Vladimir Sementsov-Ogievskiy; Pavel Butsykin Subject: [PATCH for-5.0] qcow2: Check

Re: [PATCH for-5.0] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200403165752.18009-1-be...@igalia.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. === TEST SCRIPT BEGIN ===

Re: [PATCH v10 10/14] iotests: add hmp helper with logging

2020-04-03 Thread John Snow
On 4/3/20 4:57 AM, Max Reitz wrote: > On 02.04.20 20:27, John Snow wrote: > > [...] > >> Are we squared up for this series? I am actually not sure. > > As far as I’m concerned, yes. I just had this question on how to use mypy. Oh, whoops, Kevin's comment. I do want to address that one.

[PATCH for-5.0? v2] qcow2: Explicit mention of padding bytes

2020-04-03 Thread Eric Blake
Although we already covered the need for padding bytes with our changes in commit 3ae3fcfa, commit 66fcbca5 just added one byte and relied on the rest of the text for implicitly covering 7 padding bytes. For consistency with other parts of the header (such as the header extension format listing

[PATCH v5 7/7] qemu-img: Deprecate use of -b without -F

2020-04-03 Thread Eric Blake
Creating an image that requires format probing of the backing image is inherently unsafe (we've had several CVEs over the years based on probes leaking information to the guest on a subsequent boot, although these days tools like libvirt are aware of the issue enough to prevent the worst effects).

[PATCH v5 6/7] block: Add support to warn on backing file change without format

2020-04-03 Thread Eric Blake
For now, this is a mechanical addition; all callers pass false. But the next patch will use it to improve 'qemu-img rebase -u' when selecting a backing file with no format. Signed-off-by: Eric Blake Reviewed-by: Peter Krempa Reviewed-by: Ján Tomko --- include/block/block.h | 4 ++-- block.c

[PATCH v5 3/7] qcow: Tolerate backing_fmt=, but warn on backing_fmt=raw

2020-04-03 Thread Eric Blake
qcow has no space in the metadata to store a backing format, and there are existing qcow images backed both by raw or by other formats (usually qcow) images, reliant on probing to tell the difference. While we don't recommend the creation of new qcow images (as qcow2 is hands-down better), we can

[PATCH v5 4/7] qcow2: Deprecate use of qemu-img amend to change backing file

2020-04-03 Thread Eric Blake
The use of 'qemu-img amend' to change qcow2 backing files is not tested very well. In particular, our implementation has a bug where if a new backing file is provided without a format, then the prior format is blindly reused, even if this results in data corruption, but this is not caught by

[PATCH v5 for-5.0? 0/7] Tighten qemu-img rules on missing backing format

2020-04-03 Thread Eric Blake
v4 was here: https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg03775.html In v5: - fix 'qemu-img convert -B' to actually warn [Kashyap] - squash in followups - a couple more iotest improvements If we decide this is not 5.0 material, then patches 4 and 7 need a tweak to s/5.0/5.1/ as the

[PATCH v5 2/7] vmdk: Add trivial backing_fmt support

2020-04-03 Thread Eric Blake
vmdk already requires that if backing_file is present, that it be another vmdk image (see vmdk_co_do_create). Meanwhile, we want to move towards always being explicit about the backing format for other drivers where it matters. So for convenience, make qemu-img create -F vmdk work, while

[PATCH v5 1/7] sheepdog: Add trivial backing_fmt support

2020-04-03 Thread Eric Blake
Sheepdog already requires that if backing_file is present, that it be another sheepdog image (see sd_co_create). Meanwhile, we want to move towards always being explicit about the backing format for other drivers where it matters. So for convenience, make qemu-img create -F sheepdog work, while

Re: [PATCH for-5.0] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-03 Thread Eric Blake
On 4/3/20 11:57 AM, Alberto Garcia wrote: When issuing a compressed write request the number of bytes must be a multiple of the cluster size. With the current code such requests are allowed and we hit an assertion: $ qemu-img create -f qcow2 img.qcow2 1M $ qemu-io -c 'write -c 0 32k'

[PATCH for-5.0] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-03 Thread Alberto Garcia
When issuing a compressed write request the number of bytes must be a multiple of the cluster size. With the current code such requests are allowed and we hit an assertion: $ qemu-img create -f qcow2 img.qcow2 1M $ qemu-io -c 'write -c 0 32k' img.qcow2 qemu-io: block/qcow2.c:4257:

Re: bdrv_drained_begin deadlock with io-threads

2020-04-03 Thread Dietmar Maurer
> On April 3, 2020 10:47 AM Kevin Wolf wrote: > > > Am 03.04.2020 um 10:26 hat Dietmar Maurer geschrieben: > > > With the following patch, it seems to survive for now. I'll give it some > > > more testing tomorrow (also qemu-iotests to check that I didn't > > > accidentally break something

Re: [PATCH v2 0/5] fix migration with bitmaps and mirror

2020-04-03 Thread Vladimir Sementsov-Ogievskiy
03.04.2020 18:05, Dr. David Alan Gilbert wrote: * Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: 03.04.2020 14:29, Vladimir Sementsov-Ogievskiy wrote: 03.04.2020 14:23, Peter Krempa wrote: On Fri, Apr 03, 2020 at 14:02:47 +0300, Vladimir Sementsov-Ogievskiy wrote: 19.12.2019

Re: [PULL for-5.0 0/1] Block patches

2020-04-03 Thread Peter Maydell
On Fri, 3 Apr 2020 at 12:52, Stefan Hajnoczi wrote: > > The following changes since commit 5142ca078d1cbc0f77b0f385d28cdb3e504e62bd: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2020-04-02 20:18:25 +0100) > > are available in the Git repository at: > >

Re: [PATCH v2 0/5] fix migration with bitmaps and mirror

2020-04-03 Thread Dr. David Alan Gilbert
* Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: > 03.04.2020 14:29, Vladimir Sementsov-Ogievskiy wrote: > > 03.04.2020 14:23, Peter Krempa wrote: > > > On Fri, Apr 03, 2020 at 14:02:47 +0300, Vladimir Sementsov-Ogievskiy > > > wrote: > > > > 19.12.2019 13:36, Peter Krempa wrote:

Re: [PATCH for-5.0 2/2] block: Fix blk->in_flight during blk_wait_while_drained()

2020-04-03 Thread Kevin Wolf
Am 03.04.2020 um 14:42 hat Max Reitz geschrieben: > On 03.04.20 12:44, Kevin Wolf wrote: > > Calling blk_wait_while_drained() while blk->in_flight is increased for > > the current request is wrong because it will cause the drain operation > > to deadlock. > > > > Many callers of

Re: [PATCH] iotests/common.pattern: Quote echos

2020-04-03 Thread Eric Blake
On 4/3/20 5:11 AM, Max Reitz wrote: From time to time, my shell decides to repace the bracketed numbers here by the numbers inside (i.e., "=== Clusters to be compressed [1]" is printed as "=== Clusters to be compressed 1"). That makes tests that Namely, any time your environment has a file

Re: [PATCH for-5.0] vpc: Don't round up already aligned BAT sizes

2020-04-03 Thread Max Reitz
On 03.04.20 14:04, Kevin Wolf wrote: > Am 03.04.2020 um 10:55 hat Max Reitz geschrieben: >> On 02.04.20 11:36, Kevin Wolf wrote: >>> As reported on Launchpad, Azure apparently doesn't accept images for >>> upload that are not both aligned to 1 MB blocks and have a BAT size that >>> matches the

Re: [PATCH v2] Compress lines for immediate return

2020-04-03 Thread Stefan Hajnoczi
On Wed, Apr 01, 2020 at 10:23:14PM +0530, Simran Singhal wrote: > Compress two lines into a single line if immediate return statement is found. > > It also remove variables progress, val, data, ret and sock > as they are no longer needed. > > Remove space between function "mixer_load" and '(' to

Re: [PATCH for-5.0 2/2] block: Fix blk->in_flight during blk_wait_while_drained()

2020-04-03 Thread Max Reitz
On 03.04.20 12:44, Kevin Wolf wrote: > Calling blk_wait_while_drained() while blk->in_flight is increased for > the current request is wrong because it will cause the drain operation > to deadlock. > > Many callers of blk_wait_while_drained() have already increased > blk->in_flight when called in

Re: [PATCH for-5.0 1/2] block: Don't blk_wait_while_drained() in blk_co_preadv/pwritev

2020-04-03 Thread Max Reitz
On 03.04.20 12:44, Kevin Wolf wrote: > Calling blk_wait_while_drained() while blk->in_flight is increased for > the current request is wrong because it will cause the drain operation > to deadlock. > > In blk_co_preadv() and blk_co_pwritev_part(), this deadlock is easily > fixed by simply

Re: [PATCH for-5.0] vpc: Don't round up already aligned BAT sizes

2020-04-03 Thread Kevin Wolf
Am 03.04.2020 um 10:55 hat Max Reitz geschrieben: > On 02.04.20 11:36, Kevin Wolf wrote: > > As reported on Launchpad, Azure apparently doesn't accept images for > > upload that are not both aligned to 1 MB blocks and have a BAT size that > > matches the image size exactly. > > > > As far as I

Re: [PATCH for-5.0] aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring

2020-04-03 Thread Stefan Hajnoczi
On Thu, Apr 02, 2020 at 03:54:34PM +0100, Stefan Hajnoczi wrote: > When a file descriptor becomes ready we must re-arm POLL_ADD. This is > done by adding an sqe to the io_uring sq ring. The ->need_wait() > function wasn't taking pending sqes into account and therefore >

[PULL for-5.0 1/1] aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring

2020-04-03 Thread Stefan Hajnoczi
When a file descriptor becomes ready we must re-arm POLL_ADD. This is done by adding an sqe to the io_uring sq ring. The ->need_wait() function wasn't taking pending sqes into account and therefore io_uring_submit_and_wait() was not being called. Polling for cqes failed to detect fd readiness

[PULL for-5.0 0/1] Block patches

2020-04-03 Thread Stefan Hajnoczi
The following changes since commit 5142ca078d1cbc0f77b0f385d28cdb3e504e62bd: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2020-04-02 20:18:25 +0100) are available in the Git repository at: https://github.com/stefanha/qemu.git tags/block-pull-request for

Re: [PATCH v2 0/5] fix migration with bitmaps and mirror

2020-04-03 Thread Vladimir Sementsov-Ogievskiy
03.04.2020 14:29, Vladimir Sementsov-Ogievskiy wrote: 03.04.2020 14:23, Peter Krempa wrote: On Fri, Apr 03, 2020 at 14:02:47 +0300, Vladimir Sementsov-Ogievskiy wrote: 19.12.2019 13:36, Peter Krempa wrote: On Thu, Dec 19, 2019 at 11:51:01 +0300, Vladimir Sementsov-Ogievskiy wrote: Hi all!

Re: [RFC qemu 0/6] mirror: implement incremental and bitmap modes

2020-04-03 Thread Fabian Grünbichler
On February 25, 2020 10:54 pm, John Snow wrote: > On 2/18/20 5:07 AM, Fabian Grünbichler wrote: >> picking up on John's in-progress patch series from last summer, this is >> a stab at rebasing and adding test cases for the low-hanging fruits: >> >> - bitmap mirror mode with

Re: [PATCH v2 0/5] fix migration with bitmaps and mirror

2020-04-03 Thread Vladimir Sementsov-Ogievskiy
03.04.2020 14:23, Peter Krempa wrote: On Fri, Apr 03, 2020 at 14:02:47 +0300, Vladimir Sementsov-Ogievskiy wrote: 19.12.2019 13:36, Peter Krempa wrote: On Thu, Dec 19, 2019 at 11:51:01 +0300, Vladimir Sementsov-Ogievskiy wrote: Hi all! It's a continuation for "bitmap migration bug with

Re: [PATCH v2 0/5] fix migration with bitmaps and mirror

2020-04-03 Thread Peter Krempa
On Fri, Apr 03, 2020 at 14:02:47 +0300, Vladimir Sementsov-Ogievskiy wrote: > 19.12.2019 13:36, Peter Krempa wrote: > > On Thu, Dec 19, 2019 at 11:51:01 +0300, Vladimir Sementsov-Ogievskiy wrote: > > > Hi all! > > > > > > It's a continuation for > > > "bitmap migration bug with -drive while block

Re: [PATCH v2 0/5] fix migration with bitmaps and mirror

2020-04-03 Thread Vladimir Sementsov-Ogievskiy
19.12.2019 13:36, Peter Krempa wrote: On Thu, Dec 19, 2019 at 11:51:01 +0300, Vladimir Sementsov-Ogievskiy wrote: Hi all! It's a continuation for "bitmap migration bug with -drive while block mirror runs" <315cff78-dcdb-a3ce-2742-da3cc9f0c...@redhat.com>

[PATCH for-5.0 0/2] block: Fix blk->in_flight during blk_wait_while_drained()

2020-04-03 Thread Kevin Wolf
This fixes deadlocks when draining a BlockBackend in an iothread that receives new requests at the same time. Kevin Wolf (2): block: Don't blk_wait_while_drained() in blk_co_preadv/pwritev block: Fix blk->in_flight during blk_wait_while_drained() block/block-backend.c | 14 ++ 1

[PATCH for-5.0 1/2] block: Don't blk_wait_while_drained() in blk_co_preadv/pwritev

2020-04-03 Thread Kevin Wolf
Calling blk_wait_while_drained() while blk->in_flight is increased for the current request is wrong because it will cause the drain operation to deadlock. In blk_co_preadv() and blk_co_pwritev_part(), this deadlock is easily fixed by simply removing the blk_wait_while_drained() call. We already

[PATCH for-5.0 2/2] block: Fix blk->in_flight during blk_wait_while_drained()

2020-04-03 Thread Kevin Wolf
Calling blk_wait_while_drained() while blk->in_flight is increased for the current request is wrong because it will cause the drain operation to deadlock. Many callers of blk_wait_while_drained() have already increased blk->in_flight when called in a blk_aio_*() path, but can also be called in

Re: [PATCH] iotests/common.pattern: Quote echos

2020-04-03 Thread Philippe Mathieu-Daudé
On 4/3/20 12:11 PM, Max Reitz wrote: From time to time, my shell decides to repace the bracketed numbers here by the numbers inside (i.e., "=== Clusters to be compressed [1]" is printed as "=== Clusters to be compressed 1"). That makes tests that use common.pattern fail. Prevent that from

Re: [PATCH v2 09/12] acpi: move aml builder code for parallel device

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 12:12:10 +0200 Igor Mammedov wrote: > On Fri, 3 Apr 2020 10:04:59 +0200 > Gerd Hoffmann wrote: > [...] > > +static void parallel_isa_build_aml(ISADevice *isadev, Aml *scope) > > +{ > > +ISAParallelState *isa = ISA_PARALLEL(isadev); > > +Aml *dev; > > +Aml *crs;

Re: [PATCH v2 09/12] acpi: move aml builder code for parallel device

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:59 +0200 Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > hw/char/parallel.c | 25 + > hw/i386/acpi-build.c | 23 --- > 2 files changed, 25 insertions(+), 23 deletions(-) > > diff --git a/hw/char/parallel.c

[PATCH] iotests/common.pattern: Quote echos

2020-04-03 Thread Max Reitz
>From time to time, my shell decides to repace the bracketed numbers here by the numbers inside (i.e., "=== Clusters to be compressed [1]" is printed as "=== Clusters to be compressed 1"). That makes tests that use common.pattern fail. Prevent that from happening by quoting the arguments to all

Re: [PATCH v2 08/12] acpi: move aml builder code for serial device

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:58 +0200 Gerd Hoffmann wrote: > The code uses the isa_serial_io array to figure what the device uid is. > Side effect is that acpi antries are not limited to port 1+2 any more, > we'll also get entries for ports 3+4. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor

Re: [PATCH v2 07/12] acpi: move aml builder code for rtc device

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:57 +0200 Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- [...] > +static void rtc_build_aml(ISADevice *isadev, Aml *scope) > +{ > +Aml *dev; > +Aml *crs; > + > +crs = aml_resource_template(); > +aml_append(crs, aml_io(AML_DECODE16, 0x0070,

Re: [PATCH v2 06/12] acpi: add ISADeviceClass->build_aml()

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:56 +0200 Gerd Hoffmann wrote: > Also add isa_aml_build() function which walks all isa devices. > This allows to move aml builder code to isa devices. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > include/hw/isa/isa.h | 2 ++ >

Re: [PATCH v2 05/12] acpi: parallel: don't use _STA method

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:55 +0200 Gerd Hoffmann wrote: > The _STA method dates back to the days where we had a static DSDT. The > device is listed in the DSDT table unconditionally and the _STA method > checks a bit in the isa bridge pci config space to figure whenever a > given is isa device

Re: [PATCH v2 04/12] acpi: serial: don't use _STA method

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:54 +0200 Gerd Hoffmann wrote: > The _STA method dates back to the days where we had a static DSDT. The > device is listed in the DSDT table unconditionally and the _STA method > checks a bit in the isa bridge pci config space to figure whenever a > given is isa device

Re: [PATCH for-5.0? v3] qemu-img: Report convert errors by bytes, not sectors

2020-04-03 Thread Max Reitz
On 02.04.20 15:57, Eric Blake wrote: > Various qemu-img commands are inconsistent on whether they report > status/errors in terms of bytes or sector offsets. The latter is > confusing (especially as more places move to 4k block sizes), so let's > switch everything to just use bytes everywhere.

Re: [PATCH v2 03/12] acpi: drop pointless _STA method

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:53 +0200 Gerd Hoffmann wrote: > When returning a constant there is no point in having a method > in the first place, _STA can be a simple integer instead. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > hw/i386/acpi-build.c | 14 +++---

Re: [PATCH v2 02/12] acpi: add aml builder stubs

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:52 +0200 Gerd Hoffmann wrote: > Needed when moving aml builder code to devices. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > hw/acpi/aml-build-stub.c | 79 > hw/acpi/Makefile.objs| 4 +- > 2

Re: [PATCH v2 01/12] move 'typedef Aml' to qemu/types.h

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:51 +0200 Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > include/hw/acpi/aml-build.h | 1 - > include/qemu/typedefs.h | 1 + > 2 files changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/hw/acpi/aml-build.h

Re: [PATCH v2 00/12] acpi: i386 tweaks

2020-04-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200403080502.8154-1-kra...@redhat.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. === TEST SCRIPT BEGIN ===

Re: [PATCH v10 10/14] iotests: add hmp helper with logging

2020-04-03 Thread Max Reitz
On 02.04.20 20:27, John Snow wrote: [...] > Are we squared up for this series? I am actually not sure. As far as I’m concerned, yes. I just had this question on how to use mypy. Max signature.asc Description: OpenPGP digital signature

Re: [PATCH for-5.0] vpc: Don't round up already aligned BAT sizes

2020-04-03 Thread Max Reitz
On 02.04.20 11:36, Kevin Wolf wrote: > As reported on Launchpad, Azure apparently doesn't accept images for > upload that are not both aligned to 1 MB blocks and have a BAT size that > matches the image size exactly. > > As far as I can tell, there is no real reason why we create a BAT that > is

Re: [PATCH v2 00/12] acpi: i386 tweaks

2020-04-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200403080502.8154-1-kra...@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 export

Re: bdrv_drained_begin deadlock with io-threads

2020-04-03 Thread Kevin Wolf
Am 03.04.2020 um 10:26 hat Dietmar Maurer geschrieben: > > With the following patch, it seems to survive for now. I'll give it some > > more testing tomorrow (also qemu-iotests to check that I didn't > > accidentally break something else.) > > Wow, that was fast! Seems your patch fixes the bug! >

Re: bdrv_drained_begin deadlock with io-threads

2020-04-03 Thread Dietmar Maurer
> With the following patch, it seems to survive for now. I'll give it some > more testing tomorrow (also qemu-iotests to check that I didn't > accidentally break something else.) Wow, that was fast! Seems your patch fixes the bug! I wonder what commit introduced that problem, maybe:

Re: bdrv_drained_begin deadlock with io-threads

2020-04-03 Thread Thomas Lamprecht
On 4/2/20 7:10 PM, Kevin Wolf wrote: > Am 02.04.2020 um 18:47 hat Kevin Wolf geschrieben: >> So I think this is the bug: Calling blk_wait_while_drained() from >> anywhere between blk_inc_in_flight() and blk_dec_in_flight() is wrong >> because it will deadlock the drain operation. >> >>

Re: [PATCH v5] qcow2: Forbid discard in qcow2 v2 images with backing files

2020-04-03 Thread Max Reitz
On 31.03.20 13:43, Alberto Garcia wrote: > A discard request deallocates the selected clusters so they read back > as zeroes. This is done by clearing the cluster offset field and > setting QCOW_OFLAG_ZERO in the L2 entry. > > This flag is however only supported when qcow_version >= 3. In older >

[PATCH v2 10/12] acpi: move aml builder code for floppy device

2020-04-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/block/fdc.c | 83 hw/i386/acpi-build.c | 83 stubs/cmos.c | 7 stubs/Makefile.objs | 1 + 4 files changed, 91 insertions(+), 83 deletions(-) create

[PATCH v2 05/12] acpi: parallel: don't use _STA method

2020-04-03 Thread Gerd Hoffmann
The _STA method dates back to the days where we had a static DSDT. The device is listed in the DSDT table unconditionally and the _STA method checks a bit in the isa bridge pci config space to figure whenever a given is isa device is present or not, then evaluates to 0x0f (present) or 0x00

[PATCH v2 11/12] acpi: move aml builder code for i8042 (kbd+mouse) device

2020-04-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-build.c | 39 --- hw/input/pckbd.c | 31 +++ 2 files changed, 31 insertions(+), 39 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index

[PATCH v2 00/12] acpi: i386 tweaks

2020-04-03 Thread Gerd Hoffmann
First batch of microvm patches, some generic acpi stuff. Split the acpi-build.c monster, specifically split the pc and q35 and pci bits into a separate file which we can skip building at some point in the future. v2 changes: leave acpi-build.c largely as-is, move useful bits to other places to

[PATCH v2 09/12] acpi: move aml builder code for parallel device

2020-04-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/char/parallel.c | 25 + hw/i386/acpi-build.c | 23 --- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/hw/char/parallel.c b/hw/char/parallel.c index 8dd67d13759b..2bff1f17fda7 100644 ---

[PATCH v2 08/12] acpi: move aml builder code for serial device

2020-04-03 Thread Gerd Hoffmann
The code uses the isa_serial_io array to figure what the device uid is. Side effect is that acpi antries are not limited to port 1+2 any more, we'll also get entries for ports 3+4. Signed-off-by: Gerd Hoffmann --- hw/char/serial-isa.c | 32 hw/i386/acpi-build.c

[PATCH v2 06/12] acpi: add ISADeviceClass->build_aml()

2020-04-03 Thread Gerd Hoffmann
Also add isa_aml_build() function which walks all isa devices. This allows to move aml builder code to isa devices. Signed-off-by: Gerd Hoffmann --- include/hw/isa/isa.h | 2 ++ hw/i386/acpi-build.c | 1 + hw/isa/isa-bus.c | 15 +++ 3 files changed, 18 insertions(+) diff

[PATCH v2 02/12] acpi: add aml builder stubs

2020-04-03 Thread Gerd Hoffmann
Needed when moving aml builder code to devices. Signed-off-by: Gerd Hoffmann --- hw/acpi/aml-build-stub.c | 79 hw/acpi/Makefile.objs| 4 +- 2 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 hw/acpi/aml-build-stub.c diff --git

[PATCH v2 03/12] acpi: drop pointless _STA method

2020-04-03 Thread Gerd Hoffmann
When returning a constant there is no point in having a method in the first place, _STA can be a simple integer instead. Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-build.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/hw/i386/acpi-build.c

[PATCH v2 04/12] acpi: serial: don't use _STA method

2020-04-03 Thread Gerd Hoffmann
The _STA method dates back to the days where we had a static DSDT. The device is listed in the DSDT table unconditionally and the _STA method checks a bit in the isa bridge pci config space to figure whenever a given is isa device is present or not, then evaluates to 0x0f (present) or 0x00

[PATCH v2 07/12] acpi: move aml builder code for rtc device

2020-04-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-build.c | 17 - hw/rtc/mc146818rtc.c | 20 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 77fc9df74735..a5bc7764e611 100644 ---

[PATCH v2 12/12] acpi: factor out fw_cfg_add_acpi_dsdt()

2020-04-03 Thread Gerd Hoffmann
Add helper function to add fw_cfg device, also move code to hw/i386/fw_cfg.c. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/fw_cfg.h | 1 + hw/i386/acpi-build.c | 24 +--- hw/i386/fw_cfg.c | 28 3 files

[PATCH v2 01/12] move 'typedef Aml' to qemu/types.h

2020-04-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/hw/acpi/aml-build.h | 1 - include/qemu/typedefs.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index de4a4065682c..1bfe5844e984 100644 --- a/include/hw/acpi/aml-build.h

Re: [PATCH v10 10/14] iotests: add hmp helper with logging

2020-04-03 Thread Kevin Wolf
Am 02.04.2020 um 20:27 hat John Snow geschrieben: > On 4/1/20 8:40 AM, Max Reitz wrote: > > On 31.03.20 19:39, Kevin Wolf wrote: > >> Am 31.03.2020 um 19:23 hat John Snow geschrieben: > >>> > >>> > >>> On 3/31/20 6:21 AM, Max Reitz wrote: > On 31.03.20 02:00, John Snow wrote: > > Minor

Re: [PATCH for-5.0] aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring

2020-04-03 Thread Stefano Garzarella
On Thu, Apr 02, 2020 at 03:54:34PM +0100, Stefan Hajnoczi wrote: > When a file descriptor becomes ready we must re-arm POLL_ADD. This is > done by adding an sqe to the io_uring sq ring. The ->need_wait() > function wasn't taking pending sqes into account and therefore >