Re: [Qemu-devel] [PATCH 3/4] docker: update fedora to f30

2019-05-28 Thread Philippe Mathieu-Daudé
On 5/24/19 1:17 PM, Marc-André Lureau wrote: > Hi > > On Fri, May 24, 2019 at 9:41 AM Philippe Mathieu-Daudé > wrote: >> >> On 5/24/19 1:40 AM, Marc-André Lureau wrote: >>> Released last month. >>> >>> Signed-off-by: Marc-André Lureau >>> --- >>> tests/docker/dockerfiles/fedora.docker | 2 +- >>

[Qemu-devel] [PATCH v2] tests/docker: Update the Fedora image to Fedora 30

2019-05-28 Thread Philippe Mathieu-Daudé
Fedora 30 got released: https://fedoramagazine.org/announcing-fedora-30/ Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Marc-André Lureau Tested-by: Stefano Garzarella Reviewed-by: Stefano Garzarella --- v2: Added Marc-André and Stefano tags --- tests/docker/dockerfiles/fedora.docker

[Qemu-devel] [Bug 1829242] Re: qemu on windows host exits after savevm command

2019-05-28 Thread Dr. David Alan Gilbert
Sorry, no idea - I don't know windows build/debug. (I know the migration code that savevm uses, which is why I looked at this bug) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1829242 Title: qemu

Re: [Qemu-devel] [PATCH v2] tests/docker: Update the Fedora image to Fedora 30

2019-05-28 Thread Philippe Mathieu-Daudé
Cc'ing Michael/Igor/Stefan about git comment format. On 5/28/19 5:33 PM, Philippe Mathieu-Daudé wrote: > Fedora 30 got released: > > https://fedoramagazine.org/announcing-fedora-30/ > > Signed-off-by: Philippe Mathieu-Daudé > Signed-off-by: Marc-André Lureau > Tested-by: Stefano Garzarella

Re: [Qemu-devel] [PATCH v2 2/2] block: avoid recursive block_status call if possible

2019-05-28 Thread Max Reitz
On 28.05.19 08:39, Vladimir Sementsov-Ogievskiy wrote: > 27.05.2019 18:13, Max Reitz wrote: >> On 08.04.19 18:26, Vladimir Sementsov-Ogievskiy wrote: >>> drv_co_block_status digs bs->file for additional, more accurate search >>> for hole inside region, reported as DATA by bs since 5daa74a6ebc. >>>

Re: [Qemu-devel] [PATCH] hw/scsi/vmw_pvscsi: Use qbus_reset_all() directly

2019-05-28 Thread Philippe Mathieu-Daudé
On 5/28/19 4:12 PM, Peter Maydell wrote: > On Tue, 28 May 2019 at 15:08, Philippe Mathieu-Daudé > wrote: >> >> Since the BusState is accesible from the SCSIBus object, >> it is pointless to use qbus_reset_all_fn. >> Use qbus_reset_all() directly. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --

Re: [Qemu-devel] [PATCH 4/4] Makefile: Reuse all's recursion machinery for clean and install

2019-05-28 Thread Philippe Mathieu-Daudé
On 5/28/19 10:23 AM, Markus Armbruster wrote: > Targets "clean" and "install" run make recursively in a for loop. > This ignores -j and -k. Target "all" depends on SUBDIR/all to recurse > into each SUBDIR. Behaves nicely with -j and -k. Put that to use for > "clean" and "install": depend on SUBD

Re: [Qemu-devel] [PATCH v2] tests/docker: Update the Fedora image to Fedora 30

2019-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2019 at 05:36:54PM +0200, Philippe Mathieu-Daudé wrote: > Cc'ing Michael/Igor/Stefan about git comment format. > > On 5/28/19 5:33 PM, Philippe Mathieu-Daudé wrote: > > Fedora 30 got released: > > > > https://fedoramagazine.org/announcing-fedora-30/ > > > > Signed-off-by: Phili

Re: [Qemu-devel] [PATCH v2] tests/docker: Update the Fedora image to Fedora 30

2019-05-28 Thread Philippe Mathieu-Daudé
On 5/28/19 6:08 PM, Michael S. Tsirkin wrote: > On Tue, May 28, 2019 at 05:36:54PM +0200, Philippe Mathieu-Daudé wrote: >> Cc'ing Michael/Igor/Stefan about git comment format. >> >> On 5/28/19 5:33 PM, Philippe Mathieu-Daudé wrote: >>> Fedora 30 got released: >>> >>> https://fedoramagazine.org/an

Re: [Qemu-devel] [PATCH v2] blockdev: loosen restrictions on drive-backup source node

2019-05-28 Thread Max Reitz
On 21.05.19 23:00, John Snow wrote: > We mandate that the source node must be a root node; but there's no reason > I am aware of that it needs to be restricted to such. In some cases, we need > to make sure that there's a medium present, but in the general case we can > allow the backup job itself

Re: [Qemu-devel] [PATCH] linux-user: fix __NR_semtimedop undeclared error

2019-05-28 Thread Laurent Vivier
On 23/05/2019 19:54, Laurent Vivier wrote: In current code, __NR_msgrcv and__NR_semtimedop are supposed to be defined if __NR_msgsnd is defined. But linux headers 5.2-rc1 for MIPS define __NR_msgsnd without defining __NR_semtimedop and it breaks the QEMU build. __NR_semtimedop is defined in asm

