[Qemu-devel] [PATCH v3 00/50] tcg plugin support

2019-06-14 Thread Alex Bennée
Hi, This is v3 of the proposed plugins API for QEMU. As Emilio is busy having finished his time at Columbia I have volunteered to take the patch series forward. Emilio's RFC v2 was posted last year: Subject: [RFC v2 00/38] Plugin support Date: Sun, 9 Dec 2018 14:37:11 -0500 Message-Id: <20

[Qemu-devel] [PATCH v3 05/50] docs/devel: add plugins.rst design document

2019-06-14 Thread Alex Bennée
This is mostly extracted from Emilio's more verbose commit comments with some additional verbiage from me. Signed-off-by: Alex Bennée --- docs/devel/index.rst | 1 + docs/devel/plugins.rst | 99 ++ 2 files changed, 100 insertions(+) create mode 100644

[Qemu-devel] [PATCH 2/2] spapr/xive: simplify spapr_irq_init_device() to remove the emulated init

2019-06-14 Thread Cédric Le Goater
The init_emu() handles are now empty. Remove them and rename spapr_irq_init_device() to spapr_irq_init_kvm(). Signed-off-by: Cédric Le Goater --- include/hw/ppc/spapr_irq.h | 1 - hw/ppc/spapr_irq.c | 20 +++- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git

[Qemu-devel] [PATCH v3 14/50] tcg: add tcg_gen_st_ptr

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Will gain a user soon. Signed-off-by: Emilio G. Cota --- tcg/tcg-op.h | 5 + 1 file changed, 5 insertions(+) diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h index e997346c97..edf12de1f3 100644 --- a/tcg/tcg-op.h +++ b/tcg/tcg-op.h @@ -1260,6 +1260,11 @@ static inline void

[Qemu-devel] [PATCH v3 02/50] tcg/README: fix typo s/afterwise/afterwards/

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Afterwise is "wise after the fact", as in "hindsight". Here we meant "afterwards" (as in "subsequently"). Fix it. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- tcg/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/README b/tcg/R

[Qemu-devel] [PATCH v3 03/50] cpu: introduce cpu_in_exclusive_work_context()

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" Suggested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- cpus-common.c | 2 ++ include/qom/cpu.h | 13 + 2 files changed, 15 insertions(+) diff --git a/cpus-common.c b/cpus-common.c index 3ca58c64e8..960058457a 100644 --- a/

[Qemu-devel] [PATCH 0/2] spapr/xive: rework the mapping the KVM memory regions

2019-06-14 Thread Cédric Le Goater
Hello, Here is a small series simplifying the initialization sequence of the interrupt device by using memory regions specific for KVM. These are mapped as overlaps on top of the emulated device. Thanks, C. Cédric Le Goater (2): spapr/xive: rework the mapping the KVM memory regions spapr/xi

[Qemu-devel] [PATCH 1/2] spapr/xive: rework the mapping the KVM memory regions

2019-06-14 Thread Cédric Le Goater
Today, the interrupt device is fully initialized at reset when the CAS negotiation process has completed. Depending on the KVM capabilities, the SpaprXive memory regions (ESB, TIMA) are initialized with a host MMIO backend or a QEMU emulated backend. This results in a complex initialization sequenc

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

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 19:02, Max Reitz wrote: > On 14.06.19 16:31, Vladimir Sementsov-Ogievskiy wrote: >> 14.06.2019 16:50, Max Reitz wrote: >>> On 14.06.19 15:26, Vladimir Sementsov-Ogievskiy wrote: 13.06.2019 1:09, Max Reitz wrote: > Use child access functions when iterating through backing chains

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

2019-06-14 Thread Max Reitz
On 14.06.19 17:29, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> 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 Rei

Re: [Qemu-devel] [PATCH] MAINTAINERS: Change maintership of Xen code under hw/9pfs

2019-06-14 Thread Greg Kurz
On Fri, 14 Jun 2019 08:44:26 -0700 (PDT) Stefano Stabellini wrote: > On Fri, 14 Jun 2019, Paul Durrant wrote: > > > -Original Message- > > > From: Greg Kurz [mailto:gr...@kaod.org] > > > Sent: 14 June 2019 09:16 > > > To: Paul Durrant > > > Cc: Anthony Perard ; qemu-devel@nongnu.org; >

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

2019-06-14 Thread Max Reitz
On 14.06.19 17:22, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> 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_go

Re: [Qemu-devel] [PATCH] migration: Add error_desc for file channel errors

