Re: [Qemu-devel] [RFC PATCH v4 5/5] target/ppc: support single stepping with KVM HV

2019-06-12 Thread Alexey Kardashevskiy
On 13/06/2019 12:01, Fabiano Rosas wrote: > Alexey Kardashevskiy writes: > >> It is TCG, a single CPU with a single thread and no matter where I put > > Ok, but then none of this code gets executed because it is kvm-only: I was not clear, this is a generic issue, not related to your patchse

Re: [Qemu-devel] [PATCH qemu] loader: Trace loaded images

2019-06-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190613050937.124903-1-...@ozlabs.ru/ 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 time make

[Qemu-devel] [PATCH 3/3] tests/acceptance: Increase timeout for LinuxSSH test

2019-06-12 Thread David Gibson
At least on the hosts I use (a POWER8 Tuleta, a POWER9 Boston and an 8 cpu x86 instance in OpenStack) the linux_ssh_mips_malta tests in make check-acceptance frequently timeout. Increasing the timeout from 2.5 to 5 minutes makes that much less common. Signed-off-by: David Gibson --- tests/accep

[Qemu-devel] [PATCH 2/3] tests/acceptance: Handle ppc64le host arch correctly

2019-06-12 Thread David Gibson
ppc64 and ppc64le are different archs from the host kernel point of view and are advertised as such in uname. But these cover the same set of CPUs, just in different endianness modes. qemu-system-ppc64 handles both modes, so make sure we select the correct binary when running on ppc64le host arch

[Qemu-devel] [PATCH 1/3] tests/acceptance: Specify arch for QueryCPUModelExpansion

2019-06-12 Thread David Gibson
At the moment this test runs on whatever the host arch is. But it looks for 'unavailable-features' which is an x86 specific cpu property. Tag it to always use qemu-system-x86_64. Signed-off-by: David Gibson --- tests/acceptance/cpu_queries.py | 3 +++ 1 file changed, 3 insertions(+) diff --gi

[Qemu-devel] [PATCH v8] ssh: switch from libssh2 to libssh

2019-06-12 Thread Pino Toscano
Rewrite the implementation of the ssh block driver to use libssh instead of libssh2. The libssh library has various advantages over libssh2: - easier API for authentication (for example for using ssh-agent) - easier API for known_hosts handling - supports newer types of keys in known_hosts Use AP

[Qemu-devel] [PATCH 0/3] Some fixes for make check-acceptance on a POWER host

2019-06-12 Thread David Gibson
Here are several patches which address failures I see when attempting to run "make check-acceptance" on a POWER host machine. David Gibson (3): tests/acceptance: Specify arch for QueryCPUModelExpansion tests/acceptance: Handle ppc64le host arch correctly tests/acceptance: Increase timeout fo

Re: [Qemu-devel] [PATCH v2 09/11] monitor: Split out monitor/qmp.c

2019-06-12 Thread Markus Armbruster
Kevin Wolf writes: > Am 12.06.2019 um 15:11 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Move QMP infrastructure from monitor/misc.c to monitor/qmp.c. This is >> > code that can be shared for all targets, so compile it only once. >> >> Less code compiled per target, yay! >>

Re: [Qemu-devel] [PATCH v2 10/11] monitor: Split out monitor/hmp.c

2019-06-12 Thread Markus Armbruster
Kevin Wolf writes: > Am 12.06.2019 um 15:17 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Move HMP infrastructure from monitor/misc.c to monitor/hmp.c. This is >> > code that can be shared for all targets, so compile it only once. >> > >> > The amount of function and particul

[Qemu-devel] [PATCH qemu] loader: Trace loaded images

2019-06-12 Thread Alexey Kardashevskiy
This adds a trace point which prints every loaded image. This includes bios/firmware/kernel/initradmdisk/pcirom. Signed-off-by: Alexey Kardashevskiy --- The example for a pseries guest: loader_write_rom slof.bin: @0x0 size=0xe22e0 ROM=0 loader_write_rom phdr #0: /home/aik/t/vml4120le: @0x40

Re: [Qemu-devel] [PATCH qemu v2] hmp: Print if memory section is registered with an accelerator

2019-06-12 Thread Alexey Kardashevskiy
On 21/05/2019 16:37, Alexey Kardashevskiy wrote: > Ping, anyone? I still enjoy seeing "kvm" next to MRs in "info mtree -f" > in my local QEMU :) "Still feeling it" :) Ping? > > > On 24/04/2019 15:32, Alexey Kardashevskiy wrote: >> Paolo, ping? >> >> >> On 19/03/2019 18:05, Alexey Kardashev

[Qemu-devel] [PULL 0/1] tcg: queued patch

2019-06-12 Thread Richard Henderson
Dang it, forgot the PULL tag. r~ The following changes since commit a050901d4b40092dc356b59912c6df39e389c7b9: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.1-20190612' into staging (2019-06-12 14:43:47 +0100) are available in the Git repository at: https://

[Qemu-devel] [PATCH 1/1] tcg: Fix typos in helper_gvec_sar{8, 32, 64}v

2019-06-12 Thread Richard Henderson
The loop is written with scalars, not vectors. Use the correct type when incrementing. Fixes: 5ee5c14cacd Reported-by: Laurent Vivier Tested-by: Laurent Vivier Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- accel/tcg/tcg-runtime-gvec.c | 6 +++--- 1 file changed, 3 insertion