[Qemu-devel] [PULL v2 00/27] testing/next (system tests, docker, some iotests)

2019-05-28 Thread Alex Bennée
The following changes since commit a7b21f6762a2d6ec08106d8a7ccb11829914523f: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-4.1-pull-request' into staging (2019-05-24 12:47:49 +0100) are available in the Git repository at: https://github.com/stsquad/qemu.git tags/pull-te

[Qemu-devel] [PATCH v2 04/10] hw/s390x/event-facility: Use the QOM BUS() macro to access BusState.qbus

2019-05-28 Thread Philippe Mathieu-Daudé
Rather than looking inside the definition of a BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)". This patch was generated using the following Coccinelle script: // Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identi

[Qemu-devel] [PATCH v2 06/10] hw/audio/ac97: Use the QOM DEVICE() macro to access DeviceState.qdev

2019-05-28 Thread Philippe Mathieu-Daudé
Rather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)". This patch was generated using the following Coccinelle script (with a bit of manual fix-up, removing an extra space to please checkpatch.pl): // Use DEVICE() macros to access D

[Qemu-devel] [PATCH v2 07/10] hw/isa: Use the QOM DEVICE() macro to access DeviceState.qdev

2019-05-28 Thread Philippe Mathieu-Daudé
Rather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)". This patch was generated using the following Coccinelle script: // Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; i

[Qemu-devel] [PATCH v2 02/10] hw/scsi: Use the QOM BUS() macro to access BusState.qbus

2019-05-28 Thread Philippe Mathieu-Daudé
Rather than looking inside the definition of a BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)". This patch was generated using the following Coccinelle script: // Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identi

[Qemu-devel] [PATCH v2 08/10] hw/usb-storage: Use the QOM DEVICE() macro to access DeviceState.qdev

2019-05-28 Thread Philippe Mathieu-Daudé
Rather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)". This patch was generated using the following Coccinelle script: // Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; i

[Qemu-devel] [PATCH v2 10/10] hw/watchdog/wdt_i6300esb: Use DEVICE() macro to access DeviceState.qdev

2019-05-28 Thread Philippe Mathieu-Daudé
Rather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)". This patch was generated using the following Coccinelle script: // Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; i

[Qemu-devel] [PATCH v2 09/10] hw/vfio/pci: Use the QOM DEVICE() macro to access DeviceState.qdev

2019-05-28 Thread Philippe Mathieu-Daudé
Rather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)". This patch was generated using the following Coccinelle script: // Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; i

Re: [Qemu-devel] [PATCH v2 05/10] hw/sd: Use the QOM BUS() macro to access BusState.qbus

2019-05-28 Thread Peter Maydell
On Tue, 28 May 2019 at 17:42, Philippe Mathieu-Daudé wrote: > > Rather than looking inside the definition of a BusState with "s->bus.qbus", > use the QOM prefered style: "BUS(&s->bus)". > > This patch was generated using the following Coccinelle script: > > // Use BUS() macros to access BusSta

[Qemu-devel] [PATCH v2 00/10] qom: Use BUS()/DEVICE() macros instead of looking inside definitions

2019-05-28 Thread Philippe Mathieu-Daudé
v1 was a simple patch: 'use qbus_reset_all() directly instead of qbus_reset_all_fn' where I was looking inside the definition of BusState. Peter suggested to use the prefered QOM style, using the BUS/DEVICE macros. While here, I also cleaned the rest of the codebase. Philippe Mathieu-Daudé (10):

[Qemu-devel] [PATCH v2 05/10] hw/sd: Use the QOM BUS() macro to access BusState.qbus

2019-05-28 Thread Philippe Mathieu-Daudé
Rather than looking inside the definition of a BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)". This patch was generated using the following Coccinelle script: // Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identi

Re: [Qemu-devel] [PATCH v2 03/10] hw/pci-bridge: Use the QOM BUS() macro to access BusState.qbus

2019-05-28 Thread Marcel Apfelbaum
On 5/28/19 7:40 PM, Philippe Mathieu-Daudé wrote: Rather than looking inside the definition of a BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)". This patch was generated using the following Coccinelle script: // Use BUS() macros to access BusState.qbus @use

[Qemu-devel] [PATCH v2 03/10] hw/pci-bridge: Use the QOM BUS() macro to access BusState.qbus

2019-05-28 Thread Philippe Mathieu-Daudé
Rather than looking inside the definition of a BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)". This patch was generated using the following Coccinelle script: // Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identi

[Qemu-devel] [PATCH v2 01/10] hw/scsi/vmw_pvscsi: Use qbus_reset_all() directly

2019-05-28 Thread Philippe Mathieu-Daudé
Since the BusState is accesible from the SCSIBus object, it is pointless to use qbus_reset_all_fn. Use qbus_reset_all() directly. Signed-off-by: Philippe Mathieu-Daudé --- v2: Use BUS() macro (Peter Maydell) One step toward removing qbus_reset_all_fn() --- hw/scsi/vmw_pvscsi.c | 4 ++-- 1 file