2019-06-14 Thread Dr. David Alan Gilbert
* Yury Kotov (yury-ko...@yandex-team.ru) wrote: > Currently, there is no information about error if outgoing migration was > failed > because of file channel errors. > Example (QMP session): > -> { "execute": "migrate", "arguments": { "uri": "exec:head -c 1" }} > <- { "return": {} } > ... > -> { "

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

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 19:10, Max Reitz wrote: > On 14.06.19 17:22, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 1:09, Max Reitz wrote: >>> 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.

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

2019-06-14 Thread Max Reitz
On 14.06.19 17:46, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> 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 > > Overlay created i

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

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 18:52, Max Reitz wrote: > On 14.06.19 15:42, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 1:09, Max Reitz wrote: >>> 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 thing

[Qemu-devel] [PATCH] migration: Improve accuracy of vCPU throttling with per-vCPU timers

2019-06-14 Thread Cosmin Marin
During auto-convergence live migration, the configured throttling rate is not matched in practice. Experimental measurements of throughput for a memory-write intensive workload indicate disparities between expected and measured throttle rate - when set to 99%, the actual throttle rate was 95%. The

[Qemu-devel] [PATCH v5 7/8] hmat acpi: Build System Locality Latency and Bandwidth Information Structure(s) in ACPI HMAT

2019-06-14 Thread Tao Xu
From: Liu Jingqi This structure describes the memory access latency and bandwidth information from various memory access initiator proximity domains. The latency and bandwidth numbers represented in this structure correspond to rated latency and bandwidth for the platform. The software could use

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

2019-06-14 Thread Max Reitz
On 14.06.19 17:41, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1: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 1006

[Qemu-devel] [PATCH v5 3/8] numa: move numa global variable have_numa_distance into MachineState

2019-06-14 Thread Tao Xu
Move existing numa global have_numa_distance into NumaState. Reviewed-by: Igor Mammedov Reviewed-by: Liu Jingqi Suggested-by: Igor Mammedov Suggested-by: Eduardo Habkost Signed-off-by: Tao Xu --- Changes in v5 -> v4: - Simplify commit message (Igor) --- hw/arm/virt-acpi-build.c | 2 +-

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

2019-06-14 Thread Max Reitz
On 14.06.19 16:31, Vladimir Sementsov-Ogievskiy wrote: > 14.06.2019 16:50, Max Reitz wrote: >> On 14.06.19 15:26, Vladimir Sementsov-Ogievskiy wrote: >>> 13.06.2019 1:09, Max Reitz wrote: Use child access functions when iterating through backing chains so filters do not break the chain. >

Re: [Qemu-devel] [PATCH v8 4/7] block: introduce backup-top filter driver

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 15:57, Max Reitz wrote: > On 14.06.19 11:04, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 18:57, Max Reitz wrote: >>> On 29.05.19 17:46, Vladimir Sementsov-Ogievskiy wrote: Backup-top filter does copy-before-write operation. It should be inserted above active disk and has

[Qemu-devel] [PATCH v5 0/8] Build ACPI Heterogeneous Memory Attribute Table (HMAT)

2019-06-14 Thread Tao Xu
This series of patches will build Heterogeneous Memory Attribute Table (HMAT) according to the command line. The ACPI HMAT describes the memory attributes, such as memory side cache attributes and bandwidth and latency details, related to the System Physical Address (SPA) Memory Ranges. The softwar

Re: [Qemu-devel] [PATCH 0/3] Collecting TB Execution Frequency

2019-06-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190614135332.12777-1-vanderson...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH 0/3] Collecting TB Execution Frequency Type: series Message-id: 20190614135332.127

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

2019-06-14 Thread Max Reitz
On 14.06.19 15:42, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> 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

[Qemu-devel] [PATCH v5 8/8] numa: Extend the command-line to provide memory latency and bandwidth information

2019-06-14 Thread Tao Xu
From: Liu Jingqi Add -numa hmat-lb option to provide System Locality Latency and Bandwidth Information. These memory attributes help to build System Locality Latency and Bandwidth Information Structure(s) in ACPI Heterogeneous Memory Attribute Table (HMAT). Signed-off-by: Liu Jingqi Signed-off-

[Qemu-devel] [PATCH v5 5/8] acpi: introduce AcpiDeviceIfClass.build_mem_ranges hook

