[PATCH] iotests/055: Use cache.no-flush for vmdk target

2020-05-04 Thread Kevin Wolf
055 uses the backup block job to create a compressed backup of an $IMGFMT image with both qcow2 and vmdk targets. However, cluster allocation in vmdk is very slow because it flushes the image file after each L2 update. There is no reason why we need this level of safety in this test, so let's disa

Re: [PATCH v5 06/18] nvme: refactor nvme_addr_read

2020-05-04 Thread Klaus Jensen
On May 5 07:48, Klaus Jensen wrote: > From: Klaus Jensen > > Pull the controller memory buffer check to its own function. The check > will be used on its own in later patches. > > Signed-off-by: Klaus Jensen > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Maxim Levitsky > Reviewed-by: K

[PATCH v5 16/18] nvme: factor out pmr setup

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 95 ++--- 1 file changed, 51 insertions(+), 44 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index bd255a5c711a..b0b3d3ffb75f 100644 --- a

[PATCH v5 17/18] nvme: do cmb/pmr init as part of pci init

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index b0b3d3ffb75f..6454f3810e5b 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c

[PATCH v5 13/18] nvme: factor out namespace setup

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 46 ++ 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/hw/block/nvme.c b/

[PATCH v5 15/18] nvme: factor out cmb setup

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 43 --- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/hw/block/nvme.c b/hw/b

[PATCH v5 12/18] nvme: add namespace helpers

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Introduce some small helpers to make the next patches easier on the eye. Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 3 +-- hw/block/nvme.h | 17 + 2 files chan

[PATCH v5 11/18] nvme: factor out block backend setup

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 72e838a476af.

[PATCH v5 14/18] nvme: factor out pci setup

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c i

[PATCH v5 18/18] nvme: factor out controller identify setup

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 49 ++--- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/hw/block/nvme.c

[PATCH v5 02/18] nvme: rename trace events to pci_nvme

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Change the prefix of all nvme device related trace events to 'pci_nvme' to not clash with trace events from the nvme block driver. Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c

[PATCH v5 09/18] nvme: factor out property/constraint checks

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 48 ++-- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/hw/block/nvme.c b

[PATCH v5 08/18] nvme: remove redundant cmbloc/cmbsz members

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 7 ++- hw/block/nvme.h | 2 -- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c in

[PATCH v5 10/18] nvme: factor out device state setup

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 13fb

[PATCH v5 07/18] nvme: add max_ioqpairs device parameter

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen The num_queues device paramater has a slightly confusing meaning because it accounts for the admin queue pair which is not really optional. Secondly, it is really a maximum value of queues allowed. Add a new max_ioqpairs parameter that only accounts for I/O queue pairs, but ke

[PATCH v5 00/18] nvme: refactoring and cleanups

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Changes since v5 No functional changes, just updated Reviewed-by tags. Also, I screwed up the CC list when sending v4. Philippe and Keith, please add a Reviewed-by to * "nvme: factor out pmr setup" and * "do cmb/pmr init as part of pci init" since the fi

[PATCH v5 04/18] nvme: move device parameters to separate struct

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Move device configuration parameters to separate struct to make it explicit what is configurable and what is set internally. Signed-off-by: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 49 ++

[PATCH v5 05/18] nvme: use constants in identify

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Keith Busch --- hw/block/nvme.c | 8 include/block/nvme.h | 8 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme.c b/

[PATCH v5 06/18] nvme: refactor nvme_addr_read

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen Pull the controller memory buffer check to its own function. The check will be used on its own in later patches. Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Maxim Levitsky Reviewed-by: Keith Busch --- hw/block/nvme.c | 16

[PATCH v5 03/18] nvme: remove superfluous breaks

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen These break statements was left over when commit 3036a626e9ef ("nvme: add Get/Set Feature Timestamp support") was merged. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Keith Busch --- hw/block/nvme.c | 4 1 f

[PATCH v5 01/18] nvme: fix pci doorbell size calculation

2020-05-04 Thread Klaus Jensen
From: Klaus Jensen The size of the BAR is 0x1000 (main registers) + 8 bytes for each queue. Currently, the size of the BAR is calculated like so: n->reg_size = pow2ceil(0x1004 + 2 * (n->num_queues + 1) * 4); Since the 'num_queues' parameter already accounts for the admin queue, this should