[Qemu-devel] [PATCH 0/1] tcg: queued patch

2019-06-12 Thread Richard Henderson
The following changes since commit a050901d4b40092dc356b59912c6df39e389c7b9: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.1-20190612' into staging (2019-06-12 14:43:47 +0100) are available in the Git repository at: https://github.com/rth7680/qemu.git tags/pull-tc

Re: [Qemu-devel] [PATCH v13 2/7] virtio-pmem: Add virtio pmem driver

2019-06-12 Thread Pankaj Gupta
> > > This patch adds virtio-pmem driver for KVM guest. > > > > Guest reads the persistent memory range information from > > Qemu over VIRTIO and registers it on nvdimm_bus. It also > > creates a nd_region object with the persistent memory > > range information so that existing 'nvdimm/pmem' dr

Re: [Qemu-devel] [PATCH v2 15/15] target/ppc: improve VSX_FMADD with new GEN_VSX_HELPER_VSX_MADD macro

2019-06-12 Thread Richard Henderson
On 6/2/19 4:09 AM, Mark Cave-Ayland wrote: > Introduce a new GEN_VSX_HELPER_VSX_MADD macro for the generator function which > enables the source and destination registers to be decoded at translation > time. > > This enables the determination of a or m form to be made at translation time > so >

Re: [Qemu-devel] [PATCH] docs: updates on the POWER9 XIVE interrupt controller documentation

2019-06-12 Thread David Gibson
On Wed, Jun 12, 2019 at 06:04:25PM +0200, Cédric Le Goater wrote: > This includes various small updates and a better description of the > chosen interrupt mode resulting from the combination of the 'ic-mode' > machine option, the 'kernel_irqchip' option, guest support and KVM > support. > > Signed

Re: [Qemu-devel] [RFC PATCH] spapr_pci: Fix Null pointer dereferences in spapr_dt_pci_bus()

2019-06-12 Thread David Gibson
On Thu, Jun 13, 2019 at 01:02:02AM +0200, Philippe Mathieu-Daudé wrote: > Commit 14e714900f6 refactored the call to spapr_dt_drc(), > but used an incorrect object owner as argument. > > This fixes: > > /hw/ppc/spapr_pci.c: 1367 in spapr_dt_pci_bus() > >>> CID 1401933: Null pointer derefe

Re: [Qemu-devel] [PATCH] ppc/pnv: fix StoreEOI activation

2019-06-12 Thread David Gibson
On Wed, Jun 12, 2019 at 06:23:57PM +0200, Cédric Le Goater wrote: > The firmware (skiboot) of the PowerNV machines can configure the XIVE > interrupt controller to activate StoreEOI on the ESB pages of the > interrupts. This feature lets software do an EOI with a store instead > of a load. It is no

Re: [Qemu-devel] [PATCH 0/2] ppc/pnc: fix XSCOM MMIO base address for P9 machines with multiple chips

2019-06-12 Thread David Gibson
On Wed, Jun 12, 2019 at 07:47:20PM +0200, Cédric Le Goater wrote: > On 12/06/2019 19:43, Cédric Le Goater wrote: > > Hello, > > > > The base address of the MMIO window of the XSCOM bus is incorrect on > > P9 machines with multiple chips. Provide a fix for that to prepare > > ground for future Powe

Re: [Qemu-devel] [Bug 1774853] Re: claims temp file is used by another process

2019-06-12 Thread tsiros
I can't remember at all! i am sorry i know how frustrating this is i don't remember even if i fixed it or if i gave up On Thu, Jun 13, 2019, 03:20 Alexandro Sanchez Bach < 1774...@bugs.launchpad.net> wrote: > @tsiros, can you explain why this isn't an issue for you anymore? This > is precisely

Re: [Qemu-devel] [PATCH v2 11/15] target/ppc: introduce GEN_VSX_HELPER_R2 macro to fpu_helper.c

2019-06-12 Thread Richard Henderson
On 6/2/19 4:08 AM, Mark Cave-Ayland wrote: > Rather than perform the VSR register decoding within the helper itself, > introduce a new GEN_VSX_HELPER_R2 macro which performs the decode based > upon rD and rB at translation time. > > Signed-off-by: Mark Cave-Ayland > --- > target/ppc/fpu_helper.c

Re: [Qemu-devel] [PATCH v2 10/15] target/ppc: introduce GEN_VSX_HELPER_R3 macro to fpu_helper.c

2019-06-12 Thread Richard Henderson
On 6/2/19 4:08 AM, Mark Cave-Ayland wrote: > Rather than perform the VSR register decoding within the helper itself, > introduce a new GEN_VSX_HELPER_R3 macro which performs the decode based > upon rD, rA and rB at translation time. > > Signed-off-by: Mark Cave-Ayland > --- > target/ppc/fpu_help

Re: [Qemu-devel] [PATCH v2 09/15] target/ppc: introduce GEN_VSX_HELPER_X1 macro to fpu_helper.c