2019-06-14 Thread Tao Xu
Add build_mem_ranges callback to AcpiDeviceIfClass and use it for generating SRAT and HMAT numa memory ranges. Suggested-by: Igor Mammedov Co-developed-by: Liu Jingqi Signed-off-by: Liu Jingqi Signed-off-by: Tao Xu --- Changes in v5 -> v4: - Add the missing if 'mem_len > 0' in pc_build_me

[Qemu-devel] [PATCH v5 4/8] numa: move numa global variable numa_info into MachineState

2019-06-14 Thread Tao Xu
Move existing numa global numa_info (renamed as "nodes") into NumaState. Reviewed-by: Liu Jingqi Suggested-by: Igor Mammedov Suggested-by: Eduardo Habkost Signed-off-by: Tao Xu --- Changes in v5 -> v4: - Directly use ms->numa_state->nodes and not dereferencing ms->numa_state in the fi

[Qemu-devel] [PATCH v5 1/8] hw/arm: simplify arm_load_dtb

2019-06-14 Thread Tao Xu
In struct arm_boot_info, kernel_filename, initrd_filename and kernel_cmdline are copied from from MachineState. This patch add MachineState as a parameter into arm_load_dtb() and move the copy chunk of kernel_filename, initrd_filename and kernel_cmdline into arm_load_kernel(). Reviewed-by: Liu Jin

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

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > 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 Overlay created in snapshot operation assumed to consume following writes and it's

[Qemu-devel] [PATCH v5 6/8] hmat acpi: Build Memory Subsystem Address Range Structure(s) in ACPI HMAT

2019-06-14 Thread Tao Xu
From: Liu Jingqi HMAT is defined in ACPI 6.2: 5.2.27 Heterogeneous Memory Attribute Table (HMAT). The specification references below link: http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf It describes the memory attributes, such as memory side cache attributes and bandwidth and lat

Re: [Qemu-devel] QEMU tries to register to VFIO memory that is not RAM