Re: [PATCH v4 00/18] nvme: factor out cmb/pmr setup

2020-05-04 Thread Philippe Mathieu-Daudé
Hi Klaus, On 5/5/20 6:31 AM, Klaus Jensen wrote: On Apr 29 07:40, Klaus Jensen wrote: On Apr 22 13:01, Klaus Jensen wrote: From: Klaus Jensen Changes since v3 * Remove the addition of a new PROPERTIES macro in "nvme: move device parameters to separate struct" (Philippe)

Re: [PATCH v4 00/18] nvme: factor out cmb/pmr setup

2020-05-04 Thread Klaus Jensen
On Apr 29 07:40, Klaus Jensen wrote: > On Apr 22 13:01, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Changes since v3 > > > > * Remove the addition of a new PROPERTIES macro in "nvme: move device > > parameters to separate struct" (Philippe) > > > > * Add NVME_PMR_BIR co

Re: [PATCH 5/6] block/nvme: Align block pages queue to host page size

2020-05-04 Thread David Gibson
On Mon, May 04, 2020 at 11:46:40AM +0200, Philippe Mathieu-Daudé wrote: > In nvme_create_queue_pair() we create a page list using > qemu_blockalign(), then map it with qemu_vfio_dma_map(): > > q->prp_list_pages = qemu_blockalign0(bs, s->page_size * NVME_QUEUE_SIZE); > r = qemu_vfio_dma_map(s->

[PULL 2/4] iotests/041: Fix NBD socket path

2020-05-04 Thread Eric Blake
From: Max Reitz We should put all UNIX socket files into the sock_dir, not test_dir. Reported-by: Elena Ufimtseva Signed-off-by: Max Reitz Message-Id: <20200424134626.78945-1-mre...@redhat.com> Reviewed-by: Eric Blake Fixes: a1da1878607a Reviewed-by: Stefan Hajnoczi Signed-off-by: Eric Blake

[PULL 3/4] block/nbd-client: drop max_block restriction from block_status

2020-05-04 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy The NBD spec was updated (see nbd.git commit 9f30fedb) so that max_block doesn't relate to NBD_CMD_BLOCK_STATUS. So, drop the restriction. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20200401150112.9557-2-vsement...@virtuo

[PULL 4/4] block/nbd-client: drop max_block restriction from discard

2020-05-04 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy The NBD spec was updated (see nbd.git commit 9f30fedb) so that max_block doesn't relate to NBD_CMD_TRIM. So, drop the restriction. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200401150112.9557-3-vsement...@virtuozzo.com> Reviewed-by: Eric Blake

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

2020-05-04 Thread Eric Blake
On 4/3/20 12:58 PM, Eric Blake wrote: 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

Re: [PATCH v2 2/6] block/nbd-client: drop max_block restriction from discard

2020-05-04 Thread Eric Blake
On 4/21/20 4:56 PM, Eric Blake wrote: On 4/1/20 10:01 AM, Vladimir Sementsov-Ogievskiy wrote: NBD spec is updated, so that max_block doesn't relate to NBD_CMD_TRIM. So, drop the restriction. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   block/nbd.c | 2 +-   1 file changed, 1 insertion(+),

Re: [PATCH 4/4] scripts/qmp: Fix QEMU Python scripts path

2020-05-04 Thread John Snow
On 5/2/20 1:54 AM, Markus Armbruster wrote: > John Snow writes: > >> On 4/30/20 1:04 AM, Markus Armbruster wrote: >>> John Snow writes: >>> On 4/21/20 5:42 AM, Philippe Mathieu-Daudé wrote: > QEMU Python scripts have been moved in commit 8f8fd9edba4 ("Introduce > Python module st

Re: [PATCH v3] qcow2: Avoid integer wraparound in qcow2_co_truncate()

2020-05-04 Thread Alberto Garcia
On Mon 04 May 2020 06:01:19 PM CEST, Eric Blake wrote: >> +_supported_fmt qcow2 >> +_supported_proto file > > Do we have to limit it to qcow2 and file? Yes, it's testing a bugfix > for qcow2, but are there other formats that it doesn't hurt to have > the extra testing? It doesn't work with any ot

Re: [PATCH 0/8] iotests skipping

2020-05-04 Thread Kevin Wolf
Am 30.04.2020 um 14:47 hat Vladimir Sementsov-Ogievskiy geschrieben: > Hi all! > > This series adds a bit more support for iotests skipping due to format > whitelisting. Not pretend to be something complete. It just lay in its > folder I don't know how much time, I forgot to send it. > > Still, n

Re: [PATCH v3] qcow2: Avoid integer wraparound in qcow2_co_truncate()

2020-05-04 Thread Eric Blake
On 5/4/20 10:52 AM, Alberto Garcia wrote: After commit f01643fb8b47e8a70c04bbf45e0f12a9e5bc54de when an image is extended and BDRV_REQ_ZERO_WRITE is set then the new clusters are zeroized. The code however does not detect correctly situations when the old and the new end of the image are within

Re: [PATCH v3 10/15] acpi: parallel: don't use _STA method

2020-05-04 Thread Igor Mammedov
On Mon, 4 May 2020 15:25:16 +0200 Gerd Hoffmann wrote: > On Thu, Apr 30, 2020 at 06:25:24PM +0200, Igor Mammedov wrote: > > On Wed, 29 Apr 2020 15:59:58 +0200 > > Gerd Hoffmann wrote: > > > > > The _STA method dates back to the days where we had a static DSDT. The > > > device is listed in t

[PATCH v3] qcow2: Avoid integer wraparound in qcow2_co_truncate()

2020-05-04 Thread Alberto Garcia
After commit f01643fb8b47e8a70c04bbf45e0f12a9e5bc54de when an image is extended and BDRV_REQ_ZERO_WRITE is set then the new clusters are zeroized. The code however does not detect correctly situations when the old and the new end of the image are within the same cluster. The problem can be reprodu

Re: [RFC PATCH 6/6] hw/block/nvme: Make device target agnostic

2020-05-04 Thread Philippe Mathieu-Daudé
+Keith new email On 5/4/20 11:46 AM, Philippe Mathieu-Daudé wrote: The NVMe device should not use target specific API. Use memory_region_do_writeback() (which was introduced in commit 61c490e25e0, after the NVMe emulated device was added) to replace qemu_ram_writeback(). Signed-off-by: Philippe

[PULL v2 4/4] lockable: Replace locks with lock guard macros

2020-05-04 Thread Stefan Hajnoczi
From: Simran Singhal Replace manual lock()/unlock() calls with lock guard macros (QEMU_LOCK_GUARD/WITH_QEMU_LOCK_GUARD). Signed-off-by: Simran Singhal Reviewed-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum Tested-by: Yuval Shaia Message-id: 20200402065035.GA15477@simran-Inspiron-5558 Signed-o

[PULL v2 2/4] lockable: fix __COUNTER__ macro to be referenced properly

2020-05-04 Thread Stefan Hajnoczi
From: Daniel Brodsky - __COUNTER__ doesn't work with ## concat - replaced ## with glue() macro so __COUNTER__ is evaluated Fixes: 3284c3ddc4 Signed-off-by: Daniel Brodsky Message-id: 20200404042108.389635-2-dnbrd...@gmail.com Signed-off-by: Stefan Hajnoczi --- include/qemu/lockable.h | 7 +++

[PULL v2 3/4] lockable: replaced locks with lock guard macros where appropriate

2020-05-04 Thread Stefan Hajnoczi
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 Reviewed-by: Juan Quintela Message-id: 20200404

[PULL v2 0/4] Block patches

2020-05-04 Thread Stefan Hajnoczi
The following changes since commit 9af638cc1f665712522608c5d6b8c03d8fa67666: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200504' into staging (2020-05-04 13:37:17 +0100) are available in the Git repository at: https://github.com/stefanha/qemu.git tags/

[PULL v2 1/4] fuzz: select fuzz target using executable name

2020-05-04 Thread Stefan Hajnoczi
From: Alexander Bulekov The fuzzers are built into a binary (e.g. qemu-fuzz-i386). To select the device to fuzz/fuzz target, we usually use the --fuzz-target= argument. This commit allows the fuzz-target to be specified using the name of the executable. If the executable name ends with -target-FU

Re: [PATCH v3 08/15] acpi: serial: don't use _STA method

2020-05-04 Thread Philippe Mathieu-Daudé
On 5/4/20 3:19 PM, Gerd Hoffmann wrote: -static Aml *build_com_device_aml(uint8_t uid) +static void build_com_device_aml(Aml *scope, uint8_t uid) { Aml *dev; Aml *crs; -Aml *method; -Aml *if_ctx; -Aml *else_ctx; -Aml *zero = aml_int(0); -Aml *is_present = aml_

Re: [PATCH] qcow2: Avoid integer wraparound in qcow2_co_truncate()

2020-05-04 Thread Eric Blake
On 5/4/20 8:47 AM, Alberto Garcia wrote: Drop this hunk (leave zero_start unchanged), and instead... So, using your numbers, pre-patch, we have zero_start = 0x9 (0x82000 rounded up to 0x1 alignment).  post-patch, the new MIN() lowers it back to 0x8dc00 (the new size), which is unalign

Re: [PATCH v3 15/15] acpi: simplify build_isa_devices_aml()

2020-05-04 Thread Philippe Mathieu-Daudé
On 5/4/20 3:46 PM, Gerd Hoffmann wrote: On Thu, Apr 30, 2020 at 08:48:31AM +0200, Philippe Mathieu-Daudé wrote: Cc'ing IPMI maintainer. On 4/29/20 4:00 PM, Gerd Hoffmann wrote: x86 machines can have a single ISA bus only. I disagree with the comment. Machines can have multiple ISA bus.

Re: [PATCH v2] qcow2: Avoid integer wraparound in qcow2_co_truncate()

2020-05-04 Thread Kevin Wolf
Am 04.05.2020 um 16:23 hat Alberto Garcia geschrieben: > After commit f01643fb8b47e8a70c04bbf45e0f12a9e5bc54de when an image is > extended and BDRV_REQ_ZERO_WRITE is set then the new clusters are > zeroized. > > The code however does not detect correctly situations when the old and > the new end o

[PULL 11/29] vhost-user-blk: fix invalid memory access

2020-05-04 Thread Michael S. Tsirkin
From: Li Feng when s->inflight is freed, vhost_dev_free_inflight may try to access s->inflight->addr, it will retrigger the following issue. ==7309==ERROR: AddressSanitizer: heap-use-after-free on address 0x604001020d18 at pc 0x55ce948a bp 0x7fffb170 sp 0x7fffb160 READ of size 8 at

[PATCH v2] qcow2: Avoid integer wraparound in qcow2_co_truncate()

2020-05-04 Thread Alberto Garcia
After commit f01643fb8b47e8a70c04bbf45e0f12a9e5bc54de when an image is extended and BDRV_REQ_ZERO_WRITE is set then the new clusters are zeroized. The code however does not detect correctly situations when the old and the new end of the image are within the same cluster. The problem can be reprodu

Re: [PATCH RESEND v3 0/4] virtio-pci: enable blk and scsi multi-queue by default

2020-05-04 Thread Michael S. Tsirkin
On Fri, Mar 20, 2020 at 10:30:37AM +, Stefan Hajnoczi wrote: > v3: > * Add new performance results that demonstrate the scalability > * Mention that this is PCI-specific [Cornelia] > v2: > * Let the virtio-DEVICE-pci device select num-queues because the optimal >multi-queue configuration

Re: [PATCH v2] Fix iotest 153

2020-05-04 Thread Maxim Levitsky
On Mon, 2020-05-04 at 15:55 +0200, Max Reitz wrote: > On 04.05.20 15:19, Maxim Levitsky wrote: > > Commit f62514b3def5fb2acbef64d0e053c0c31fa45aff made qemu-img reject -o "" > > but this test uses it. > > Since this test only tries to do a dry-run run of qemu-img amend, > > replace the -o "" with

Re: [PATCH v2] Fix iotest 153

2020-05-04 Thread Max Reitz
On 04.05.20 15:19, Maxim Levitsky wrote: > Commit f62514b3def5fb2acbef64d0e053c0c31fa45aff made qemu-img reject -o "" > but this test uses it. > Since this test only tries to do a dry-run run of qemu-img amend, > replace the -o "" with dummy -o "size=$size". > > Fixes: f62514b3def5fb2acbef64d0e05

Re: [PATCH] qcow2: Avoid integer wraparound in qcow2_co_truncate()

2020-05-04 Thread Alberto Garcia
On Fri 01 May 2020 08:48:31 PM CEST, Eric Blake wrote: > Since your reproducer triggers assertion failure, I suggest doing this > instead: >>> +++ b/block/qcow2.c >>> @@ -4234,6 +4234,9 @@ static int coroutine_fn >>> qcow2_co_truncate(BlockDriverState *bs, int64_t offset, >>>   if ((flags & B

Re: [PATCH v3 15/15] acpi: simplify build_isa_devices_aml()

2020-05-04 Thread Gerd Hoffmann
On Thu, Apr 30, 2020 at 08:48:31AM +0200, Philippe Mathieu-Daudé wrote: > Cc'ing IPMI maintainer. > > On 4/29/20 4:00 PM, Gerd Hoffmann wrote: > > x86 machines can have a single ISA bus only. > > I disagree with the comment. > Machines can have multiple ISA bus. Note *x86* machines. Given x86 h

Re: [PATCH v2 4/6] qcow2: Expose bitmaps' size during measure

2020-05-04 Thread Eric Blake
On 5/4/20 6:36 AM, Max Reitz wrote: On 21.04.20 23:20, Eric Blake wrote: It's useful to know how much space can be occupied by qcow2 persistent bitmaps, even though such metadata is unrelated to the guest-visible data. Report this value as an additional field. Update iotest 190 to cover it and

Re: [Bug 1875762] [NEW] Poor disk performance on sparse VMDKs

2020-05-04 Thread Stefan Hajnoczi
On Tue, Apr 28, 2020 at 10:45:07PM -, Alan Murtagh wrote: > QEMU appears to suffer from remarkably poor disk performance when > writing to sparse-extent VMDKs. Of course it's to be expected that > allocation takes time and sparse VMDKs peform worse than allocated > VMDKs, but surely not on the

Re: [PATCH v2 3/6] qemu-img: Add bitmap sub-command

2020-05-04 Thread Eric Blake
On 5/4/20 5:01 AM, Max Reitz wrote: +.. option:: bitmap {--add [-g GRANULARITY] [--disabled] | --remove | --clear | --enable | --disable | --merge SOURCE_BITMAP [-b SOURCE_FILE [-F SOURCE_FMT]]} [--object OBJECTDEF] [--image-opts] [-f FMT] FILENAME BITMAP So I can do multiple operations in one

Re: [PATCH v3 10/15] acpi: parallel: don't use _STA method

2020-05-04 Thread Gerd Hoffmann
On Thu, Apr 30, 2020 at 06:25:24PM +0200, Igor Mammedov wrote: > On Wed, 29 Apr 2020 15:59:58 +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 t

Re: [PATCH] iotests/041: Fix NBD socket path

2020-05-04 Thread Stefan Hajnoczi
On Fri, Apr 24, 2020 at 03:46:26PM +0200, Max Reitz wrote: > We should put all UNIX socket files into the sock_dir, not test_dir. > > Reported-by: Elena Ufimtseva > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/041 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Cool, thanks for

Re: [PATCH v3 10/15] acpi: parallel: don't use _STA method

2020-05-04 Thread Gerd Hoffmann
Hi, > Also, it may be worth a ISA_PARALLEL_IOBASE 0x378 definition cleanup like > you did with the RTC. Next patch in series deals with that. take care, Gerd

[PATCH v2] Fix iotest 153

2020-05-04 Thread Maxim Levitsky
Commit f62514b3def5fb2acbef64d0e053c0c31fa45aff made qemu-img reject -o "" but this test uses it. Since this test only tries to do a dry-run run of qemu-img amend, replace the -o "" with dummy -o "size=$size". Fixes: f62514b3def5fb2acbef64d0e053c0c31fa45aff Signed-off-by: Maxim Levitsky --- te

Re: [PATCH v3 08/15] acpi: serial: don't use _STA method

2020-05-04 Thread Gerd Hoffmann
> > -static Aml *build_com_device_aml(uint8_t uid) > > +static void build_com_device_aml(Aml *scope, uint8_t uid) > > { > > Aml *dev; > > Aml *crs; > > -Aml *method; > > -Aml *if_ctx; > > -Aml *else_ctx; > > -Aml *zero = aml_int(0); > > -Aml *is_present = aml_local

Re: [PATCH] Fix iotest 153

2020-05-04 Thread Maxim Levitsky
On Mon, 2020-05-04 at 15:08 +0200, Max Reitz wrote: > On 04.05.20 11:41, Maxim Levitsky wrote: > > On Mon, 2020-05-04 at 11:22 +0200, Max Reitz wrote: > > > On 03.05.20 18:49, Maxim Levitsky wrote: > > > > Commit f62514b3def5fb2acbef64d0e053c0c31fa45aff made qemu-img reject -o > > > > "" but this

Re: [PATCH] Fix iotest 153

2020-05-04 Thread Max Reitz
On 04.05.20 11:41, Maxim Levitsky wrote: > On Mon, 2020-05-04 at 11:22 +0200, Max Reitz wrote: >> On 03.05.20 18:49, Maxim Levitsky wrote: >>> Commit f62514b3def5fb2acbef64d0e053c0c31fa45aff made qemu-img reject -o "" >>> but this test uses it >>> >>> Since this test only tries to do a dry-run run

Re: [PATCH v2 6/6] iotests: Add test 291 to for qemu-img bitmap coverage

2020-05-04 Thread Max Reitz
On 21.04.20 23:20, Eric Blake wrote: > Add a new test covering the 'qemu-img bitmap' subcommand, as well as > 'qemu-img convert --bitmaps', both added in recent patches. > > Signed-off-by: Eric Blake > --- > tests/qemu-iotests/291 | 103 + > tests/qemu-iot

Re: [PATCH v3 00/15] acpi: i386 tweaks

2020-05-04 Thread Michael S. Tsirkin
On Wed, Apr 29, 2020 at 03:59:48PM +0200, Gerd Hoffmann wrote: > 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. OK I applied 1

Re: [PATCH v2 5/6] qemu-img: Add convert --bitmaps option

2020-05-04 Thread Max Reitz
On 21.04.20 23:20, Eric Blake wrote: > Make it easier to copy all the persistent bitmaps of a source image > along with the contents, by adding a boolean flag for use with > qemu-img convert. This is basically shorthand, as the same effect > could be accomplished with a series of 'qemu-img bitmap

Re: [PATCH v2 4/6] qcow2: Expose bitmaps' size during measure

2020-05-04 Thread Max Reitz
On 21.04.20 23:20, Eric Blake wrote: > It's useful to know how much space can be occupied by qcow2 persistent > bitmaps, even though such metadata is unrelated to the guest-visible > data. Report this value as an additional field. Update iotest 190 to > cover it and a portion of the just-added qe

Re: [PATCH v3 00/14] LUKS: encryption slot management using amend interface

2020-05-04 Thread Maxim Levitsky
On Mon, 2020-05-04 at 11:19 +0100, Daniel P. Berrangé wrote: > On Sun, May 03, 2020 at 09:43:10PM +0300, Maxim Levitsky wrote: > > Hi! > > Here is the updated series of my patches, incorporating all the feedback I > > received. > > > > This implements the API interface that we agreed upon except

Re: [PATCH v3 00/14] LUKS: encryption slot management using amend interface

2020-05-04 Thread Daniel P . Berrangé
On Sun, May 03, 2020 at 09:43:10PM +0300, Maxim Levitsky wrote: > Hi! > Here is the updated series of my patches, incorporating all the feedback I > received. > > This implements the API interface that we agreed upon except that I merged the > LUKSKeyslotActive/LUKSKeyslotInactive union into a st

[PATCH v2 2/3] various: Remove unnecessary OBJECT() cast

2020-05-04 Thread Philippe Mathieu-Daudé
The OBJECT() macro is defined as: #define OBJECT(obj) ((Object *)(obj)) which expands to: ((Object *)object_dynamic_cast_assert((Object *)(obj), (name), __FILE__, __LINE__, __func__)) This assertion can only fail when @obj points to something other th

[PATCH v2 1/3] target: Remove unnecessary CPU() cast

2020-05-04 Thread Philippe Mathieu-Daudé
The CPU() macro is defined as: #define CPU(obj) ((CPUState *)(obj)) which expands to: ((CPUState *)object_dynamic_cast_assert((Object *)(obj), (name), __FILE__, __LINE__, __func__)) This assertion can only fail when @obj points to something other th

[PATCH v2 3/3] hw: Remove unnecessary DEVICE() cast

2020-05-04 Thread Philippe Mathieu-Daudé
The DEVICE() macro is defined as: #define DEVICE(obj) OBJECT_CHECK(DeviceState, (obj), TYPE_DEVICE) which expands to: ((DeviceState *)object_dynamic_cast_assert((Object *)(obj), (name), __FILE__, __LINE__,

[PATCH v2 0/3] various: Remove unnecessary casts

2020-05-04 Thread Philippe Mathieu-Daudé
Remove unnecessary casts using coccinelle scripts. The CPU()/OBJECT() patches don't introduce logical change, The DEVICE() one removes various OBJECT_CHECK() calls. Since v2: - Add A-b/R-b tags - Reword description (Markus) Philippe Mathieu-Daudé (3): target: Remove unnecessary CPU() cast va

Re: [PATCH v2 3/6] qemu-img: Add bitmap sub-command

2020-05-04 Thread Max Reitz
On 30.04.20 17:21, Eric Blake wrote: > On 4/30/20 9:55 AM, Max Reitz wrote: >> On 21.04.20 23:20, Eric Blake wrote: >>> Include actions for --add, --remove, --clear, --enable, --disable, and >>> --merge (note that --clear is a bit of fluff, because the same can be >>> accomplished by removing a bit

Re: [PATCH v2] Compress lines for immediate return

2020-05-04 Thread Laurent Vivier
Le 03/04/2020 à 14:53, Stefan Hajnoczi a écrit : > 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. >> >>

Re: Backup of vm disk images

2020-05-04 Thread Kashyap Chamarthy
On Fri, May 01, 2020 at 04:05:47PM +0100, Stefan Hajnoczi wrote: > On Wed, Apr 22, 2020 at 07:51:09AM +0200, Anders Östling wrote: Hi Anders, > > I am fighting to understand the difference between backing up a VM by > > using a regular copy vs using the virsh blockcopy command. tl;dr: While 'blo

[PATCH] hw/ide/ahci: Log lost IRQs

2020-05-04 Thread Philippe Mathieu-Daudé
One might find interesting to look at AHCI IRQs. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ahci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 13d91e109a..fc82cbd5f1 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1509,6 +1509,7 @@ static void

[PATCH 5/6] block/nvme: Align block pages queue to host page size

2020-05-04 Thread Philippe Mathieu-Daudé
In nvme_create_queue_pair() we create a page list using qemu_blockalign(), then map it with qemu_vfio_dma_map(): q->prp_list_pages = qemu_blockalign0(bs, s->page_size * NVME_QUEUE_SIZE); r = qemu_vfio_dma_map(s->vfio, q->prp_list_pages, s->page_size * NVME_QUEUE_SIZE, .

[RFC PATCH 6/6] hw/block/nvme: Make device target agnostic

2020-05-04 Thread Philippe Mathieu-Daudé
The NVMe device should not use target specific API. Use memory_region_do_writeback() (which was introduced in commit 61c490e25e0, after the NVMe emulated device was added) to replace qemu_ram_writeback(). Signed-off-by: Philippe Mathieu-Daudé --- RFC because I have no clue how dirty_log_mask work

[PATCH 3/6] sysemu/block-backend: Document blk_read()/blk_pwrite()

2020-05-04 Thread Philippe Mathieu-Daudé
The blk_read()/blk_pwrite() return value is not obvious, document it. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/block-backend.h | 24 1 file changed, 24 insertions(+) diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index f2dcf

[PATCH 4/6] block/block: Document BlockSizes fields

2020-05-04 Thread Philippe Mathieu-Daudé
As it is not obvious for a block neophyte what means the 'log' value, document it. Signed-off-by: Philippe Mathieu-Daudé --- include/block/block.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/block/block.h b/include/block/block.h index c57fdecf9a..94517c92b6 10

[PATCH 0/6] block/nvme: Align block pages queue to host page size

2020-05-04 Thread Philippe Mathieu-Daudé
The most important patch of this series is 'Align block pages queue to host page size', it start fixing an issue on PowerPC hosts. It is not sufficient, but the rest is VFIO specific, so I prefer to send it separately. The other patches are documentation I was writing down while looking at the cod

[PATCH 2/6] qemu/bitmap: Document bitmap_new() returned pointer

2020-05-04 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/bitmap.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h index 82a1d2f41f..0b390ff576 100644 --- a/include/qemu/bitmap.h +++ b/include/qemu/bitmap.h @@ -90,12 +90,14 @@ int slow_bitmap_inter

[PATCH 1/6] qemu/osdep: Document qemu_memalign() and friends

2020-05-04 Thread Philippe Mathieu-Daudé
Document allocator functions that require a specific de-allocator call. Signed-off-by: Philippe Mathieu-Daudé --- include/block/block.h | 4 include/qemu/osdep.h | 3 +++ include/sysemu/block-backend.h | 2 ++ 3 files changed, 9 insertions(+) diff --git a/include/block/b

Re: [PATCH] MAINTAINERS: Update Keith Busch's email address

2020-05-04 Thread Laurent Vivier
Le 04/05/2020 à 10:58, Philippe Mathieu-Daudé a écrit : > +block +trivial to raise the odds to get this patch merged. > > On 4/22/20 6:45 PM, Keith Busch wrote: >> On Tue, Apr 21, 2020 at 02:22:36PM +0200, Philippe Mathieu-Daudé wrote: >>> keith.bu...@intel.com address is being rejected. >>> Repla

Re: [PATCH] Fix iotest 153

2020-05-04 Thread Maxim Levitsky
On Mon, 2020-05-04 at 11:22 +0200, Max Reitz wrote: > On 03.05.20 18:49, Maxim Levitsky wrote: > > Commit f62514b3def5fb2acbef64d0e053c0c31fa45aff made qemu-img reject -o "" > > but this test uses it > > > > Since this test only tries to do a dry-run run of qemu-img amend, replace > > the -o ""

Re: [PATCH] Fix iotest 153

2020-05-04 Thread Max Reitz
On 03.05.20 18:49, Maxim Levitsky wrote: > Commit f62514b3def5fb2acbef64d0e053c0c31fa45aff made qemu-img reject -o "" > but this test uses it > > Since this test only tries to do a dry-run run of qemu-img amend, replace the > -o "" with > dummy -o "size=0" since due to the nature of the test, it

Re: [PATCH v2 02/14] qcrypto/luks: implement encryption key management

2020-05-04 Thread Daniel P . Berrangé
On Sun, May 03, 2020 at 11:55:35AM +0300, Maxim Levitsky wrote: > On Tue, 2020-04-28 at 14:16 +0100, Daniel P. Berrangé wrote: > > On Sun, Mar 08, 2020 at 05:18:51PM +0200, Maxim Levitsky wrote: > > > Next few patches will expose that functionality > > > to the user. > > > > > > Signed-off-by: Max

Re: [PATCH] MAINTAINERS: Update Keith Busch's email address

2020-05-04 Thread Philippe Mathieu-Daudé
+block +trivial to raise the odds to get this patch merged. On 4/22/20 6:45 PM, Keith Busch wrote: On Tue, Apr 21, 2020 at 02:22:36PM +0200, Philippe Mathieu-Daudé wrote: keith.bu...@intel.com address is being rejected. Replace by the email address Keith is actively using. Signed-off-by: Phili

Re: [PATCH v2 1/3] MAINTAINERS: Cover the GDB Python scripts in the gdbstub section

2020-05-04 Thread Philippe Mathieu-Daudé
On 4/30/20 9:59 AM, Kevin Wolf wrote: Am 30.04.2020 um 08:57 hat Philippe Mathieu-Daudé geschrieben: Keep an eye on these "same same, but different" files. Acked-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTA

Re: Backup of vm disk images

2020-05-04 Thread Peter Krempa
On Fri, May 01, 2020 at 16:05:47 +0100, Stefan Hajnoczi wrote: > On Wed, Apr 22, 2020 at 07:51:09AM +0200, Anders Östling wrote: > > I am fighting to understand the difference between backing up a VM by > > using a regular copy vs using the virsh blockcopy command. > > What I want to do is to suspe

Re: [PATCH v22 3/4] qcow2: add zstd cluster compression

2020-05-04 Thread Max Reitz
On 30.04.20 15:56, Denis Plotnikov wrote: > > > On 30.04.2020 14:47, Max Reitz wrote: >> On 30.04.20 11:48, Denis Plotnikov wrote: >>> >>> On 30.04.2020 11:26, Max Reitz wrote: On 29.04.20 15:02, Vladimir Sementsov-Ogievskiy wrote: > 29.04.2020 15:17, Max Reitz wrote: >> On 29.04.20