Re: [Qemu-devel] [PATCH v2 06/10] hw/audio/ac97: Use the QOM DEVICE() macro to access DeviceState.qdev

2019-05-28 Thread Peter Maydell
On Tue, 28 May 2019 at 17:42, Philippe Mathieu-Daudé wrote: > > Rather than looking inside the definition of a DeviceState with > "s->qdev", use the QOM prefered style: "DEVICE(s)". > > This patch was generated using the following Coccinelle script > (with a bit of manual fix-up, removing an extra

Re: [Qemu-devel] [PATCH v2 07/10] hw/isa: Use the QOM DEVICE() macro to access DeviceState.qdev

2019-05-28 Thread Marcel Apfelbaum
On 5/28/19 7:40 PM, Philippe Mathieu-Daudé wrote: Rather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)". This patch was generated using the following Coccinelle script: // Use DEVICE() macros to access DeviceState.qdev @u

Re: [Qemu-devel] [PULL 00/16] tcg queued patches

2019-05-28 Thread David Hildenbrand
On 23.05.19 00:28, Richard Henderson wrote: > The following changes since commit a4f667b6714916683408b983cfe0a615a725775f: > > Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190521-3' into > staging (2019-05-21 16:30:13 +0100) > > are available in the Git repository at: > > https

Re: [Qemu-devel] [PATCH v2 04/10] hw/s390x/event-facility: Use the QOM BUS() macro to access BusState.qbus

2019-05-28 Thread Cornelia Huck
On Tue, 28 May 2019 18:40:14 +0200 Philippe Mathieu-Daudé wrote: > Rather than looking inside the definition of a BusState with "s->bus.qbus", > use the QOM prefered style: "BUS(&s->bus)". > > This patch was generated using the following Coccinelle script: > > // Use BUS() macros to access

Re: [Qemu-devel] [PATCH for 4.1 v2] target/riscv: Expose time CSRs when allowed by [m|s]counteren

2019-05-28 Thread Palmer Dabbelt
On Tue, 30 Apr 2019 10:36:01 PDT (-0700), finte...@gmail.com wrote: Currently mcounteren.TM acts as though it is hardwired to zero, even though QEMU allows it to be set. This change resolves the issue by allowing reads to the time and timeh control registers when running in a privileged mode wher

Re: [Qemu-devel] [RFC v4 09/27] memory: Prepare for different kinds of IOMMU MR notifiers