2019-06-14 Thread Thanos Makatos
> > > diff --git a/hw/vfio/common.c b/hw/vfio/common.c > > > index 4374cc6176..d9d3b1277a 100644 > > > --- a/hw/vfio/common.c > > > +++ b/hw/vfio/common.c > > > @@ -430,6 +430,9 @@ static void > > vfio_listener_region_add(MemoryListener *listener, > > > VFIOHostDMAWindow *hostwin; > > > b

[Qemu-devel] [PATCH v5 2/8] numa: move numa global variable nb_numa_nodes into MachineState

2019-06-14 Thread Tao Xu
Add struct NumaState in MachineState and move existing numa global nb_numa_nodes(renamed as "num_nodes") into NumaState. And add variable numa_support into MachineClass to decide which submachines support NUMA. Reviewed-by: Liu Jingqi Suggested-by: Igor Mammedov Suggested-by: Eduardo Habkost Si

Re: [Qemu-devel] [PATCH] MAINTAINERS: Change maintership of Xen code under hw/9pfs

2019-06-14 Thread Stefano Stabellini
On Fri, 14 Jun 2019, Paul Durrant wrote: > > -Original Message- > > From: Greg Kurz [mailto:gr...@kaod.org] > > Sent: 14 June 2019 09:16 > > To: Paul Durrant > > Cc: Anthony Perard ; qemu-devel@nongnu.org; > > Stefano Stabellini > > > > Subject: Re: [PATCH] MAINTAINERS: Change maintershi

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

2019-06-14 Thread Max Reitz
On 14.06.19 16:01, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> 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 da

Re: [Qemu-devel] [PATCH] vfio-ccw: use vfio_set_irq_signaling

2019-06-14 Thread Eric Farman
On 6/14/19 11:06 AM, Auger Eric wrote: > Hi Eric, > > On 6/14/19 4:30 PM, Eric Farman wrote: >> >> >> On 6/14/19 5:27 AM, Cornelia Huck wrote: >>> Use the new helper. >>> >>> Signed-off-by: Cornelia Huck >>> --- >>> hw/vfio/ccw.c | 68 +++ >>> 1

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

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > 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 > th

Re: [Qemu-devel] [PATCH 0/4] block: Keep track of parent quiescing

2019-06-14 Thread Kevin Wolf
Am 05.06.2019 um 18:11 hat Max Reitz geschrieben: > We currently do not keep track of how many times a child has quiesced > its parent. We just guess based on the child’s quiesce_counter. That > keeps biting us when we try to leave drained sections or detach children > (see e.g. commit 5cb2737e92

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

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1: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

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

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > 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 Honestly, don't know why blkdebug is always searched in

Re: [Qemu-devel] [PATCH] hw: Nuke hw_compat_4_0_1 and pc_compat_4_0_1

2019-06-14 Thread Dr. David Alan Gilbert
* Greg Kurz (gr...@kaod.org) wrote: > Commit c87759ce876a fixed a regression affecting pc-q35 machines by > introducing a new pc-q35-4.0.1 machine version to be used instead > of pc-q35-4.0. The only purpose was to revert the default behaviour > of not using split irqchip, but the change also intro

Re: [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/14/19 4:30 PM, Peter Maydell wrote: > On Fri, 14 Jun 2019 at 14:58, Alex Bennée wrote: > >> It would be nice to have a --static-user config flag and deprecate the >> --static flag. I don't think there is a decent use case for system >> emulation targets. > > It would be really tricky to bui

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

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/14/19 4:34 PM, Max Reitz wrote: > On 14.06.19 16:29, Pino Toscano wrote: >> On Thursday, 13 June 2019 21:31:40 CEST Max Reitz wrote: >>> On 13.06.19 15:20, Pino Toscano wrote: [...] -case LIBSSH2_KNOWNHOST_CHECK_NOTFOUND: +case SSH_KNOWN_HOSTS_OTHER: ret = -EINV

Re: [Qemu-devel] [PULL 00/20] Block patches

2019-06-14 Thread Peter Maydell
On Fri, 14 Jun 2019 at 14:40, Max Reitz wrote: > > The following changes since commit 5ec2eca83dc478ddf24077e02a8b34dd26cd3ff9: > > Merge remote-tracking branch > 'remotes/awilliam/tags/vfio-updates-20190613.0' into staging (2019-06-14 > 09:33:55 +0100) > > are available in the Git repository

[Qemu-devel] [PATCH] riscv: sifive_test: Add reset functionality

2019-06-14 Thread Bin Meng
This adds a reset opcode for sifive_test device to trigger a system reset for testing purpose. Signed-off-by: Bin Meng --- hw/riscv/sifive_test.c | 4 include/hw/riscv/sifive_test.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/riscv/sifive_test.c b/hw/r

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

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > 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. Hmm, as I u

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

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/13/19 8:18 PM, Paolo Bonzini wrote: > On 13/06/19 19:15, Philippe Mathieu-Daudé wrote: >> >> On 6/13/19 6:24 PM, no-re...@patchew.org wrote: >>> === TEST SCRIPT BEGIN === >>> #!/bin/bash >>> time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1 >>> === TEST SCRIPT END ==

Re: [Qemu-devel] [PATCH] vfio-ccw: use vfio_set_irq_signaling

2019-06-14 Thread Auger Eric
Hi Eric, On 6/14/19 4:30 PM, Eric Farman wrote: > > > On 6/14/19 5:27 AM, Cornelia Huck wrote: >> Use the new helper. >> >> Signed-off-by: Cornelia Huck >> --- >> hw/vfio/ccw.c | 68 +++ >> 1 file changed, 14 insertions(+), 54 deletions(-) >> >>

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

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
14.06.2019 16:50, Max Reitz wrote: > On 14.06.19 15:26, Vladimir Sementsov-Ogievskiy wrote: >> 13.06.2019 1:09, Max Reitz wrote: >>> Use child access functions when iterating through backing chains so >>> filters do not break the chain. >>> >>> Signed-off-by: Max Reitz >>> --- >>>block.c | 40

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

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/14/19 4:30 PM, Max Reitz wrote: > On 14.06.19 16:26, Philippe Mathieu-Daudé wrote: >> On 6/13/19 9:31 PM, Max Reitz wrote: >>> On 13.06.19 15:20, Pino Toscano wrote: Rewrite the implementation of the ssh block driver to use libssh instead of libssh2. The libssh library has various a

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

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

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

2019-06-14 Thread Max Reitz
On 14.06.19 16:29, Pino Toscano wrote: > On Thursday, 13 June 2019 21:31:40 CEST Max Reitz wrote: >> On 13.06.19 15:20, Pino Toscano wrote: >>> -switch (r) { >>> -case LIBSSH2_KNOWNHOST_CHECK_MATCH: >>> +switch (state) { >>> +case SSH_KNOWN_HOSTS_OK: >>> /* OK */ >>> -

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

2019-06-14 Thread Max Reitz
On 14.06.19 16:26, Philippe Mathieu-Daudé wrote: > On 6/13/19 9:31 PM, Max Reitz wrote: >> On 13.06.19 15:20, 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 fo

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

2019-06-14 Thread Pino Toscano
On Thursday, 13 June 2019 21:31:40 CEST Max Reitz wrote: > On 13.06.19 15:20, Pino Toscano wrote: > > -switch (r) { > > -case LIBSSH2_KNOWNHOST_CHECK_MATCH: > > +switch (state) { > > +case SSH_KNOWN_HOSTS_OK: > > /* OK */ > > -trace_ssh_check_host_key_knownhosts(fou

Re: [Qemu-devel] [PATCH] vfio-ccw: use vfio_set_irq_signaling

2019-06-14 Thread Eric Farman
On 6/14/19 5:27 AM, Cornelia Huck wrote: > Use the new helper. > > Signed-off-by: Cornelia Huck > --- > hw/vfio/ccw.c | 68 +++ > 1 file changed, 14 insertions(+), 54 deletions(-) > > diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c > index 03a2becb3

Re: [Qemu-devel] [PATCH v22 0/7] QEMU AVR 8 bit cores

2019-06-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190614131724.33928-1-mrol...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v22 0/7] QEMU AVR 8 bit cores Type: series Message-id: 20190614131724.33928-1-mrol...@gm

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

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/13/19 9:31 PM, Max Reitz wrote: > On 13.06.19 15:20, 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) >> -

Re: [Qemu-devel] [PATCH 6/8] VNC Acceptance test: simplify test names

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/7/19 5:22 PM, Cleber Rosa wrote: > The test name is composed of the class name and method name, so it > looks like there's some redundancy here that we can eliminate. > > Signed-off-by: Cleber Rosa > --- > tests/acceptance/vnc.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >

Re: [Qemu-devel] [PATCH 2/2] hw/arm/smmuv3: Implement dummy replay

2019-06-14 Thread Auger Eric
Hi Peter, On 6/14/19 3:45 PM, Peter Maydell wrote: > On Fri, 14 Jun 2019 at 14:40, Auger Eric wrote: >> >> Hi Peter, >> >> On 6/14/19 3:26 PM, Peter Maydell wrote: >>> On Tue, 11 Jun 2019 at 15:29, Eric Auger wrote: On ARM we currently do not support VFIO-PCI devices protected by

Re: [Qemu-devel] [PATCH 3/8] Acceptance tests: drop left over usage of ":avocado: enable"

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/7/19 5:22 PM, Cleber Rosa wrote: > Commit 9531d26c10 removed all of ":avocado: enable" tags, but then > a new entry was added with the introduction of migration.py. > > Let's remove it for consistency. > > Signed-off-by: Cleber Rosa > --- > tests/acceptance/migration.py | 3 --- > 1 file c

Re: [Qemu-devel] [PATCH 1/2] hw/arm/smmuv3: Remove spurious error messages on IOVA invalidations

2019-06-14 Thread Auger Eric
Hi Peter, On 6/14/19 3:23 PM, Peter Maydell wrote: > On Tue, 11 Jun 2019 at 15:29, Eric Auger wrote: >> >> An IOVA/ASID invalidation is notified to all IOMMU Memory Regions >> through smmuv3_inv_notifiers_iova/smmuv3_notify_iova. >> >> When the notification occurs it is possible that some of the

Re: [Qemu-devel] [PATCH 2/8] tests/requirements.txt: pin paramiko version requirement

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/7/19 5:22 PM, Cleber Rosa wrote: > It's a good practice (I'd really say a must) to pin as much as > possible of the software versions used during test, so let's apply > that to paramiko. > > According to https://pypi.org/project/paramiko/, 2.4.2 is the latest > released version. It's also ea

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

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > 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

[Qemu-devel] [Qemu-Devel][PATCH 3/3] Adding command line option to linux-user.

2019-06-14 Thread vandersonmr
Added -execfreq to enable execution frequency counting and dump all the TB's addresses and their execution frequency at the end of the execution. Signed-off-by: vandersonmr --- linux-user/exit.c | 5 + linux-user/main.c | 7 +++ 2 files changed, 12 insertions(+) diff --git a/linux-user/

Re: [Qemu-devel] [PATCH] roms/edk2-build.sh: Allow to run edk2-build.sh from command line

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/14/19 3:29 PM, Eric Blake wrote: > On 6/14/19 5:16 AM, Philippe Mathieu-Daudé wrote: >> Cc'ing Eric :) >> > >>> When running this script out of 'make', we get: >>> >>> $ cd roms >>> $ ./edk2-build.sh aarch64 --arch=AARCH64 >>> --platform=ArmVirtPkg/ArmVirtQemu.dsc > /dev/null >>> ./edk

Re: [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking

2019-06-14 Thread Peter Maydell
On Fri, 14 Jun 2019 at 14:58, Alex Bennée wrote: > It would be nice to have a --static-user config flag and deprecate the > --static flag. I don't think there is a decent use case for system > emulation targets. It would be really tricky to build half with static and half without: our configure

Re: [Qemu-devel] [PATCH 6/6] .travis.yml: Test static linking

2019-06-14 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Signed-off-by: Philippe Mathieu-Daudé > --- > This job currently fails: > > LINKlm32-softmmu/qemu-system-lm32 > /usr/bin/ld: cannot find -lgtk-3 > /usr/bin/ld: cannot find -latk-bridge-2.0 > /usr/bin/ld: cannot find -latspi > /usr/bin/

[Qemu-devel] [Qemu-Devel][PATCH 2/3] Saving counters between tb_flush events.

2019-06-14 Thread vandersonmr
A new hash map was added to store the accumulated execution frequency of the TBs even after tb_flush events. A dump function was also added as a way to visualize these frequencies. Signed-off-by: vandersonmr --- accel/tcg/translate-all.c | 59 +++ accel/tcg/tr

[Qemu-devel] [PULL 17/20] blkdebug: Add "none" event

2019-06-14 Thread Max Reitz
Together with @iotypes and @sector, this can be used to trap e.g. the first read or write access to a certain sector without having to know what happens internally in the block layer, i.e. which "real" events happen right before such an access. Signed-off-by: Max Reitz Reviewed-by: Vladimir Semen

Re: [Qemu-devel] [PATCH 1/8] Travis: print acceptance tests logs in case of job failure

2019-06-14 Thread Alex Bennée
Cleber Rosa writes: > Because Travis doesn't allow us to keep files produced during tests > (such as log files), let's print the complete job log to the "console" > in case of job failures. > > This is a debugging aid, and given that there's been some timeouts > happening on some tests, we abso

[Qemu-devel] [PATCH 0/3] Collecting TB Execution Frequency

2019-06-14 Thread vandersonmr
This is the first series of patches related to the TCGCodeQuality GSoC project More at https://wiki.qemu.org/Features/TCGCodeQuality It adds an option to instrument TBs and collects their execution frequency. The execution frequency is then store/accumulated in an auxiliary structure every time a

[Qemu-devel] [PULL 18/20] blkdebug: Inject errors on .bdrv_co_block_status()

2019-06-14 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id: 20190507203508.18026-6-mre...@redhat.com Signed-off-by: Max Reitz --- qapi/block-core.json | 5 - block/blkdebug.c | 8 2 files changed, 12 insertions(+), 1 deletion(-) diff

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

2019-06-14 Thread Max Reitz
On 14.06.19 15:26, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >> Use child access functions when iterating through backing chains so >> filters do not break the chain. >> >> Signed-off-by: Max Reitz >> --- >> block.c | 40 >>

[Qemu-devel] [PULL 13/20] blockdev: Overlays are not snapshots

2019-06-14 Thread Max Reitz
There are error messages which refer to an overlay node as the snapshot. That is wrong, those are two different things. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 20190603202236.1342-3-mre...@redhat.com Reviewed-by: John Snow Reviewed-by: Alberto Garcia Signed-off-by: Max Rei

Re: [Qemu-devel] [PATCH v3 0/8] block: Ignore loosening perm restrictions failures

2019-06-14 Thread Kevin Wolf
Am 22.05.2019 um 19:03 hat Max Reitz geschrieben: > Hi, > > This series is mainly a fix for > https://bugzilla.redhat.com/show_bug.cgi?id=1703793. The problem > described there is that mirroring to a gluster volume, then switching > off the volume makes qemu crash. There are two problems here: >

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

2019-06-14 Thread Vladimir Sementsov-Ogievskiy
13.06.2019 1:09, Max Reitz wrote: > 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.

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

2019-06-14 Thread Pino Toscano
On Thursday, 13 June 2019 21:41:58 CEST Stefan Weil wrote: > On 12.06.19 15:27, Philippe Mathieu-Daudé wrote: > > Cc'ing Alex (Docker, Travis) and Stefan (MinGW) > [...] > > Note, libssh is not available on MinGW. > > Nor is it available for Mingw64: > > https://cygwin.com/cgi-bin2/package-grep.c

[Qemu-devel] [PULL 11/20] qemu-img: Fix options leakage in img_rebase()

2019-06-14 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 Message-id: 20190528195338.12376-1-mre...@redhat.com Reviewed-by: John Snow Signed-off-by: Max R

Re: [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking

2019-06-14 Thread Alex Bennée
Peter Maydell writes: > On Fri, 14 Jun 2019 at 08:27, Philippe Mathieu-Daudé > wrote: >> Apparently QEMU static linking is slowly bitroting. Obviously it >> depends the libraries an user has installed, anyway it seems there >> are not much testing done. > > The main reason for supporting stat

[Qemu-devel] [PULL 20/20] iotests: Test qemu-img convert -C --salvage

2019-06-14 Thread Max Reitz
We do not support this combination (yet), so this should yield an error message. Signed-off-by: Max Reitz Tested-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id: 20190507203508.18026-8-mre...@redhat.com Signed-off-by: Max Reitz --- tests/qemu-iotests/082

[Qemu-devel] [PULL 14/20] qemu-img: Move quiet into ImgConvertState

2019-06-14 Thread Max Reitz
Move img_convert()'s quiet flag into the ImgConvertState so it is accessible by nested functions. -q dictates that it suppresses anything but errors, so if those functions want to emit warnings, they need to query this flag first. (There currently are no such warnings, but there will be as of the

[Qemu-devel] [PULL 12/20] qapi/block-core: Overlays are not snapshots

2019-06-14 Thread Max Reitz
A snapshot is something that reflects the state of something at a certain point in time. It does not change. The file our snapshot commands create (or the node they install) is not a snapshot, as it does change over time. It is an overlay. We cannot do anything about the parameter names, but we

[Qemu-devel] [PULL 19/20] iotests: Test qemu-img convert --salvage

2019-06-14 Thread Max Reitz
This test converts a simple image to another, but blkdebug injects block_status and read faults at some offsets. The resulting image should be the same as the input image, except that sectors that could not be read have to be 0. Signed-off-by: Max Reitz Message-id: 20190507203508.18026-7-mre...@

[Qemu-devel] [Qemu-Devel][PATCH 1/3] Adding an optional tb execution counter.

2019-06-14 Thread vandersonmr
An uint64_t counter was added in the TranslationBlock struct and it is incremented every time that the TB is executed. Signed-off-by: vandersonmr --- accel/tcg/tcg-runtime.c | 6 ++ accel/tcg/tcg-runtime.h | 2 ++ include/exec/exec-all.h | 1 + include/exec/gen-icount.h | 7 +++ li

[Qemu-devel] [PULL 10/20] iotests: restrict 254 to support only qcow2

2019-06-14 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Test fails at least for qcow, because of different cluster sizes in base and top (and therefore different granularities of bitmaps we are trying to merge). The test aim is to check block-dirty-bitmap-merge between different nodes functionality, no needs to chec

[Qemu-devel] [PULL 07/20] iotests: Filter 175's allocation information

2019-06-14 Thread Max Reitz
It is possible for an empty file to take up blocks on a filesystem, for example: $ qemu-img create -f raw test.img 1G Formatting 'test.img', fmt=raw size=1073741824 $ mkfs.ext4 -I 128 -q test.img $ mkdir test-mount $ sudo mount -o loop test.img test-mount $ sudo touch test-mount/test-file $ stat -

Re: [Qemu-devel] [PATCH 2/2] hw/arm/smmuv3: Implement dummy replay

2019-06-14 Thread Peter Maydell
On Fri, 14 Jun 2019 at 14:40, Auger Eric wrote: > > Hi Peter, > > On 6/14/19 3:26 PM, Peter Maydell wrote: > > On Tue, 11 Jun 2019 at 15:29, Eric Auger wrote: > >> > >> On ARM we currently do not support VFIO-PCI devices protected > >> by the IOMMU. Any attempt to run such use case results in thi

[Qemu-devel] [PULL 06/20] event_match: always match on None value

2019-06-14 Thread Max Reitz
From: 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-T

[Qemu-devel] [PULL 05/20] iotests: add iotest 256 for testing blockdev-backup across iothread contexts

2019-06-14 Thread Max Reitz
From: John Snow Signed-off-by: John Snow Message-id: 20190523170643.20794-6-js...@redhat.com Reviewed-by: Max Reitz [mreitz: Moved from 250 to 256] Signed-off-by: Max Reitz --- tests/qemu-iotests/256 | 122 + tests/qemu-iotests/256.out | 119 +++

[Qemu-devel] [PULL 16/20] blkdebug: Add @iotype error option

2019-06-14 Thread Max Reitz
This new error option allows users of blkdebug to inject errors only on certain kinds of I/O operations. Users usually want to make a very specific operation fail, not just any; but right now they simply hope that the event that triggers the error injection is followed up with that very operation.

[Qemu-devel] [PULL 04/20] iotests.py: rewrite run_job to be pickier

2019-06-14 Thread Max Reitz
From: John Snow Don't pull events out of the queue that don't belong to us; be choosier so that we can use this method to drive jobs that were launched by transactions that may have more jobs. Signed-off-by: John Snow Message-id: 20190523170643.20794-5-js...@redhat.com Reviewed-by: Max Reitz S

[Qemu-devel] [PULL 02/20] iotests.py: do not use infinite waits

2019-06-14 Thread Max Reitz
From: John Snow Cap waits to 60 seconds so that iotests can fail gracefully if something goes wrong. Signed-off-by: John Snow Message-id: 20190523170643.20794-3-js...@redhat.com Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 14 +++--- 1 file chan

[Qemu-devel] [PULL 15/20] qemu-img: Add salvaging mode to convert

2019-06-14 Thread Max Reitz
This adds a salvaging mode (--salvage) to qemu-img convert which ignores read errors and treats the respective areas as containing only zeroes. This can be used for instance to at least partially recover the data from terminally corrupted qcow2 images. Signed-off-by: Max Reitz Reviewed-by: Vladim

[Qemu-devel] [PULL 09/20] hw/block/fdc: floppy command FIFO memory initialization

2019-06-14 Thread Max Reitz
From: Andrey Shinkevich The uninitialized memory allocated for the command FIFO of the floppy controller during the VM hardware initialization incurs many unwanted reports by Valgrind when VM state is being saved. That verbosity hardens a search for the real memory issues when the iotests run. Pa

[Qemu-devel] [PULL 01/20] blockdev-backup: don't check aio_context too early

2019-06-14 Thread Max Reitz
From: John Snow in blockdev_backup_prepare, we check to make sure that the target is associated with a compatible aio context. However, do_blockdev_backup is called later and has some logic to move the target to a compatible aio_context. The transaction version will fail certain commands needless

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

2019-06-14 Thread Max Reitz
The following changes since commit 5ec2eca83dc478ddf24077e02a8b34dd26cd3ff9: Merge remote-tracking branch 'remotes/awilliam/tags/vfio-updates-20190613.0' into staging (2019-06-14 09:33:55 +0100) are available in the Git repository at: https://github.com/XanClic/qemu.git tags/pull-block-2019

[Qemu-devel] [PULL 08/20] iotests: Fix intermittent failure in 219

2019-06-14 Thread Max Reitz
In 219, we wait for the job to make progress before we emit its status. This makes the output reliable. We do not wait for any more progress if the job's current-progress already matches its total-progress. Unfortunately, there is a bug: Right after the job has been started, it's possible that to

[Qemu-devel] [PULL 03/20] QEMUMachine: add events_wait method

2019-06-14 Thread Max Reitz
From: John Snow Instead of event_wait which looks for a single event, add an events_wait which can look for any number of events simultaneously. However, it will still only return one at a time, whichever happens first. Signed-off-by: John Snow Message-id: 20190523170643.20794-4-js...@redhat.co

Re: [Qemu-devel] [PATCH 2/2] hw/arm/smmuv3: Implement dummy replay

2019-06-14 Thread Auger Eric
Hi Peter, On 6/14/19 3:26 PM, Peter Maydell wrote: > On Tue, 11 Jun 2019 at 15:29, Eric Auger wrote: >> >> On ARM we currently do not support VFIO-PCI devices protected >> by the IOMMU. Any attempt to run such use case results in this >> kind of warning: >> >> "-device vfio-pci,host=0004:01:00.0,

Re: [Qemu-devel] [PATCH] roms/edk2-build.sh: Allow to run edk2-build.sh from command line

2019-06-14 Thread Eric Blake
On 6/14/19 5:16 AM, Philippe Mathieu-Daudé wrote: > Cc'ing Eric :) > >> When running this script out of 'make', we get: >> >> $ cd roms >> $ ./edk2-build.sh aarch64 --arch=AARCH64 >> --platform=ArmVirtPkg/ArmVirtQemu.dsc > /dev/null >> ./edk2-build.sh: line 46: MAKEFLAGS: unbound variable

<    1   2   3   4   >