2019-06-12 Thread Richard Henderson
On 6/2/19 4:08 AM, Mark Cave-Ayland wrote: > Rather than perform the VSR register decoding within the helper itself, > introduce a new GEN_VSX_HELPER_X1 macro which performs the decode based > upon xB at translation time. > > Signed-off-by: Mark Cave-Ayland > --- > target/ppc/fpu_helper.c

Re: [Qemu-devel] [PATCH] sun4m: set default display type to TCX

2019-06-12 Thread Richard Henderson
On 6/12/19 1:39 PM, Mark Cave-Ayland wrote: > Commit 6807874d55 "sun4m: obey -vga none" changed the sun4m machines so that > they could be started without a framebuffer installed, but as no default > display type was configured the machines would start in headless mode without > an explict -vga opt

Re: [Qemu-devel] [RFC PATCH v4 5/5] target/ppc: support single stepping with KVM HV

2019-06-12 Thread Fabiano Rosas
Alexey Kardashevskiy writes: > It is TCG, a single CPU with a single thread and no matter where I put Ok, but then none of this code gets executed because it is kvm-only: qemu/exec.c void cpu_single_step(CPUState *cpu, int enabled) { if (cpu->singlestep_enabled != enabled) { cpu->si

Re: [Qemu-devel] spapr_pci: Advertise BAR reallocation capability

2019-06-12 Thread Alexey Kardashevskiy
On 12/06/2019 16:11, David Gibson wrote: > On Thu, Jun 06, 2019 at 02:09:19PM +1000, Alexey Kardashevskiy wrote: >> The pseries guests do not normally allocate PCI resouces and rely on >> the system firmware doing so. Furthermore at least at some point in >> the past the pseries guests won't eve

[Qemu-devel] [Bug 1774853] Re: claims temp file is used by another process

2019-06-12 Thread Mason Back
Hi there! Our fork of QEMU still happens to have this issue. Did you happen to find a solution? $ ../orbital-qemu/ps4-softmmu/qemu-system-ps4 -bios ./ubios.bin -kernel ./boot.img -drive file=hdd.qcow2 -drive file=fat:rw:sflash/,media=disk -monitor stdio -smp 8 -display orbital vvfat sflash/ chs

[Qemu-devel] [Bug 1774853] Re: claims temp file is used by another process

2019-06-12 Thread Alexandro Sanchez Bach
@tsiros, can you explain why this isn't an issue for you anymore? This is precisely what happens to me, specifically when I create drives as `file=fat:rw:path/to/dir`. When I type `fat:path/to/dir`, everything works fine, though I get some warnings. Was this fixed in newer versions or did you simpl

Re: [Qemu-devel] [PATCH v3 00/14] tests/vm: serial console autoinstall, misc fixes.

2019-06-12 Thread Kamil Rytarowski
On 12.06.2019 19:35, Alex Bennée wrote: > > Alex Bennée writes: > >> Gerd Hoffmann writes: >> >>> This patch series changes the way virtual machines for test builds are >>> managed. They are created locally on the developer machine now. The >>> installer is booted on the serial console and th

Re: [Qemu-devel] [PATCH v5] vfio/common: Introduce vfio_set_irq_signaling helper

2019-06-12 Thread Li Qiang
Eric Auger 于2019年6月12日周三 下午8:40写道: > The code used to assign an interrupt index/subindex to an > eventfd is duplicated many times. Let's introduce an helper that > allows to set/unset the signaling for an ACTION_TRIGGER, > ACTION_MASK or ACTION_UNMASK action. > > In the error message, we now use

Re: [Qemu-devel] [PULL 6/6] travis: Make check-acceptance job more verbose

2019-06-12 Thread Philippe Mathieu-Daudé
On 6/13/19 12:47 AM, Cleber Rosa wrote: > On Wed, Jun 12, 2019 at 10:49:18PM +0200, Philippe Mathieu-Daudé wrote: >> On 6/11/19 7:14 PM, Eduardo Habkost wrote: >>> It will help us debug issues when tests fail. >>> >>> Signed-off-by: Eduardo Habkost >>> --- >>> .travis.yml | 2 +- >>> 1 file chang

Re: [Qemu-devel] [RFC PATCH v4 5/5] target/ppc: support single stepping with KVM HV

2019-06-12 Thread Alexey Kardashevskiy
On 12/06/2019 23:34, Fabiano Rosas wrote: > Alexey Kardashevskiy writes: > >> Are you reposting this any time soon? > > I have sent a v2 to the kernel side of it: > > https://lore.kernel.org/kvm/2019052919.27994-1-faro...@linux.ibm.com/ > > I'm depending on what we decide to do there. T

[Qemu-devel] [PATCH] iotests: Fix 129

2019-06-12 Thread Max Reitz
Throttling on the BB have not affected block jobs in a while, so 129 is prone to break (at least on tmpfs with high system load). We can fix the problem by running the job from a throttle node. Signed-off-by: Max Reitz --- Depends on "[PATCH v5 00/42] block: Deal with filters". Based-on: <20190

Re: [Qemu-devel] [PATCH v5 22/42] block: Use CAFs in bdrv_get_allocated_file_size()

2019-06-12 Thread Max Reitz
On 13.06.19 00:09, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > block.c | 26 -- > 1 file changed, 24 insertions(+), 2 deletions(-) > > diff --git a/block.c b/block.c > index 11b7ba8cf6..856d9b58be 100644 > --- a/block.c > +++ b/block.c > @@ -4511,15 +4511,37 @@ ex

[Qemu-devel] [PATCH v5 42/42] iotests: Test committing to overridden backing

2019-06-12 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/040 | 61 ++ tests/qemu-iotests/040.out | 4 +-- 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040 index 31c2a8da3b..5cbbd30ee3 100755 --- a/tests

[Qemu-devel] [PATCH v5 39/42] iotests: Add filter commit test cases

2019-06-12 Thread Max Reitz
This patch adds some tests on how commit copes with filter nodes. Signed-off-by: Max Reitz --- tests/qemu-iotests/040 | 177 + tests/qemu-iotests/040.out | 4 +- 2 files changed, 179 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/040 b/te

[Qemu-devel] [RFC PATCH] spapr_pci: Fix Null pointer dereferences in spapr_dt_pci_bus()

2019-06-12 Thread Philippe Mathieu-Daudé
Commit 14e714900f6 refactored the call to spapr_dt_drc(), but used an incorrect object owner as argument. This fixes: /hw/ppc/spapr_pci.c: 1367 in spapr_dt_pci_bus() >>> CID 1401933: Null pointer dereferences (FORWARD_NULL) >>> Dereferencing null pointer "bus". 1367 ret

Re: [Qemu-devel] [PATCH 0/2] vl: Drain before (block) job cancel when quitting

2019-06-12 Thread Max Reitz
On 13.06.19 00:08, Max Reitz wrote: > Quitting qemu should lead to qemu exiting pretty much immediately. That > means if you have a block job running on a throttled block node, the > node should ignore its throttling and the job should be cancelled > immediately. > > Unfortunately, that is not wh

[Qemu-devel] [PATCH v5 36/42] iotests: Add tests for mirror @replaces loops

2019-06-12 Thread Max Reitz
This adds two tests for cases where our old check_to_replace_node() function failed to detect that executing this job with these parameters would result in a cyclic graph. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/041 | 124 +

Re: [Qemu-devel] [PULL 6/6] travis: Make check-acceptance job more verbose

2019-06-12 Thread Cleber Rosa
On Wed, Jun 12, 2019 at 10:49:18PM +0200, Philippe Mathieu-Daudé wrote: > On 6/11/19 7:14 PM, Eduardo Habkost wrote: > > It will help us debug issues when tests fail. > > > > Signed-off-by: Eduardo Habkost > > --- > > .travis.yml | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > >

[Qemu-devel] [PATCH v5 33/42] blockdev: Fix active commit choice

2019-06-12 Thread Max Reitz
We have to perform an active commit whenever the top node has a parent that has taken the WRITE permission on it. Signed-off-by: Max Reitz --- blockdev.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index a464cabf9e..5370f3

Re: [Qemu-devel] [PULL 6/6] travis: Make check-acceptance job more verbose

2019-06-12 Thread Philippe Mathieu-Daudé
On 6/12/19 10:52 PM, Eduardo Habkost wrote: > On Wed, Jun 12, 2019 at 10:49:18PM +0200, Philippe Mathieu-Daudé wrote: >> On 6/11/19 7:14 PM, Eduardo Habkost wrote: >>> It will help us debug issues when tests fail. >>> >>> Signed-off-by: Eduardo Habkost >>> --- >>> .travis.yml | 2 +- >>> 1 file c

[Qemu-devel] [PATCH v5 41/42] iotests: Add test for commit in sub directory

2019-06-12 Thread Max Reitz
Add a test for committing an overlay in a sub directory to one of the images in its backing chain, using both relative and absolute filenames. Signed-off-by: Max Reitz --- tests/qemu-iotests/020 | 36 tests/qemu-iotests/020.out | 10 ++ 2 files ch

[Qemu-devel] [PATCH v5 19/42] block: Use CAF in bdrv_co_rw_vmstate()

2019-06-12 Thread Max Reitz
If a node whose driver does not provide VM state functions has a metadata child, the VM state should probably go there; if it is a filter, the VM state should probably go there. It follows that we should generally go down to the primary child. Signed-off-by: Max Reitz --- block/io.c | 5 +++--

[Qemu-devel] [PATCH v5 28/42] stream: Deal with filters

2019-06-12 Thread Max Reitz
Signed-off-by: Max Reitz --- qapi/block-core.json | 4 block/stream.c | 23 +++ blockdev.c | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index df52a90736..a3c5298cf5 100644 --- a/qapi/

[Qemu-devel] [PATCH v5 40/42] iotests: Add filter mirror test cases

2019-06-12 Thread Max Reitz
This patch adds some test cases how mirroring relates to filters. One of them tests what happens when you mirror off a filtered COW node, two others use the mirror filter node as basically our only example of an implicitly created filter node so far (besides the commit filter). Signed-off-by: Max

[Qemu-devel] [PATCH v5 30/42] qemu-img: Use child access functions

2019-06-12 Thread Max Reitz
This changes iotest 204's output, because blkdebug on top of a COW node used to make qemu-img map disregard the rest of the backing chain (the backing chain was broken by the filter). With this patch, the allocation in the base image is reported correctly. Signed-off-by: Max Reitz --- qemu-img.

[Qemu-devel] [PATCH v5 35/42] block: Fix check_to_replace_node()

2019-06-12 Thread Max Reitz
Currently, check_to_replace_node() only allows mirror to replace a node in the chain of the source node, and only if it is the first non-filter node below the source. Well, technically, the idea is that you can exactly replace a quorum child by mirroring from quorum. This has (probably) two reaso

[Qemu-devel] [PATCH v5 37/42] block: Leave BDS.backing_file constant

2019-06-12 Thread Max Reitz
Parts of the block layer treat BDS.backing_file as if it were whatever the image header says (i.e., if it is a relative path, it is relative to the overlay), other parts treat it like a cache for bs->backing->bs->filename (relative paths are relative to the CWD). Considering bs->backing->bs->filena

[Qemu-devel] [PATCH v5 31/42] block: Drop backing_bs()

2019-06-12 Thread Max Reitz
We want to make it explicit where bs->backing is used, and we have done so. The old role of backing_bs() is now effectively taken by bdrv_filtered_cow_bs(). Signed-off-by: Max Reitz --- include/block/block_int.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/block/block_int.h b

[Qemu-devel] [PATCH v5 34/42] block: Inline bdrv_co_block_status_from_*()

2019-06-12 Thread Max Reitz
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, except bdrv_co_block_status_from_file() needs to be inlined there. Suggested-by: Eric Blake Signed-off-by:

[Qemu-devel] [PATCH v5 38/42] iotests: Let complete_and_wait() work with commit

2019-06-12 Thread Max Reitz
complete_and_wait() and wait_ready() currently only work for mirror jobs. Let them work for active commit jobs, too. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qe

[Qemu-devel] [PATCH v5 25/42] mirror: Deal with filters

2019-06-12 Thread Max Reitz
This includes some permission limiting (for example, we only need to take the RESIZE permission for active commits where the base is smaller than the top). Signed-off-by: Max Reitz --- block/mirror.c | 110 + blockdev.c | 47 +-

[Qemu-devel] [PATCH v5 32/42] block: Make bdrv_get_cumulative_perm() public

2019-06-12 Thread Max Reitz
This is useful in other files like blockdev.c to determine for example whether a node can be written to or not. Signed-off-by: Max Reitz --- include/block/block_int.h | 3 +++ block.c | 6 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/block/block

[Qemu-devel] [PATCH v5 27/42] commit: Deal with filters

2019-06-12 Thread Max Reitz
This includes some permission limiting (for example, we only need to take the RESIZE permission if the base is smaller than the top). Signed-off-by: Max Reitz --- block/block-backend.c | 16 --- block/commit.c| 97 --- blockdev.c|

[Qemu-devel] [PATCH v5 29/42] nbd: Use CAF when looking for dirty bitmap

2019-06-12 Thread Max Reitz
When looking for a dirty bitmap to share, we should handle filters by just including them in the search (so they do not break backing chains). Signed-off-by: Max Reitz --- nbd/server.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nbd/server.c b/nbd/server.c index aec

[Qemu-devel] [PATCH v5 24/42] block: Use child access functions for QAPI queries

2019-06-12 Thread Max Reitz
query-block and query-named-block-nodes now return any filtered child under "backing", not just bs->backing or COW children. This is so that filters do not interrupt the reported backing chain. This changes the output for iotest 184, as the throttled node now appears as a backing child. Signed-o

[Qemu-devel] [PATCH v5 18/42] block: Use CAFs in bdrv_refresh_filename()

2019-06-12 Thread Max Reitz
bdrv_refresh_filename() and the kind of related bdrv_dirname() should look to the primary child when they wish to copy the underlying file's filename. Signed-off-by: Max Reitz --- block.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/block.c b

[Qemu-devel] [PATCH v5 26/42] backup: Deal with filters

2019-06-12 Thread Max Reitz
Signed-off-by: Max Reitz --- block/backup.c | 9 + blockdev.c | 19 +++ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/block/backup.c b/block/backup.c index 715e1d3be8..88435f883d 100644 --- a/block/backup.c +++ b/block/backup.c @@ -502,6 +502,7 @@ st

[Qemu-devel] [PATCH v5 23/42] blockdev: Use CAF in external_snapshot_prepare()

2019-06-12 Thread Max Reitz
This allows us to differentiate between filters and nodes with COW backing files: Filters cannot be used as overlays at all (for this function). Signed-off-by: Max Reitz --- blockdev.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index b5c0fd3

[Qemu-devel] [PATCH v5 17/42] block: Use CAFs in bdrv_refresh_limits()

2019-06-12 Thread Max Reitz
Signed-off-by: Max Reitz --- block/io.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/block/io.c b/block/io.c index 64408cf19a..659ea0c52a 100644 --- a/block/io.c +++ b/block/io.c @@ -151,6 +151,8 @@ static void bdrv_merge_limits(BlockLimits *dst, const Block

[Qemu-devel] [PATCH v5 07/42] block: *filtered_cow_child() for *has_zero_init()

2019-06-12 Thread Max Reitz
bdrv_has_zero_init() and the related bdrv_unallocated_blocks_are_zero() should use bdrv_filtered_cow_child() if they want to check whether the given BDS has a COW backing file. Signed-off-by: Max Reitz --- block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block.c b/

[Qemu-devel] [PATCH v5 22/42] block: Use CAFs in bdrv_get_allocated_file_size()

2019-06-12 Thread Max Reitz
Signed-off-by: Max Reitz --- block.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index 11b7ba8cf6..856d9b58be 100644 --- a/block.c +++ b/block.c @@ -4511,15 +4511,37 @@ exit: int64_t bdrv_get_allocated_file_size(BlockDriverSta

[Qemu-devel] [PATCH v5 20/42] block/snapshot: Fall back to storage child

2019-06-12 Thread Max Reitz
If the top node's driver does not provide snapshot functionality and we want to go down the chain, we should go towards the child which stores the data, i.e. the storage child. bdrv_snapshot_goto() becomes a bit weird because we may have to redirect the actual child pointer, so it only works if th

[Qemu-devel] [PATCH v5 14/42] block: Use CAFs when working with backing chains

2019-06-12 Thread Max Reitz
Use child access functions when iterating through backing chains so filters do not break the chain. Signed-off-by: Max Reitz --- block.c | 40 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/block.c b/block.c index 11f37983d9..505b3e9a01 1

[Qemu-devel] [PATCH v5 06/42] qcow2: Implement .bdrv_storage_child()

2019-06-12 Thread Max Reitz
Signed-off-by: Max Reitz --- block/qcow2.c | 9 + 1 file changed, 9 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 9396d490d5..57675c9416 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -5085,6 +5085,13 @@ void qcow2_signal_corruption(BlockDriverState *bs, bool fatal,

[Qemu-devel] [PATCH v5 15/42] block: Re-evaluate backing file handling in reopen

2019-06-12 Thread Max Reitz
Reopening a node's backing child needs a bit of special handling because the "backing" child has different defaults than all other children (among other things). Adding filter support here is a bit more difficult than just using the child access functions. In fact, we often have to directly use b

[Qemu-devel] [PATCH v5 21/42] block: Use CAFs for debug breakpoints

2019-06-12 Thread Max Reitz
When looking for a blkdebug node (which implements debug breakpoints), use bdrv_primary_bs() to iterate through the graph, because that is where a blkdebug node would be. Signed-off-by: Max Reitz --- block.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block.c b/bl

[Qemu-devel] [PATCH v5 09/42] block: Include filters when freezing backing chain

2019-06-12 Thread Max Reitz
In order to make filters work in backing chains, the associated functions must be able to deal with them and freeze all filter links, be they COW or R/W filter links. While at it, add some comments that note which functions require their caller to ensure that a given child link is not frozen, and

[Qemu-devel] [PATCH v5 12/42] block: Use bdrv_filtered_rw* where obvious

2019-06-12 Thread Max Reitz
Places that use patterns like if (bs->drv->is_filter && bs->file) { ... something about bs->file->bs ... } should be BlockDriverState *filtered = bdrv_filtered_rw_bs(bs); if (filtered) { ... something about @filtered ... } instead. Signed-off-by: Max Reitz

[Qemu-devel] [PATCH v5 05/42] block: Add chain helper functions

2019-06-12 Thread Max Reitz
Add some helper functions for skipping filters in a chain of block nodes. Signed-off-by: Max Reitz --- include/block/block_int.h | 3 +++ block.c | 55 +++ 2 files changed, 58 insertions(+) diff --git a/include/block/block_int.h b/include/b

[Qemu-devel] [PATCH v5 16/42] block: Use child access functions when flushing

2019-06-12 Thread Max Reitz
If the driver does not support .bdrv_co_flush() so bdrv_co_flush() itself has to flush the children of the given node, it should not flush just bs->file->bs, but in fact both the child that stores data, and the one that stores metadata (if they are separate). In any case, the BLKDBG_EVENT() should

[Qemu-devel] [PATCH v5 08/42] block: bdrv_set_backing_hd() is about bs->backing

2019-06-12 Thread Max Reitz
bdrv_set_backing_hd() is a function that explicitly cares about the bs->backing child. Highlight that in its description and use child_bs(bs->backing) instead of backing_bs(bs) to make it more obvious. Signed-off-by: Max Reitz --- block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-

[Qemu-devel] [PATCH v5 04/42] block: Add child access functions

2019-06-12 Thread Max Reitz
There are BDS children that the general block layer code can access, namely bs->file and bs->backing. Since the introduction of filters and external data files, their meaning is not quite clear. bs->backing can be a COW source, or it can be an R/W-filtered child; bs->file can be an R/W-filtered c

[Qemu-devel] [PATCH v5 10/42] block: Use CAF in bdrv_is_encrypted()

2019-06-12 Thread Max Reitz
bdrv_is_encrypted() should not only check the BDS's backing child, but any filtered child: If a filter's child is encrypted, the filter node itself naturally is encrypted, too. Furthermore, we need to recurse down the chain. (CAF means child access function.) Signed-off-by: Max Reitz --- block

[Qemu-devel] [PATCH v5 13/42] block: Use CAFs in block status functions

2019-06-12 Thread Max Reitz
Use the child access functions in the block status inquiry functions as appropriate. Signed-off-by: Max Reitz --- block/io.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/block/io.c b/block/io.c index 73ade04834..53aabf86b5 100644 --- a/block/io.c +++ b

[Qemu-devel] [PATCH v5 11/42] block: Add bdrv_supports_compressed_writes()

2019-06-12 Thread Max Reitz
Filters cannot compress data themselves but they have to implement .bdrv_co_pwritev_compressed() still (or they cannot forward compressed writes). Therefore, checking whether bs->drv->bdrv_co_pwritev_compressed is non-NULL is not sufficient to know whether the node can actually handle compressed w

[Qemu-devel] [PATCH v5 02/42] copy-on-read: Support compressed writes

2019-06-12 Thread Max Reitz
Signed-off-by: Max Reitz --- block/copy-on-read.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/copy-on-read.c b/block/copy-on-read.c index 53972b1da3..88e1c1f538 100644 --- a/block/copy-on-read.c +++ b/block/copy-on-read.c @@ -114,6 +114,16 @@ static int coroutine_fn cor

[Qemu-devel] [PATCH v5 01/42] block: Mark commit and mirror as filter drivers

2019-06-12 Thread Max Reitz
The commit and mirror block nodes are filters, so they should be marked as such. (Strictly speaking, BDS.is_filter's documentation states that a filter's child must be bs->file. The following patch will relax this restriction, however.) Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Revi

[Qemu-devel] [PATCH v5 00/42] block: Deal with filters

2019-06-12 Thread Max Reitz
Hi, When we introduced filters, we did it a bit casually. Sure, we talked a lot about them before, but that was mostly discussion about where implicit filters should be added to the graph (note that we currently only have two implicit filters, those being mirror and commit). But in the end, we r

[Qemu-devel] [PATCH 1/2] vl: Drain before (block) job cancel when quitting

2019-06-12 Thread Max Reitz
If the main loop cancels all block jobs while the block layer is not drained, this cancelling may not happen instantaneously. We can start a drained section before vm_shutdown(), which entails another bdrv_drain_all(); this nested bdrv_drain_all() will thus be a no-op, basically. We do not have t

[Qemu-devel] [PATCH v5 03/42] throttle: Support compressed writes

2019-06-12 Thread Max Reitz
Signed-off-by: Max Reitz --- block/throttle.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/block/throttle.c b/block/throttle.c index f64dcc27b9..de1b6bd7e8 100644 --- a/block/throttle.c +++ b/block/throttle.c @@ -152,6 +152,15 @@ static int coroutine_fn throttle_co_pdiscard(Bl

[Qemu-devel] [PATCH 0/2] vl: Drain before (block) job cancel when quitting

2019-06-12 Thread Max Reitz
Quitting qemu should lead to qemu exiting pretty much immediately. That means if you have a block job running on a throttled block node, the node should ignore its throttling and the job should be cancelled immediately. Unfortunately, that is not what happens. Currently, the node will be drained

[Qemu-devel] [PATCH 2/2] iotests: Test quitting with job on throttled node

2019-06-12 Thread Max Reitz
When qemu quits, all throttling should be ignored. That means, if there is a mirror job running from a throttled node, it should be cancelled immediately and qemu close without blocking. Signed-off-by: Max Reitz --- tests/qemu-iotests/218 | 55 -- tests/q

Re: [Qemu-devel] [PULL 6/6] travis: Make check-acceptance job more verbose

2019-06-12 Thread Eduardo Habkost
On Wed, Jun 12, 2019 at 10:49:18PM +0200, Philippe Mathieu-Daudé wrote: > On 6/11/19 7:14 PM, Eduardo Habkost wrote: > > It will help us debug issues when tests fail. > > > > Signed-off-by: Eduardo Habkost > > --- > > .travis.yml | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > >

Re: [Qemu-devel] [PULL 6/6] travis: Make check-acceptance job more verbose

2019-06-12 Thread Philippe Mathieu-Daudé
On 6/11/19 7:14 PM, Eduardo Habkost wrote: > It will help us debug issues when tests fail. > > Signed-off-by: Eduardo Habkost > --- > .travis.yml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/.travis.yml b/.travis.yml > index b053a836a3..a08a7b7278 100644 > --- a/.tra

[Qemu-devel] [PATCH] sun4m: set default display type to TCX

2019-06-12 Thread Mark Cave-Ayland
Commit 6807874d55 "sun4m: obey -vga none" changed the sun4m machines so that they could be started without a framebuffer installed, but as no default display type was configured the machines would start in headless mode without an explict -vga option. Set the default display type for all sun4m mac

Re: [Qemu-devel] [PATCH v7] ssh: switch from libssh2 to libssh

2019-06-12 Thread Philippe Mathieu-Daudé
Hi Pino, On 6/12/19 4:48 PM, Pino Toscano wrote: > Rewrite the implementation of the ssh block driver to use libssh instead > of libssh2. The libssh library has various advantages over libssh2: > - easier API for authentication (for example for using ssh-agent) > - easier API for known_hosts hand

Re: [Qemu-devel] [PATCH v2 06/15] target/ppc: introduce separate generator and helper for xscvqpdp

2019-06-12 Thread Richard Henderson
On 6/2/19 4:08 AM, Mark Cave-Ayland wrote: > Rather than perform the VSR register decoding within the helper itself, > introduce a new generator and helper function which perform the decode based > upon xT and xB at translation time. > > The xscvqpdp helper is the only 2 parameter xT/xB implementa

Re: [Qemu-devel] [PATCH v2 08/15] target/ppc: introduce GEN_VSX_HELPER_X2_AB macro to fpu_helper.c

2019-06-12 Thread Richard Henderson
On 6/2/19 4:08 AM, Mark Cave-Ayland wrote: > Rather than perform the VSR register decoding within the helper itself, > introduce a new GEN_VSX_HELPER_X2_AB macro which performs the decode based > upon xA and xB at translation time. > > Signed-off-by: Mark Cave-Ayland > --- > target/ppc/fpu_helpe

Re: [Qemu-devel] [PATCH v2 05/15] target/ppc: introduce GEN_VSX_HELPER_X3 macro to fpu_helper.c

2019-06-12 Thread Richard Henderson
On 6/2/19 4:08 AM, Mark Cave-Ayland wrote: > Rather than perform the VSR register decoding within the helper itself, > introduce a new GEN_VSX_HELPER_X3 macro which performs the decode based > upon xT, xA and xB at translation time. > > With the previous changes to the VSX_CMP generator and helper

Re: [Qemu-devel] [PATCH v2 07/15] target/ppc: introduce GEN_VSX_HELPER_X2 macro to fpu_helper.c

2019-06-12 Thread Richard Henderson
On 6/2/19 4:08 AM, Mark Cave-Ayland wrote: > Rather than perform the VSR register decoding within the helper itself, > introduce a new GEN_VSX_HELPER_X2 macro which performs the decode based > upon xT and xB at translation time. > > With the previous change to the xscvqpdp generator and helper fun

Re: [Qemu-devel] [PATCH v2 01/15] target/ppc: remove getVSR()/putVSR() from fpu_helper.c

2019-06-12 Thread Richard Henderson
On 6/2/19 4:08 AM, Mark Cave-Ayland wrote: > void helper_xvxsigsp(CPUPPCState *env, uint32_t opcode) > { > -ppc_vsr_t xt, xb; > +ppc_vsr_t *xt = &env->vsr[xT(opcode)]; > +ppc_vsr_t *xb = &env->vsr[xB(opcode)]; > +ppc_vsr_t t = *xt; > uint32_t exp, i, fraction; > > -getV

Re: [Qemu-devel] [PATCH v2 03/15] target/ppc: remove getVSR()/putVSR() from int_helper.c

2019-06-12 Thread Richard Henderson
On 6/2/19 4:08 AM, Mark Cave-Ayland wrote: > Since commit 8a14d31b00 "target/ppc: switch fpr/vsrl registers so all VSX > registers are in host endian order" functions getVSR() and putVSR() which used > to convert the VSR registers into host endian order are no longer required. > > Now that there a

Re: [Qemu-devel] [PATCH v2 02/15] target/ppc: remove getVSR()/putVSR() from mem_helper.c

2019-06-12 Thread Richard Henderson
On 6/2/19 4:08 AM, Mark Cave-Ayland wrote: > -getVSR(xt_num, &xt, env); \ > + \ > nb = (nb >= 16) ? 16 : nb;\ > if (msr_le && !lj) {

Re: [Qemu-devel] [PATCH v2 04/15] target/ppc: introduce separate VSX_CMP macro for xvcmp* instructions

2019-06-12 Thread Richard Henderson
On 6/2/19 4:08 AM, Mark Cave-Ayland wrote: > Rather than perform the VSR register decoding within the helper itself, > introduce a new VSX_CMP macro which performs the decode based upon xT, xA > and xB at translation time. > > Subsequent commits will make the same changes for other instructions ho

Re: [Qemu-devel] [Qemu-arm] [PATCH v2] net: cadence_gem: fix compilation error when debug is on

2019-06-12 Thread Eric Blake
On 6/12/19 1:03 PM, Alex Bennée wrote: > > Ramon Fried writes: > >> defining CADENCE_GEM_ERR_DEBUG causes compilation >> errors, fix that. > > It would be worth doing something like: > > #ifdef CADENCE_GEM_ERR_DEBUG > #define CADENCE_GEM_GATE 1 > #else > #define CADENCE_GEM_GATE 0 > #endif >

Re: [Qemu-devel] [QEMU] [PATCH v2 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-12 Thread Gerd Hoffmann
On Wed, Jun 12, 2019 at 04:30:03PM +0300, Sam Eiderman wrote: > > > > On 12 Jun 2019, at 16:06, Gerd Hoffmann wrote: > > > > On Wed, Jun 12, 2019 at 02:59:31PM +0300, Sam Eiderman wrote: > >> v1: > >> > >> Non-standard logical geometries break under QEMU. > >> > >> A virtual disk which contai

Re: [Qemu-devel] [Qemu-arm] [PATCH v2] net: cadence_gem: fix compilation error when debug is on

2019-06-12 Thread Alex Bennée
Ramon Fried writes: > defining CADENCE_GEM_ERR_DEBUG causes compilation > errors, fix that. It would be worth doing something like: #ifdef CADENCE_GEM_ERR_DEBUG #define CADENCE_GEM_GATE 1 #else #define CADENCE_GEM_GATE 0 #endif #define DB_PRINT(...) do { \ if (CADENCE_GEM_GATE) { \

  1   2   3   >