2019-05-28 Thread Auger Eric
Hi Peter, On 5/28/19 6:48 AM, Peter Xu wrote: > On Mon, May 27, 2019 at 01:41:45PM +0200, Eric Auger wrote: > > [...] > >> @@ -3368,8 +3368,9 @@ static void vtd_address_space_unmap(VTDAddressSpace >> *as, IOMMUNotifier *n) >> { >> IOMMUTLBEntry entry; >> hwaddr size; >> -hwaddr s

Re: [Qemu-devel] [PATCH v6 1/3] block: include base when checking image chain for block allocation

2019-05-28 Thread Max Reitz
On 06.05.19 17:34, Vladimir Sementsov-Ogievskiy wrote: > From: Andrey Shinkevich > > This patch is used in the 'block/stream: introduce a bottom node' > that is following. Instead of the base node, the caller may pass > the node that has the base as its backing image to the function > bdrv_is_all

Re: [Qemu-devel] [PATCH v6 2/3] block/stream: refactor stream_run: drop goto

2019-05-28 Thread Max Reitz
On 06.05.19 17:34, Vladimir Sementsov-Ogievskiy wrote: > The goto is unnecessary in the stream_run() since the common exit > code was removed in the commit eb23654dbe43b549ea2a9ebff9d8e: > "jobs: utilize job_exit shim". > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Andrey Shink

Re: [Qemu-devel] [PATCH v1 1/1] target/riscv: Allow setting ISA extensions via CPU props

2019-05-28 Thread Palmer Dabbelt
On Mon, 06 May 2019 15:49:53 PDT (-0700), Alistair Francis wrote: This patch allows us to enable/disable the RISC-V ISA extensions from the QEMU command line. This works with the rv32 and rv64 machines. The idea is that in the future we can now add extensions and leave them disabled by default un

Re: [Qemu-devel] [PULL 16/16] tcg/i386: Use MOVDQA for TCG_TYPE_V128 load/store

2019-05-28 Thread David Hildenbrand
On 23.05.19 00:28, Richard Henderson wrote: > This instruction raises #GP, aka SIGSEGV, if the effective address > is not aligned to 16-bytes. > > We have assertions in tcg-op-gvec.c that the offset from ENV is > aligned, for vector types <= V128. But the offset itself does not > validate that th

Re: [Qemu-devel] [PATCH v6 3/3] block/stream: introduce a bottom node

2019-05-28 Thread Max Reitz
On 06.05.19 17:34, Vladimir Sementsov-Ogievskiy wrote: > From: Andrey Shinkevich > > The bottom node is the intermediate block device that has the base as its > backing image. It is used instead of the base node while a block stream > job is running to avoid dependency on the base that may change

Re: [Qemu-devel] [Qemu-block] [PATCH] pr-manager-helper: fix pr process been killed when reconectting

2019-05-28 Thread Paolo Bonzini
On 28/05/19 15:06, Jie Wang wrote: > if pr-helper been killed and qemu send disconnect event to libvirt > and libvirt started a new pr-helper process, the new pr-heleper > been killed again when qemu is connectting to the new pr-helper, > qemu will never send disconnect to libvirt, and libvirt will

Re: [Qemu-devel] [PULL v2 00/27] testing/next (system tests, docker, some iotests)

2019-05-28 Thread Peter Maydell
On Tue, 28 May 2019 at 17:28, Alex Bennée wrote: > > The following changes since commit a7b21f6762a2d6ec08106d8a7ccb11829914523f: > > Merge remote-tracking branch > 'remotes/vivier2/tags/linux-user-for-4.1-pull-request' into staging > (2019-05-24 12:47:49 +0100) > > are available in the Git re

Re: [Qemu-devel] Make target check-report.tap is broken

2019-05-28 Thread Paolo Bonzini
On 28/05/19 10:11, Markus Armbruster wrote: > Commit 9df43317b82 "test: replace gtester with a TAP driver" replaced > targets check-report.xml and check-report.html by > > check-report.tap: $(patsubst %,check-report-qtest-%.tap, $(QTEST_TARGETS)) > check-report-unit.tap > $(call quiet-comma

Re: [Qemu-devel] [PATCH v4 04/11] block: Inline bdrv_co_block_status_from_*()

2019-05-28 Thread Max Reitz
On 21.05.19 10:57, Vladimir Sementsov-Ogievskiy wrote: > 10.04.2019 23:20, Max Reitz wrote: >> With bdrv_filtered_rw_bs(), we can easily handle this default filter >> behavior in bdrv_co_block_status(). >> >> blkdebug wants to have an additional assertion, so it keeps its own >> implementation, exc

Re: [Qemu-devel] [PATCH v4 03/11] block: Storage child access function

2019-05-28 Thread Max Reitz
On 20.05.19 12:41, Vladimir Sementsov-Ogievskiy wrote: > 10.04.2019 23:20, Max Reitz wrote: >> For completeness' sake, add a function for accessing a node's storage >> child, too. For filters, this is their filtered child; for non-filters, >> this is bs->file. >> >> Some places are deliberately le

Re: [Qemu-devel] [PATCH] event_match: always match on None value

2019-05-28 Thread John Snow
On 5/27/19 9:24 AM, Max Reitz wrote: > On 24.05.19 20:02, John Snow wrote: >> Before, event_match didn't always recurse if the event value was not a >> dictionary, and would instead check for equality immediately. >> >> By delaying equality checking to post-recursion, we can allow leaf >> values

[Qemu-devel] Headers without multiple inclusion guards

2019-05-28 Thread Markus Armbruster
We have a bunch of headers without multiple inclusion guards. Some are clearly intentional, some look accidental. Too many for me to find out by examining each of them, so I'm asking their maintainers. Why do I ask? I'd like to mark the intentional ones and fix the accidental ones, so they don'

Re: [Qemu-devel] [PATCH] linux-user: fix __NR_semtimedop undeclared error

2019-05-28 Thread Aleksandar Markovic
On May 28, 2019 6:25 PM, "Laurent Vivier" wrote: > > On 23/05/2019 19:54, Laurent Vivier wrote: >> >> In current code, __NR_msgrcv and__NR_semtimedop are supposed to be >> defined if __NR_msgsnd is defined. >> >> But linux headers 5.2-rc1 for MIPS define __NR_msgsnd without defining >> __NR_semtim

[Qemu-devel] [PATCH for 4.1 v3] target/riscv: Expose time CSRs when allowed by [m|s]counteren

2019-05-28 Thread Jonathan Behrens
Currently mcounteren.TM acts as though it is hardwired to zero, even though QEMU allows it to be set. This change resolves the issue by allowing reads to the time and timeh control registers when running in a privileged mode where such accesses are allowed. The frequency of the time register is

Re: [Qemu-devel] Headers without multiple inclusion guards

2019-05-28 Thread Peter Maydell
On Tue, 28 May 2019 at 19:12, Markus Armbruster wrote: > I append the alphabetical list of headers without multiple inclusion > guards (as reported by scripts/clean-header-guards -nv), followed by the > same list sorted into maintainer buckets. If you're cc'ed, please find > your bucket(s), and t

Re: [Qemu-devel] [PATCH for 4.1 v2] target/riscv: Expose time CSRs when allowed by [m|s]counteren

2019-05-28 Thread Jonathan Behrens
Sure, I've just sent a corrected version. Thanks, Jonathan On Tue, May 28, 2019 at 1:09 PM Palmer Dabbelt wrote: > On Tue, 30 Apr 2019 10:36:01 PDT (-0700), finte...@gmail.com wrote: > > Currently mcounteren.TM acts as though it is hardwired to zero, even > though > > QEMU allows it to be set.

Re: [Qemu-devel] [PULL 16/16] tcg/i386: Use MOVDQA for TCG_TYPE_V128 load/store

2019-05-28 Thread David Hildenbrand
On 28.05.19 19:28, David Hildenbrand wrote: > On 23.05.19 00:28, Richard Henderson wrote: >> This instruction raises #GP, aka SIGSEGV, if the effective address >> is not aligned to 16-bytes. >> >> We have assertions in tcg-op-gvec.c that the offset from ENV is >> aligned, for vector types <= V128.

Re: [Qemu-devel] Make target check-report.tap is broken

2019-05-28 Thread Markus Armbruster
Paolo Bonzini writes: > On 28/05/19 10:11, Markus Armbruster wrote: >> Commit 9df43317b82 "test: replace gtester with a TAP driver" replaced >> targets check-report.xml and check-report.html by >> >> check-report.tap: $(patsubst %,check-report-qtest-%.tap, $(QTEST_TARGETS)) >> check-report-unit

[Qemu-devel] [PATCH v2] event_match: always match on None value

2019-05-28 Thread John Snow
Before, event_match didn't always recurse if the event value was not a dictionary, and would instead check for equality immediately. By delaying equality checking to post-recursion, we can allow leaf values like "5" to match "None" and take advantage of the generic None-returns-True clause. This

Re: [Qemu-devel] [PULL 16/16] tcg/i386: Use MOVDQA for TCG_TYPE_V128 load/store

2019-05-28 Thread David Hildenbrand
On 28.05.19 20:33, David Hildenbrand wrote: > On 28.05.19 19:28, David Hildenbrand wrote: >> On 23.05.19 00:28, Richard Henderson wrote: >>> This instruction raises #GP, aka SIGSEGV, if the effective address >>> is not aligned to 16-bytes. >>> >>> We have assertions in tcg-op-gvec.c that the offset

Re: [Qemu-devel] Sketch of a transition of QEMU docs to Sphinx

2019-05-28 Thread John Snow
On 5/21/19 2:56 PM, Peter Maydell wrote: > Currently we have a vague plan that we should migrate our > documentation away from Texinfo to using Sphinx, plus some isolated > bits of documentation already in .rst format. This email is an attempt > to sketch out a transition plan for getting us fro

Re: [Qemu-devel] Headers without multiple inclusion guards

2019-05-28 Thread Eduardo Habkost
On Tue, May 28, 2019 at 08:12:24PM +0200, Markus Armbruster wrote: > We have a bunch of headers without multiple inclusion guards. Some are > clearly intentional, some look accidental. Too many for me to find out > by examining each of them, so I'm asking their maintainers. > > Why do I ask? I'

[Qemu-devel] [PULL 05/21] qcow2-threads: split out generic path

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Move generic part out of qcow2_co_do_compress, to reuse it for encryption and rename things that would be shared with encryption path. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz Message-id: 20190506142741.4

[Qemu-devel] [PULL 00/21] Block patches

2019-05-28 Thread Max Reitz
The following changes since commit 8c1ecb590497b0349c550607db923972b37f6963: Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-next-280519-2' into staging (2019-05-28 17:38:32 +0100) are available in the Git repository at: https://github.com/XanClic/qemu.git tags/pull-block-2

[Qemu-devel] [PULL 01/21] qcow2.h: add missing include

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy qcow2.h depends on block_int.h. Compilation isn't broken currently only due to block_int.h always included before qcow2.h. Though, it seems better to directly include block_int.h in qcow2.h. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garc

[Qemu-devel] [PULL 06/21] qcow2: qcow2_co_preadv: improve locking

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Background: decryption will be done in threads, to take benefit of it, we should move it out of the lock first. But let's go further: it turns out, that only qcow2_get_cluster_offset() needs locking, so reduce locking to it. Signed-off-by: Vladimir Sementsov-O

[Qemu-devel] [PULL 04/21] qcow2-threads: qcow2_co_do_compress: protect queuing by mutex

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Drop dependence on AioContext lock. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Paolo Bonzini Reviewed-by: Max Reitz Message-id: 20190506142741.41731-5-vsement...@virtuozzo.com Signed-off-by: Max Reitz --- block/qc

[Qemu-devel] [PULL 07/21] qcow2: bdrv_co_pwritev: move encryption code out of the lock

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Encryption will be done in threads, to take benefit of it, we should move it out of the lock first. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz Message-id: 20190506142741.41731-8-vsement...@virtuozzo.com Sig

[Qemu-devel] [PULL 02/21] qcow2: add separate file for threaded data processing functions

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Move compression-on-threads to separate file. Encryption will be in it too. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz Message-id: 20190506142741.41731-3-vsement...@virtuozzo.com Signed-off-by: Max Reitz -

[Qemu-devel] [PULL 14/21] block: Use bdrv_unref_child() for all children in bdrv_close()

2019-05-28 Thread Max Reitz
From: Alberto Garcia bdrv_unref_child() does the following things: - Updates the child->bs->inherits_from pointer. - Calls bdrv_detach_child() to remove the BdrvChild from bs->children. - Calls bdrv_unref() to unref the child BlockDriverState. When bdrv_unref_child() was introduced in com

[Qemu-devel] [PULL 03/21] qcow2-threads: use thread_pool_submit_co

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Use thread_pool_submit_co, instead of reinventing it here. Note, that thread_pool_submit_aio() never returns NULL, so checking it was an extra thing. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz Message-id: 2

[Qemu-devel] [PULL 21/21] blockdev: loosen restrictions on drive-backup source node

2019-05-28 Thread Max Reitz
From: John Snow We mandate that the source node must be a root node; but there's no reason I am aware of that it needs to be restricted to such. In some cases, we need to make sure that there's a medium present, but in the general case we can allow the backup job itself to do the graph checking.

[Qemu-devel] [PULL 10/21] block/backup: move to copy_bitmap with granularity

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy We are going to share this bitmap between backup and backup-top filter driver, so let's share something more meaningful. It also simplifies some calculations. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id: 20190429090842.57910-

[Qemu-devel] [PULL 13/21] block/backup: refactor: split out backup_calculate_cluster_size

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Split out cluster_size calculation. Move copy-bitmap creation above block-job creation, as we are going to share it with upcoming backup-top filter, which also should be created before actual block job creation. Signed-off-by: Vladimir Sementsov-Ogievskiy Mess

[Qemu-devel] [PULL 16/21] qemu-img: rebase: Reuse parent BlockDriverState

2019-05-28 Thread Max Reitz
From: Sam Eiderman In safe mode we open the entire chain, including the parent backing file of the rebased file. Do not open a new BlockBackend for the parent backing file, which saves opening the rest of the chain twice, which for long chains saves many "pricy" bdrv_open() calls. Permissions fo

[Qemu-devel] [PULL 18/21] qemu-img: rebase: Reuse in-chain BlockDriverState

2019-05-28 Thread Max Reitz
From: Sam Eiderman If a chain was detected, don't open a new BlockBackend from the target backing file which will create a new BlockDriverState. Instead, create an empty BlockBackend and attach the already open BlockDriverState. Permissions for blk_new() were copied from blk_new_open() when flag

[Qemu-devel] [PULL 11/21] block/backup: refactor and tolerate unallocated cluster skipping

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Split allocation checking to separate function and reduce nesting. Consider bdrv_is_allocated() fail as allocated area, as copying more than needed is not wrong (and we do it anyway) and seems better than fail the whole job. And, most probably we will fail on th

[Qemu-devel] [PULL 09/21] block/backup: simplify backup_incremental_init_copy_bitmap

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Simplify backup_incremental_init_copy_bitmap using the function bdrv_dirty_bitmap_next_dirty_area. Note: move to job->len instead of bitmap size: it should not matter but less code. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-i

[Qemu-devel] [PULL 15/21] block: Make bdrv_root_attach_child() unref child_bs on failure

2019-05-28 Thread Max Reitz
From: Alberto Garcia A consequence of the previous patch is that bdrv_attach_child() transfers the reference to child_bs from the caller to parent_bs, which will drop it on bdrv_close() or when someone calls bdrv_unref_child(). But this only happens when bdrv_attach_child() succeeds. If it fails

[Qemu-devel] [PULL 19/21] qcow2: skip writing zero buffers to empty COW areas

2019-05-28 Thread Max Reitz
From: Anton Nefedov If COW areas of the newly allocated clusters are zeroes on the backing image, efficient bdrv_write_zeroes(flags=BDRV_REQ_NO_FALLBACK) can be used on the whole cluster instead of writing explicit zero buffers later in perform_cow(). iotest 060: write to the discarded cluster d

[Qemu-devel] [PULL 17/21] qemu-img: rebase: Reduce reads on in-chain rebase

2019-05-28 Thread Max Reitz
From: Sam Eiderman In the following case: (base) A <- B <- C (tip) when running: qemu-img rebase -b A C QEMU would read all sectors not allocated in the file being rebased (C) and compare them to the new base image (A), regardless of whether they were changed or even allocated anywhere al

[Qemu-devel] [PULL 08/21] qcow2: do encryption in threads

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Do encryption/decryption in threads, like it is already done for compression. This improves asynchronous encrypted io. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz Message-id: 20190506142741.41731-9-vsement..

Re: [Qemu-devel] qapi/misc.json is too big, let's bite off a few chunks

2019-05-28 Thread Eduardo Habkost
On Mon, May 27, 2019 at 12:03:50PM +0200, Paolo Bonzini wrote: > On 27/05/19 10:00, Markus Armbruster wrote: > > As long as we don't have an active QOM maintainer[*], the benefit is > > low. > > > > > > [*] We need one. I'm not volunteering. > > I think Daniel, Eduardo and I could count as de f

[Qemu-devel] [PULL 20/21] qcow2-bitmap: initialize bitmap directory alignment

2019-05-28 Thread Max Reitz
From: Andrey Shinkevich Valgrind detects multiple issues in QEMU iotests when the memory is used without being initialized. Valgrind may dump lots of unnecessary reports what makes the memory issue analysis harder. Particularly, that is true for the aligned bitmap directory and can be seen while

Re: [Qemu-devel] [PATCH v2] event_match: always match on None value

2019-05-28 Thread Max Reitz
On 28.05.19 20:38, John Snow wrote: > Before, event_match didn't always recurse if the event value was not a > dictionary, and would instead check for equality immediately. > > By delaying equality checking to post-recursion, we can allow leaf > values like "5" to match "None" and take advantage o

[Qemu-devel] [PULL 12/21] block/backup: unify different modes code path

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Do full, top and incremental mode copying all in one place. This unifies the code path and helps further improvements. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id: 20190429090842.57910-5-vsement...@virtuozzo.com Signed-off-by

[Qemu-devel] [PATCH] qemu-img: Fix options leakage in img_rebase()

2019-05-28 Thread Max Reitz
img_rebase() can leak a QDict in two occasions. Fix it. Coverity: CID 1401416 Fixes: d16699b64671466b42079c45b89127aeea1ca565 Fixes: 330c72957196e0ae382abcaa97ebf4eb9bc8574f Signed-off-by: Max Reitz --- qemu-img.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qemu-img.c b/qemu-img.c in

[Qemu-devel] [PATCH] linux-user: emulate msgsnd(), msgrcv() and semtimedop()

2019-05-28 Thread Laurent Vivier
When we have updated kernel headers to 5.2-rc1 we have introduced new syscall numbers that can be not supported by older kernels and fail with ENOSYS while the guest emulation succeeded before because the syscalls were emulated with ipc(). This patch fixes the problem by using ipc() if the new sys

Re: [Qemu-devel] Headers without multiple inclusion guards

2019-05-28 Thread Max Filippov
On Tue, May 28, 2019 at 11:12 AM Markus Armbruster wrote: > target/xtensa/helper.h Intentional. > target/xtensa/overlay_tool.h Unintentional. > target/xtensa/xtensa-isa.h It's a one-liner that includes another header. -- Thanks. -- Max

Re: [Qemu-devel] Headers without multiple inclusion guards

2019-05-28 Thread Richard Henderson
On 5/28/19 1:12 PM, Markus Armbruster wrote: > accel/tcg/atomic_template.h Intentional; could be renamed atomic_template.inc.c. > accel/tcg/tcg-runtime.h Intentional. > tcg/aarch64/tcg-target.opc.h > tcg/i386/tcg-target.opc.h Intentional. > tcg/tcg-gvec-desc.h > tcg/tcg-op-gvec.h Not intenti

[Qemu-devel] [RFC PATCH 2/2] machine.py: minor delinting

2019-05-28 Thread John Snow
Since we're out in a new module, do a quick cursory pass of some of the more obvious style issues. Signed-off-by: John Snow --- python/qemu/machine.py | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/python/qemu/machine.py b/python/qemu/machine.py inde

[Qemu-devel] [RFC PATCH 0/2] python: refactor qemu/__init__.py

2019-05-28 Thread John Snow
There's a lot of code hiding in what is ostensibly a package configuration file. Let's break that out into something more visible. This is based on top of a recent patch I sent to Max; "[Qemu-devel] [PATCH v2] event_match: always match on None value". John Snow (2): python/qemu: split QEMUMachi

[Qemu-devel] [RFC PATCH 1/2] python/qemu: split QEMUMachine out from underneath __init__.py

2019-05-28 Thread John Snow
It's not obvious that something named __init__.py actually houses important code that isn't relevant to python packaging glue. Move the QEMUMachine and related error classes out into their own module. Adjust users to the new import location. Signed-off-by: John Snow --- python/qemu/__init__.py

[Qemu-devel] [PATCH] q35: fix mmconfig and PCI0._CRS

2019-05-28 Thread Gerd Hoffmann
This patch changes the handling of the mmconfig area. Thanks to the pci(e) expander devices we already have the logic to exclude address ranges from PCI0._CRS. We can simply add the mmconfig address range to the list get it excluded as well. With that in place we can go with a fixed pci hole whi

[Qemu-devel] [PATCH] q35: split memory at 2G

2019-05-28 Thread Gerd Hoffmann
Original q35 behavior was to split memory 2.75 GB, leaving space for the mmconfig bar at 0xb00 and pci I/O window starting at 0xc000. Note: Those machine types have been removed from the qemu codebase meanwhile because they could not be live-migrated so there was little value in keeping th

Re: [Qemu-devel] [PATCH] q35: split memory at 2G

2019-05-28 Thread Eric Blake
On 5/28/19 3:48 PM, Gerd Hoffmann wrote: > Original q35 behavior was to split memory 2.75 GB, leaving space for the s/memory/memory at/ > mmconfig bar at 0xb00 and pci I/O window starting at 0xc000. > > Note: Those machine types have been removed from the qemu codebase > meanwhile becaus

Re: [Qemu-devel] [PULL 16/16] tcg/i386: Use MOVDQA for TCG_TYPE_V128 load/store

2019-05-28 Thread Richard Henderson
On 5/28/19 1:46 PM, David Hildenbrand wrote: > FWIW, this seems to be the easiest way: > > diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h > index f0d9a6a36d..d363ae0fb3 100644 > --- a/target/s390x/cpu.h > +++ b/target/s390x/cpu.h > @@ -66,7 +66,7 @@ struct CPUS390XState { > * The float

Re: [Qemu-devel] Sketch of a transition of QEMU docs to Sphinx

2019-05-28 Thread Peter Maydell
On Tue, 28 May 2019 at 20:09, John Snow wrote: > > > > On 5/21/19 2:56 PM, Peter Maydell wrote: > > Currently we have a vague plan that we should migrate our > > documentation away from Texinfo to using Sphinx, plus some isolated > > bits of documentation already in .rst format. This email is an a

Re: [Qemu-devel] Headers without multiple inclusion guards

2019-05-28 Thread BALATON Zoltan
On Tue, 28 May 2019, Markus Armbruster wrote: sam460ex M: BALATON Zoltan hw/display/sm501_template.h This is like other *_template.h files mentioned by Peter in his reply and is intended to be included multiple times. Regards, BALATON Zoltan

Re: [Qemu-devel] [PATCH 3/3] block/qcow2-bitmap: rewrite bitmap reopening logic

2019-05-28 Thread John Snow
On 5/23/19 11:47 AM, Vladimir Sementsov-Ogievskiy wrote: > Current logic > = > > Reopen rw -> ro: > > Store bitmaps and release BdrvDirtyBitmap's. > > Reopen ro -> rw: > > Load bitmap list > Skip bitmaps which for which we don't have BdrvDirtyBitmap [this is >the worst thing]

[Qemu-devel] [PULL 0/3] Bitmaps patches

2019-05-28 Thread John Snow
The following changes since commit 8c1ecb590497b0349c550607db923972b37f6963: Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-next-280519-2' into staging (2019-05-28 17:38:32 +0100) are available in the Git repository at: https://github.com/jnsnow/qemu.git tags/bitmaps-pull-

[Qemu-devel] [PULL 2/3] qapi: support external bitmaps in block-dirty-bitmap-merge

2019-05-28 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Add new optional parameter making possible to merge bitmaps from different nodes. It is needed to maintain external snapshots during incremental backup chain history. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id: 2019051715211

[Qemu-devel] [PULL 1/3] migration/dirty-bitmaps: change bitmap enumeration method

2019-05-28 Thread John Snow
Shift from looking at every root BDS to *every* BDS. This will migrate bitmaps that are attached to blockdev created nodes instead of just ones attached to emulated storage devices. Note that this will not migrate anonymous or internal-use bitmaps, as those are defined as having no name. This wil

[Qemu-devel] [PULL 3/3] iotests: test external snapshot with bitmap copying

2019-05-28 Thread John Snow
From: Vladimir Sementsov-Ogievskiy This test shows that external snapshots and incremental backups are friends. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id: 20190517152111.206494-3-vsement...@virtuozzo.com Signed-off-by: John Snow --- tests/qemu-iotests/254

Re: [Qemu-devel] [PATCH 0/4] add failover feature for assigned network devices

2019-05-28 Thread si-wei liu
On 5/21/2019 11:49 AM, Jens Freimann wrote: On Tue, May 21, 2019 at 07:37:19AM -0400, Michael S. Tsirkin wrote: On Tue, May 21, 2019 at 09:21:57AM +0200, Jens Freimann wrote: On Mon, May 20, 2019 at 04:56:57PM -0600, Alex Williamson wrote: > On Fri, 17 May 2019 14:58:16 +0200 > Jens Freimann

Re: [Qemu-devel] [PATCH v3 1/2] vfio/mdev: add migration_version attribute for mdev device

2019-05-28 Thread Yan Zhao
On Tue, May 28, 2019 at 04:53:32PM +0800, Cornelia Huck wrote: > On Sun, 26 May 2019 23:43:42 -0400 > Yan Zhao wrote: > > > migration_version attribute is used to check migration compatibility > > between two mdev device of the same mdev type. > > s/device/devices/ > yes... sorry and thanks :)

Re: [Qemu-devel] [PATCH] hw/i386/pc: check apci hotplug capability before nvdimm's

2019-05-28 Thread Wei Yang
On Tue, May 28, 2019 at 02:26:27PM +0200, Igor Mammedov wrote: >On Tue, 28 May 2019 09:35:48 +0800 >Wei Yang wrote: > >> On Mon, May 27, 2019 at 02:21:14PM +0200, Igor Mammedov wrote: >> >On Thu, 11 Apr 2019 15:17:39 +0800 >> >Wei Yang wrote: >> > >> >> pc_memory_pre_plug() is called during hot

Re: [Qemu-devel] [PATCH 2/4] migration/ram.c: use same type in MultiFDPages_t to define offsest

2019-05-28 Thread Wei Yang
On Tue, May 28, 2019 at 10:12:39AM +0200, Juan Quintela wrote: >Wei Yang wrote: >> MultiFDPacket_t.offset is allocated to store MultiFDPages_t.offset. >> >> It would be better to use the same type. >> >> Signed-off-by: Wei Yang >> --- >> migration/ram.c | 2 +- >> 1 file changed, 1 insertion(+),

Re: [Qemu-devel] [PATCH 1/4] migration: multifd_save_setup always return 0

2019-05-28 Thread Wei Yang
On Tue, May 28, 2019 at 10:11:11AM +0200, Juan Quintela wrote: >Wei Yang wrote: >> Signed-off-by: Wei Yang >> --- >> migration/migration.c | 7 +-- >> 1 file changed, 1 insertion(+), 6 deletions(-) >> >> diff --git a/migration/migration.c b/migration/migration.c >> index d0a0f68f11..3aae4f27

<    1   2   3   >