[PULL 20/44] memory_hotplug.c: send DEVICE_UNPLUG_GUEST_ERROR in acpi_memory_hotplug_write()

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza MEM_UNPLUG_ERROR is deprecated since the introduction of DEVICE_UNPLUG_GUEST_ERROR. Keep emitting both while the deprecation of MEM_UNPLUG_ERROR is pending. CC: Michael S. Tsirkin CC: Igor Mammedov Acked-by: Michael S. Tsirkin Reviewed-by: Greg Kurz

[PULL 13/44] target/ppc: fix setting of CR flags in bcdcfsq

2021-09-29 Thread David Gibson
From: Luis Pires According to the ISA, CR should be set based on the source value, and not on the packed decimal result. The way this was implemented would cause GT, LT and EQ to be set incorrectly when the source value was too large and the 31 least significant digits of the packed decimal

[PULL 22/44] target/ppc: Replace debug messages by asserts for unknown IRQ pins

2021-09-29 Thread David Gibson
From: Cédric Le Goater If an unknown pin of the IRQ controller is raised, something is very wrong in the QEMU model. It is better to abort. Signed-off-by: Cédric Le Goater Message-Id: <20210920061203.989563-3-...@kaod.org> Signed-off-by: David Gibson --- hw/ppc/ppc.c | 24

[PULL 10/44] ppc/pnv: Rename "id" to "quad-id" in PnvQuad

2021-09-29 Thread David Gibson
From: Cédric Le Goater This to avoid possible conflicts with the "id" property of QOM objects. Signed-off-by: Cédric Le Goater Message-Id: <20210901094153.227671-9-...@kaod.org> Signed-off-by: David Gibson --- hw/ppc/pnv.c | 4 ++-- hw/ppc/pnv_core.c | 4 ++--

[PULL 18/44] qapi/qdev.json: add DEVICE_UNPLUG_GUEST_ERROR QAPI event

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza At this moment we only provide one event to report a hotunplug error, MEM_UNPLUG_ERROR. As of Linux kernel 5.12 and QEMU 6.0.0, the pseries machine is now able to report unplug errors for other device types, such as CPUs. Instead of creating a

[PULL 09/44] ppc/xive: Export xive_tctx_word2() helper

2021-09-29 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Message-Id: <20210901094153.227671-8-...@kaod.org> Signed-off-by: David Gibson --- hw/intc/xive.c| 5 - include/hw/ppc/xive.h | 5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/intc/xive.c

[PULL 07/44] ppc/pnv: Remove useless variable

2021-09-29 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Message-Id: <20210901094153.227671-5-...@kaod.org> Signed-off-by: David Gibson --- hw/ppc/pnv.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 2f5358b70c..a62e90b15e 100644 ---

[PULL 12/44] ppc/pnv: Add an assert when calculating the RAM distribution on chips

2021-09-29 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Message-Id: <20210902130928.528803-3-...@kaod.org> Reviewed-by: Greg Kurz Signed-off-by: David Gibson --- hw/ppc/pnv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 03c86508d2..71e45515f1 100644

[PULL 03/44] host-utils: introduce uabs64()

2021-09-29 Thread David Gibson
From: Luis Pires Introduce uabs64(), a function that returns the absolute value of a 64-bit int as an unsigned value. This avoids the undefined behavior for common abs implementations, where abs of the most negative value is undefined. Signed-off-by: Luis Pires Reviewed-by: Richard Henderson

[PULL 02/44] host-utils: fix missing zero-extension in divs128

2021-09-29 Thread David Gibson
From: Luis Pires *plow (lower 64 bits of the dividend) is passed into divs128() as a signed 64-bit integer. When building an __int128_t from it, it must be zero-extended, instead of sign-extended. Suggested-by: Richard Henderson Signed-off-by: Luis Pires Message-Id:

[PULL 11/44] docs/system: ppc: Update the URL for OpenPOWER firmware images

2021-09-29 Thread David Gibson
From: Cédric Le Goater This also fixes a small skiboot/skiroot typo and removes the links to the specific POWER8 and POWER9 images since the firmware images can be used to run all machines. Signed-off-by: Cédric Le Goater Message-Id: <20210902130928.528803-2-...@kaod.org> Reviewed-by: Greg

[PULL 25/44] spapr_numa.c: split FORM1 code into helpers

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza The upcoming FORM2 NUMA affinity will support asymmetric NUMA topologies and doesn't need be concerned with all the legacy support for older pseries FORM1 guests. We're also not going to calculate associativity domains based on numa distance (via

[PULL 00/44] ppc-for-6.2 queue 20210930

2021-09-29 Thread David Gibson
The following changes since commit 6b54a31bf7b403672a798b6443b1930ae6c74dea: Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into staging (2021-09-28 13:07:32 +0100) are available in the Git repository at: https://gitlab.com/dgibson/qemu.git

[PULL 05/44] ppc/spapr: Add a POWER10 DD2 CPU

2021-09-29 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Message-Id: <20210901094153.227671-3-...@kaod.org> Reviewed-by: Greg Kurz Signed-off-by: David Gibson --- hw/ppc/spapr_cpu_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index

[PULL 04/44] i386/kvm: Replace abs64() with uabs64() from host-utils

2021-09-29 Thread David Gibson
From: Luis Pires Drop abs64() and use uabs64() from host-utils, which avoids an undefined behavior when taking abs of the most negative value. Signed-off-by: Luis Pires Reviewed-by: Richard Henderson Reviewed-by: Eduardo Habkost Message-Id: <20210910112624.72748-5-luis.pi...@eldorado.org.br>

[PULL 01/44] host-utils: Fix overflow detection in divu128()

2021-09-29 Thread David Gibson
From: Luis Pires The previous code didn't detect overflows if the high 64-bit of the dividend were equal to the 64-bit divisor. In that case, 64 bits wouldn't be enough to hold the quotient. Signed-off-by: Luis Pires Reviewed-by: Richard Henderson Message-Id:

TCG Floating Point Support (Work in Progress)

2021-09-29 Thread Matt
Hello-- I'm excited to share that I have been developing support for TCG floating point operations; specifically, to accelerate emulation of x86 guest code which heavily exercises the x87 FPU for a game console emulator project based on QEMU. So far, this work has shown great promise,

Re: [PATCH v5] Prevent vhost-user-blk-test hang

2021-09-29 Thread Raphael Norwitz
On Tue, Sep 28, 2021 at 10:55:00AM +0200, Stefan Hajnoczi wrote: > On Mon, Sep 27, 2021 at 05:17:01PM +, Raphael Norwitz wrote: > > In the vhost-user-blk-test, as of now there is nothing stoping > > vhost-user-blk in QEMU writing to the socket right after forking off the > > storage daemon

[Bug 1945540] Re: Java crashes on s390x VM with SIGILL/ILL_PRVOPC at '__kernel_getcpu+0x8'

2021-09-29 Thread John Neffenger
I just tried the same s390x virtual machine under QEMU version 6.0.0 in the Ubuntu 21.10 Beta release, and the error still occurs. My system information is shown below: $ qemu-system-s390x --version QEMU emulator version 6.0.0 (Debian 1:6.0+dfsg-2expubuntu1) Copyright (c) 2003-2021 Fabrice

[PATCH v9 08/10] vhost: add support for configure interrupt

2021-09-29 Thread Cindy Lu
Add support for configure interrupt in vhost the interrupt will start in vhost_dev_start and stop in vhost_dev_stop Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 76 +++ include/hw/virtio/vhost.h | 4 +++ 2 files changed, 80 insertions(+) diff

[PATCH v9 06/10] virtio: add support for configure interrupt

2021-09-29 Thread Cindy Lu
Add the support for configure interrupt in virtio add notifier_read and set_fd_handler function Signed-off-by: Cindy Lu --- hw/virtio/virtio.c | 29 + include/hw/virtio/virtio.h | 4 2 files changed, 33 insertions(+) diff --git a/hw/virtio/virtio.c

[PATCH v9 05/10] vhost-vdpa: add support for config interrupt call back

2021-09-29 Thread Cindy Lu
Add new call back function in vhost-vdpa, this call back function will set the fb number to hardware. Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 2 ++ hw/virtio/vhost-vdpa.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events

[PATCH v9 10/10] virtio-pci: add support for configure interrupt

2021-09-29 Thread Cindy Lu
Add support for configure interrupt, The process is used kvm_irqfd_assign to set the gsi to kernel. When the configure notifier was signal by host, qemu will inject a msix interrupt to guest Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 88 +-

[PATCH v9 04/10] vhost: add new call back function for config interrupt

2021-09-29 Thread Cindy Lu
To support the config interrupt, we need to add a new call back function for config interrupt. Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h index

[PATCH v9 09/10] virtio-mmio: add support for configure interrupt

2021-09-29 Thread Cindy Lu
Add configure interrupt support for virtio-mmio bus. This interrupt will be working while the backend is vhost-vdpa Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/hw/virtio/virtio-mmio.c

[PATCH v9 03/10] virtio-pci: decouple the single vector from the interrupt process

2021-09-29 Thread Cindy Lu
To reuse the interrupt process in configure interrupt decouple the single vector from the interrupt process. Add new function the kvm_virtio_pci_vector_use_one and _release_one. these functions are use for the single vector, the whole process will finish in a loop for vq number. Signed-off-by:

[PATCH v9 07/10] virtio-net: add support for configure interrupt

2021-09-29 Thread Cindy Lu
Add support for configure interrupt in virtio_net The functions are config_pending and config_mask Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 10 ++ hw/net/virtio-net.c | 6 ++ include/net/vhost_net.h | 3 +++ 3 files changed, 19 insertions(+) diff --git

[PATCH v9 02/10] virtio-pci: decouple notifier from interrupt process

2021-09-29 Thread Cindy Lu
To reuse the notifier process in configure interrupt. Use the virtio_pci_get_notifier function to get the notifier. the INPUT of this function is the IDX, the OUTPUT is notifier and the vector Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 84 +- 1

[PATCH v9 01/10] virtio: introduce macro IRTIO_CONFIG_IRQ_IDX

2021-09-29 Thread Cindy Lu
To support configure interrupt for vhost-vdpa introduce VIRTIO_CONFIG_IRQ_IDX -1 as config queue index, Then we can reuse the function guest_notifier_mask and guest_notifier_pending. Add the check of queue index, if the driver does not support configure interrupt, the function will just return

[PATCH v9 00/10] vhost-vdpa: add support for configure interrupt

2021-09-29 Thread Cindy Lu
these patches add the support for configure interrupt These codes are all tested in vp-vdpa (support configure interrupt) vdpa_sim (not support configure interrupt), virtio tap device test in virtio-pci bus and virtio-mmio bus Change in v2: Add support for virtio-mmio bus active the notifier

Rust in Qemu BoF followup 2: Rust toolchain availability

2021-09-29 Thread David Gibson
Hi again all, I've now done.. or at least started... the second part of my followup from the KVM Forum BoF on Rust in Qemu. I've extended the page at https://wiki.qemu.org/RustInQemu with information on Rust toolchain availability. However, I found I had a lot more open questions on this one,

Re: [PATCH] virtio-net : Add check for VIRTIO_NET_F_MAC

2021-09-29 Thread Cindy Lu
On Wed, Sep 29, 2021 at 9:36 PM Michael S. Tsirkin wrote: > > On Wed, Sep 29, 2021 at 08:08:40PM +0800, Cindy Lu wrote: > > On Wed, Sep 29, 2021 at 6:07 PM Michael Tokarev wrote: > > > > > > 29.09.2021 09:52, Cindy Lu wrote: > > > > For vdpa device, if the host support VIRTIO_NET_F_MAC > > > >

Re: [PATCH v3 0/7] Reduce load on ppc target maintainers

2021-09-29 Thread David Gibson
On Mon, Sep 27, 2021 at 02:48:01PM +1000, David Gibson wrote: > Greg Kurz and myself have been co-maintainers for the ppc and ppc64 > targets for some time now. However, both our day job responsibilities > and interests are leading us towards other areas, so we have less time > to devote to this

Re: [PATCH v12 00/16] machine: smp parsing fixes and improvement

2021-09-29 Thread wangyanan (Y)
On 2021/9/29 22:57, Paolo Bonzini wrote: On 29/09/21 16:46, Markus Armbruster wrote: Paolo Bonzini writes: On 29/09/21 04:58, Yanan Wang wrote: Hi, This is a new version (v12) with minor update suggested by Daniel and Philippe. Two new commits (#1 and #16) are added. Thanks! Queued,

Re: QAPI sync meeting

2021-09-29 Thread John Snow
On Wed, Sep 29, 2021 at 8:18 AM Markus Armbruster wrote: > John Snow writes: > > > On Tue, Sep 28, 2021 at 9:53 AM Daniel P. Berrangé > > wrote: > > > >> On Mon, Sep 27, 2021 at 12:55:34PM -0400, John Snow wrote: > > [...] > > >> > - Any weekday after 13:00 UTC. Wednesdays, Thursdays and

Re: [PATCH 0/1] hw: aspeed_gpio: Fix GPIO array indexing

2021-09-29 Thread Peter Delevoryas
> On Sep 27, 2021, at 8:43 PM, p...@fb.com wrote: > > From: Peter Delevoryas > > Hey everyone, > > I think there might be a bug in aspeed_gpio_update, where it's selecting > a GPIO IRQ to update. The indexing that maps from GPIO pin to IRQ leads > to an out-of-bounds array access and a

Re: [PATCH 1/1] hw: aspeed_gpio: Fix pin I/O type declarations

2021-09-29 Thread Peter Delevoryas
> On Sep 28, 2021, at 3:53 AM, Damien Hedde wrote: > > > > On 9/28/21 05:24, p...@fb.com wrote: >> From: Peter Delevoryas >> Some of the pin declarations in the Aspeed GPIO module were incorrect, >> probably because of confusion over which bits in the input and output >> uint32_t's

[RFC PATCH 0/1] hw: aspeed_adc: Add initial Aspeed ADC support

2021-09-29 Thread pdel
From: Peter Delevoryas Hey everyone, This patch mostly just does the basic, boilerplate setup for the ADC, so that we can start adding more ADC feature emulation in the future. The only device behavior that I tried to add was emulating the control initialization sequence and the sequence for

[RFC PATCH 1/1] hw: aspeed_adc: Add initial Aspeed ADC support

2021-09-29 Thread pdel
From: Peter Delevoryas This change sets up Aspeed SoC ADC emulation, so that most ADC drivers will pass the initialization sequence and load successfully. In the future, we can extend this to emulate more features. The initialization sequence is: 1. Set `ADC00` to `0xF`. 2. Wait for

Re: QAPI sync meeting

2021-09-29 Thread John Snow
On Wed, Sep 29, 2021 at 9:52 AM Damien Hedde wrote: > > > On 9/27/21 18:55, John Snow wrote: > > Hiya, > > > > I'd like to propose that at least the three of us arrange a time to have > > a meeting where we discuss our plans and ideas for QAPI going forward, > > including rust, python, and

Re: [PATCH 0/4] qemu-img compare --stat

2021-09-29 Thread John Snow
On Wed, Sep 29, 2021 at 9:34 AM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > Hi all! > > Recently we faced the following task: > > Customer comes and say: incremental backup images are too fat. Does you > incremental backup works correct? > > What to answer? We should check

[Bug 1945540] Re: Java crashes on s390x VM with SIGILL/ILL_PRVOPC at '__kernel_getcpu+0x8'

2021-09-29 Thread John Neffenger
** Attachment added: "the log file resulting from 'java --version'" https://bugs.launchpad.net/qemu/+bug/1945540/+attachment/5529211/+files/hs_err_pid6789.log -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Bug 1945540] [NEW] Java crashes on s390x VM with SIGILL/ILL_PRVOPC at '__kernel_getcpu+0x8'

2021-09-29 Thread John Neffenger
Public bug reported: Host environment - Operating system: Ubuntu 20.04.3 LTS Desktop - OS/kernel version: Linux tower 5.11.0-37-generic #41~20.04.2-Ubuntu SMP Fri Sep 24 09:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux - Architecture: amd64 - QEMU flavor: qemu-system-s390x - QEMU version:

Re: [PATCH v2 1/1] hw/riscv: shakti_c: Mark as not user creatable

2021-09-29 Thread Alistair Francis
On Wed, Sep 29, 2021 at 7:47 PM Bin Meng wrote: > > On Wed, Sep 29, 2021 at 7:30 AM Alistair Francis > wrote: > > > > From: Alistair Francis > > > > Mark the shakti_c machine as not user creatable. > > > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/639 > > Signed-off-by: Alistair

RE: virtio-gpu: Get FD for texture

2021-09-29 Thread Kasireddy, Vivek
Hi Antonio, > > I am starting to believe that the error is due to the fact that no EGLContext > is active on the > current thread (the one running the Vulkan application). [Kasireddy, Vivek] Which UI module (and Host environment) are you testing with? gtk? egl-headless? Could you please provide

[PATCH qemu v2] QEMU coding style mandates spaces for indentation. This change replaces TABs in hw/ide/ and include/hw/ide.

2021-09-29 Thread ~farzon
From: Farzon Lotfi Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371 Signed-off-by: Farzon Lotfi --- hw/ide/cmd646.c | 28 +-- hw/ide/core.c | 84 - hw/ide/microdrive.c | 360 +++--- include/hw/ide/internal.h |

[PATCH qemu v2] QEMU coding style mandates spaces for indentation. This change replaces TABs in hw/block/ and include/hw/block.

2021-09-29 Thread ~farzon
From: Farzon Lotfi Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371 Signed-off-by: Farzon Lotfi --- hw/block/fdc.c | 4 +- hw/block/nand.c | 212 +++ hw/block/onenand.c | 126 +++ hw/block/tc58128.c

[PATCH qemu v2] QEMU coding style mandates spaces for indentation. This change replaces TABs in block files.

2021-09-29 Thread ~farzon
From: Farzon Lotfi Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371 Signed-off-by: Farzon Lotfi --- block/bochs.c | 10 +- block/file-posix.c | 8 block/file-win32.c | 20 ++-- block/parallels.c | 10 +- block/qcow.c| 10

Re: [PATCH v3] target/i386: Include 'hw/i386/apic.h' locally

2021-09-29 Thread Michael S. Tsirkin
On Wed, Sep 29, 2021 at 06:31:24PM +0200, Philippe Mathieu-Daudé wrote: > Instead of including a sysemu-specific header in "cpu.h" > (which is shared with user-mode emulations), include it > locally when required. > > Acked-by: Paolo Bonzini > Signed-off-by: Philippe Mathieu-Daudé Acked-by:

Re: [PULL 1/5] hw/pcie-root-port: Fix hotplug for PCI devices requiring IO

2021-09-29 Thread Michael S. Tsirkin
On Wed, Sep 29, 2021 at 04:41:49PM +0300, Marcel Apfelbaum wrote: > Hi Michael, > > On Mon, Sep 27, 2021 at 12:49 PM Michael S. Tsirkin wrote: > > On Mon, Sep 27, 2021 at 10:33:42AM +0100, Daniel P. Berrangé wrote: > > On Tue, Aug 03, 2021 at 04:52:03PM -0400, Michael S. Tsirkin wrote:

Re: [RFC 0/1] hw/ipmi: add an aspeed IPMI iBT device model

2021-09-29 Thread Titus Rwantare
On Tue, 28 Sept 2021 at 23:24, Cédric Le Goater wrote: > > Hello Titus, > > On 9/29/21 00:39, Titus Rwantare wrote: > > This patch follows the Handing IPMI for emulating BMC patch set by Hao Wu. > > Building on top of the work in [PATCH] hw/misc: Add an iBT device model > > posted > > by Cédric

[PULL v2 00/19] NBD patches through 2021-09-27

2021-09-29 Thread Eric Blake
The following changes since commit 6b54a31bf7b403672a798b6443b1930ae6c74dea: Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into staging (2021-09-28 13:07:32 +0100) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git

Re: [PULL 00/33] x86 and misc changes for 2021-09-28

2021-09-29 Thread Peter Maydell
On Tue, 28 Sept 2021 at 14:04, Paolo Bonzini wrote: > > The following changes since commit 14f02d8a9ec1746823c106933a4c8f062f9e0f95: > > Merge remote-tracking branch > 'remotes/philmd/tags/integration-testing-20210927' into staging (2021-09-27 > 19:52:43 +0100) > > are available in the Git

Re: [PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush

2021-09-29 Thread Peter Xu
On Wed, Sep 29, 2021 at 04:36:10PM -0300, Leonardo Bras Soares Passos wrote: > On Tue, Sep 28, 2021 at 7:45 PM Peter Xu wrote: > > > > On Wed, Sep 22, 2021 at 07:24:22PM -0300, Leonardo Bras wrote: > > > +static void qio_channel_socket_async_flush(QIOChannel *ioc, > > > +

Re: [PATCH v3 0/3] QIOChannel async_write & async_flush + MSG_ZEROCOPY + multifd

2021-09-29 Thread Leonardo Bras Soares Passos
On Wed, Sep 29, 2021 at 4:23 PM Peter Xu wrote: > > On Wed, Sep 29, 2021 at 03:34:01PM -0300, Leonardo Bras Soares Passos wrote: > > You mean like I did in pre-V1, enabling ZEROCOPY for multifd it in QMP? > > Or is this something else? > > I mean any way to still be able to turn zerocopy off?

Re: [PATCH v3 3/3] multifd: Send using asynchronous write on nocomp to send RAM pages.

2021-09-29 Thread Leonardo Bras Soares Passos
On Tue, Sep 28, 2021 at 7:49 PM Peter Xu wrote: > > On Fri, Sep 24, 2021 at 06:43:49PM +0100, Daniel P. Berrangé wrote: > > > @@ -546,6 +546,7 @@ void multifd_save_cleanup(void) > > > MultiFDSendParams *p = _send_state->params[i]; > > > Error *local_err = NULL; > > > > > > +

[PATCH v3 09/13] qapi/parser: add import cycle workaround

2021-09-29 Thread John Snow
There is a cycle that exists in the QAPI generator: [schema -> expr -> parser -> schema]. It exists because the QAPIDoc class needs the names of types defined by the schema module, but the schema module needs to import both expr.py/parser.py to do its actual parsing. Ultimately, the layering

[PATCH v3 11/13] qapi/parser: enable mypy checks

2021-09-29 Thread John Snow
Signed-off-by: John Snow --- As always, this can be merged with the previous commit. Signed-off-by: John Snow --- scripts/qapi/mypy.ini | 5 - 1 file changed, 5 deletions(-) diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index 54ca4483d6d..66253564297 100644 ---

[PATCH v3 13/13] qapi/parser: enable pylint checks

2021-09-29 Thread John Snow
Signed-off-by: John Snow --- This can be merged with the previous commit, if desired. Signed-off-by: John Snow --- scripts/qapi/pylintrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc index 5b7dbc58ad8..b259531a726 100644

[PATCH v3 05/13] qapi/parser: improve detection of '@symbol:' preface

2021-09-29 Thread John Snow
Leading and trailing whitespace are now discarded, addressing the FIXME comment. A new error is raised to detect this accidental case. Parsing for args sections is left alone here; the 'name' variable is moved into the only block where it is used. Signed-off-by: John Snow --- Tangentially

[PATCH v3 08/13] qapi/parser: Introduce NullSection

2021-09-29 Thread John Snow
Here's the weird bit. QAPIDoc generally expects -- virtually everywhere -- that it will always have a current section. The sole exception to this is in the case that end_comment() is called, which leaves us with *no* section. However, in this case, we also don't expect to actually ever mutate the

[PATCH v3 12/13] qapi/parser: Silence too-few-public-methods warning

2021-09-29 Thread John Snow
Eh. Not worth the fuss today. There are bigger fish to fry. Signed-off-by: John Snow --- scripts/qapi/parser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index 8a846079207..7511eedaa35 100644 --- a/scripts/qapi/parser.py +++

[PATCH v3 07/13] qapi/parser: Simplify _end_section()

2021-09-29 Thread John Snow
The "if self._section" clause in end_section is mysterious: In which circumstances might we end a section when we don't have one? QAPIDoc always expects there to be a "current section", only except after a call to end_comment(). This actually *shouldn't* ever be 'None', so let's remove that logic

[PATCH v3 04/13] qapi: Add spaces after symbol declaration for consistency

2021-09-29 Thread John Snow
Several QGA definitions omit a blank line after the symbol declaration. This works OK currently, but it's the only place where we do this. Adjust it for consistency. Future commits may wind up enforcing this formatting. Signed-off-by: John Snow --- This isn't strictly necessary and I don't

[PATCH v3 10/13] qapi/parser: add type hint annotations (QAPIDoc)

2021-09-29 Thread John Snow
Annotations do not change runtime behavior. This commit consists of only annotations. Signed-off-by: John Snow --- scripts/qapi/parser.py | 67 -- 1 file changed, 39 insertions(+), 28 deletions(-) diff --git a/scripts/qapi/parser.py

[PATCH v3 02/13] qapi/gen: use dict.items() to iterate over _modules

2021-09-29 Thread John Snow
New pylint warning. I could silence it, but this is the only occurrence in the entire tree, including everything in iotests/ and python/. Easier to just change this one instance. (The warning is emitted in cases where you are fetching the values anyway, so you may as well just take advantage of

[PATCH v3 03/13] qapi/parser: fix unused check_args_section arguments

2021-09-29 Thread John Snow
Pylint informs us we're not using these arguments. Oops, it's right. Correct the error message and remove the remaining unused parameter. Fix test output now that the error message is improved. Fixes: e151941d1b Signed-off-by: John Snow --- scripts/qapi/parser.py| 16

[PATCH v3 06/13] qapi/parser: remove FIXME comment from _append_body_line

2021-09-29 Thread John Snow
True, we do not check the validity of this symbol -- but we don't check the validity of definition names during parse, either -- that happens later, during the expr check. I don't want to introduce a dependency on expr.py:check_name_str here and introduce a cycle. Instead, rest assured that a

Re: [PATCH] hw/arm/virt: Allow additions to the generated device tree

2021-09-29 Thread Andrew Jones
On Wed, Sep 29, 2021 at 09:09:59AM -0600, Simon Glass wrote: > Hi Peter, > > On Wed, 29 Sept 2021 at 03:10, Peter Maydell wrote: > > > > On Wed, 29 Sept 2021 at 04:01, Simon Glass wrote: > > > On Tue, 28 Sept 2021 at 03:21, Peter Maydell > > > wrote: > > > > So what *is* this patch doing? The

[PATCH v3 01/13] qapi/pylintrc: ignore 'consider-using-f-string' warning

2021-09-29 Thread John Snow
Pylint 2.11.x adds this warning. We're not yet ready to pursue that conversion, so silence it for now. Signed-off-by: John Snow --- scripts/qapi/pylintrc | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc index c5275d5f59b..5b7dbc58ad8 100644 ---

[PATCH v3 00/13] qapi: static typing conversion, pt5b

2021-09-29 Thread John Snow
Hello darkness my old friend; This is part five (b), and focuses on QAPIDoc in parser.py. GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-qapi-cleanup-pt5b CI: https://gitlab.com/jsnow/qemu/-/pipelines/379678153 Note: intentional trailing whitespace in a QAPI schema test causes a

Re: [PATCH v3 3/3] multifd: Send using asynchronous write on nocomp to send RAM pages.

2021-09-29 Thread Leonardo Bras Soares Passos
On Fri, Sep 24, 2021 at 2:44 PM Daniel P. Berrangé wrote: > > On Wed, Sep 22, 2021 at 07:24:23PM -0300, Leonardo Bras wrote: > > Change multifd nocomp version to use asynchronous write for RAM pages, and > > benefit of MSG_ZEROCOPY when it's available. > > > > The asynchronous flush happens on

Re: [PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush

2021-09-29 Thread Leonardo Bras Soares Passos
On Tue, Sep 28, 2021 at 7:45 PM Peter Xu wrote: > > On Wed, Sep 22, 2021 at 07:24:22PM -0300, Leonardo Bras wrote: > > +static void qio_channel_socket_async_flush(QIOChannel *ioc, > > + Error **errp) > > +{ > > +QIOChannelSocket *sioc =

Re: [PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush

2021-09-29 Thread Leonardo Bras Soares Passos
Hello Daniel, On Fri, Sep 24, 2021 at 2:38 PM Daniel P. Berrangé wrote: [...] > > @@ -154,6 +171,19 @@ int qio_channel_socket_connect_sync(QIOChannelSocket > > *ioc, > > return -1; > > } > > > > +#ifdef CONFIG_LINUX > > +if (addr->type != SOCKET_ADDRESS_TYPE_INET) { > > +

Re: [PATCH v3 0/3] QIOChannel async_write & async_flush + MSG_ZEROCOPY + multifd

2021-09-29 Thread Peter Xu
On Wed, Sep 29, 2021 at 03:34:01PM -0300, Leonardo Bras Soares Passos wrote: > You mean like I did in pre-V1, enabling ZEROCOPY for multifd it in QMP? > Or is this something else? I mean any way to still be able to turn zerocopy off? E.g. when the user has no privilege on mlock. Thanks, --

Re: [PULL 00/20] NBD patches through 2021-09-27

2021-09-29 Thread Richard W.M. Jones
On Wed, Sep 29, 2021 at 01:29:21PM -0500, Eric Blake wrote: > On Wed, Sep 29, 2021 at 05:03:08PM +0200, Paolo Bonzini wrote: > > On 29/09/21 15:58, Richard Henderson wrote: > > > > > > > /usr/bin/ld: /usr/lib64/libselinux.so: error adding symbols: file > > > in > > > > wrong format > >

Re: [PATCH v3 1/3] QIOChannel: Add io_async_writev & io_async_flush callbacks

2021-09-29 Thread Leonardo Bras Soares Passos
Hello Peter, thanks for reviewing! On Tue, Sep 28, 2021 at 6:52 PM Peter Xu wrote: > > On Fri, Sep 24, 2021 at 06:16:04PM +0100, Daniel P. Berrangé wrote: > > > +ssize_t qio_channel_async_writev(QIOChannel *ioc, > > > + const struct iovec *iov, > > > +

Re: [PATCH v3 1/3] QIOChannel: Add io_async_writev & io_async_flush callbacks

2021-09-29 Thread Leonardo Bras Soares Passos
Hello Daniel, thank you for reviewing! On Fri, Sep 24, 2021 at 2:16 PM Daniel P. Berrangé wrote: > > On Wed, Sep 22, 2021 at 07:24:21PM -0300, Leonardo Bras wrote: > > Adds io_async_writev and io_async_flush as optional callback to > > QIOChannelClass, > > allowing the implementation of

Re: [PATCH v3 0/3] QIOChannel async_write & async_flush + MSG_ZEROCOPY + multifd

2021-09-29 Thread Leonardo Bras Soares Passos
Hello Peter, On Tue, Sep 28, 2021 at 7:51 PM Peter Xu wrote: > > On Wed, Sep 22, 2021 at 07:24:20PM -0300, Leonardo Bras wrote: > > This patch series intends to enable MSG_ZEROCOPY in QIOChannel, and make > > use of it for multifd migration performance improvement. > > > > Patch #1 creates new

Re: [PULL 00/20] NBD patches through 2021-09-27

2021-09-29 Thread Eric Blake
On Wed, Sep 29, 2021 at 05:03:08PM +0200, Paolo Bonzini wrote: > On 29/09/21 15:58, Richard Henderson wrote: > > > > > /usr/bin/ld: /usr/lib64/libselinux.so: error adding symbols: file in > > > wrong format > > > collect2: error: ld returned 1 exit status > > > > Missing

Re: [PATCH v2 1/5] qemu/qarray.h: introduce QArray

2021-09-29 Thread Daniel P . Berrangé
On Wed, Sep 29, 2021 at 07:32:39PM +0200, Christian Schoenebeck wrote: > On Dienstag, 28. September 2021 18:41:17 CEST Daniel P. Berrangé wrote: > > On Tue, Sep 28, 2021 at 06:23:23PM +0200, Christian Schoenebeck wrote: > > > On Dienstag, 28. September 2021 15:04:36 CEST Daniel P. Berrangé wrote:

Re: [PATCH v2 1/5] qemu/qarray.h: introduce QArray

2021-09-29 Thread Christian Schoenebeck
On Dienstag, 28. September 2021 18:41:17 CEST Daniel P. Berrangé wrote: > On Tue, Sep 28, 2021 at 06:23:23PM +0200, Christian Schoenebeck wrote: > > On Dienstag, 28. September 2021 15:04:36 CEST Daniel P. Berrangé wrote: > > > On Sun, Aug 22, 2021 at 03:16:46PM +0200, Christian Schoenebeck wrote:

Re: [PATCH] configure, meson: move CPU_CFLAGS out of QEMU_CFLAGS

2021-09-29 Thread Philippe Mathieu-Daudé
On 9/29/21 17:18, Paolo Bonzini wrote: > Flags that choose the target architecture, such as -m32 on x86, affect > all invocations of the compiler driver, for example including options > such as --print-search-dirs. To ensure that they are treated as such, > place them in the cross file in the

Re: [PATCH v6 13/30] tcg/loongarch64: Implement deposit/extract ops

2021-09-29 Thread Philippe Mathieu-Daudé
On 9/25/21 19:30, WANG Xuerui wrote: > Signed-off-by: WANG Xuerui > Reviewed-by: Richard Henderson > --- > tcg/loongarch64/tcg-target-con-set.h | 1 + > tcg/loongarch64/tcg-target.c.inc | 21 + > tcg/loongarch64/tcg-target.h | 8 > 3 files changed, 26

Re: [PATCH v3] target/i386: Include 'hw/i386/apic.h' locally

2021-09-29 Thread Philippe Mathieu-Daudé
On 9/29/21 18:51, Laurent Vivier wrote: > Le 29/09/2021 à 18:31, Philippe Mathieu-Daudé a écrit : >> Instead of including a sysemu-specific header in "cpu.h" >> (which is shared with user-mode emulations), include it >> locally when required. >> >> Acked-by: Paolo Bonzini >> Signed-off-by:

Re: [PATCH v6 10/30] tcg/loongarch64: Implement goto_ptr

2021-09-29 Thread Philippe Mathieu-Daudé
On 9/25/21 19:30, WANG Xuerui wrote: > Signed-off-by: WANG Xuerui > Reviewed-by: Richard Henderson > --- > tcg/loongarch64/tcg-target-con-set.h | 17 + > tcg/loongarch64/tcg-target.c.inc | 15 +++ > 2 files changed, 32 insertions(+) > create mode 100644

Re: [PATCH v6 26/30] tcg/loongarch64: Implement tcg_target_init

2021-09-29 Thread Philippe Mathieu-Daudé
On 9/27/21 01:07, Richard Henderson wrote: > On 9/26/21 3:15 AM, Philippe Mathieu-Daudé wrote: >> On 9/25/21 19:30, WANG Xuerui wrote: >>> Signed-off-by: WANG Xuerui >>> Reviewed-by: Richard Henderson >>> --- >>>   tcg/loongarch64/tcg-target.c.inc | 27 +++ >>>   1 file

Re: [PATCH 0/6] virtio-iommu: Add ACPI support

2021-09-29 Thread Jean-Philippe Brucker
On Wed, Sep 29, 2021 at 11:18:39AM +0200, Eric Auger wrote: > > I've been postponing the boot-bypass patch since it requires a > > specification change to be done right, but it's next on my list. > The boot-bypass feature seems a critical feature to overcome the current > v3 limitation. Are there

Re: [PATCH v6 26/30] tcg/loongarch64: Implement tcg_target_init

2021-09-29 Thread WANG Xuerui
Hi Richard, On 9/27/21 07:07, Richard Henderson wrote: On 9/26/21 3:15 AM, Philippe Mathieu-Daudé wrote: On 9/25/21 19:30, WANG Xuerui wrote: Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson ---   tcg/loongarch64/tcg-target.c.inc | 27 +++   1 file changed,

Re: gitlab-ci: amd64-opensuse-leap-container job failing

2021-09-29 Thread Daniel P . Berrangé
On Mon, Sep 27, 2021 at 09:35:22AM +0100, Daniel P. Berrangé wrote: > On Sun, Sep 26, 2021 at 07:23:56PM +0200, Philippe Mathieu-Daudé wrote: > > Hi, > > > > FYI the OpenSUSE job is failing since few days, i.e.: > > https://gitlab.com/qemu-project/qemu/-/jobs/1622345026 > > > > Retrieving

Re: [PATCH v3] target/i386: Include 'hw/i386/apic.h' locally

2021-09-29 Thread Laurent Vivier
Le 29/09/2021 à 18:31, Philippe Mathieu-Daudé a écrit : > Instead of including a sysemu-specific header in "cpu.h" > (which is shared with user-mode emulations), include it > locally when required. > > Acked-by: Paolo Bonzini > Signed-off-by: Philippe Mathieu-Daudé > --- > target/i386/cpu.h

Re: [PATCH 3/4] qemu-img: add --shallow option for qemu-img compare --stat

2021-09-29 Thread Nir Soffer
On Wed, Sep 29, 2021 at 7:28 PM Vladimir Sementsov-Ogievskiy wrote: > > 29.09.2021 19:00, Nir Soffer wrote: > > On Wed, Sep 29, 2021 at 4:37 PM Vladimir Sementsov-Ogievskiy > > wrote: > >> > >> Allow compare only top images of backing chains. That's useful for > >> comparing two increments from

Re: [PATCH v2 2/3] hw/mips/boston: Allow loading elf kernel and dtb

2021-09-29 Thread Jiaxun Yang
在 2021/9/29 16:36, BALATON Zoltan 写道: On Wed, 29 Sep 2021, Jiaxun Yang wrote: ELF kernel allows us debugging much easier with DWARF symbols. Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé -- v2: Use g_autofree --- hw/mips/boston.c | 36

Re: [PATCH v2 1/3] hw/mips/boston: Massage memory map information

2021-09-29 Thread Jiaxun Yang
在 2021/9/29 16:32, BALATON Zoltan 写道: On Wed, 29 Sep 2021, Jiaxun Yang wrote: Use memmap array to uinfy address of memory map. That would allow us reuse address information for FDT generation. Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé -- v2: Fix minor style issue, fix

Re: [PATCH] target/i386: Include 'hw/i386/apic.h' locally

2021-09-29 Thread Philippe Mathieu-Daudé
On 9/29/21 18:23, Laurent Vivier wrote: > Le 29/09/2021 à 18:06, Philippe Mathieu-Daudé a écrit : >> On 9/29/21 17:16, Laurent Vivier wrote: >>> Le 29/09/2021 à 17:00, Laurent Vivier a écrit : Le 29/09/2021 à 16:08, Philippe Mathieu-Daudé a écrit : > On 9/16/21 00:05, Paolo Bonzini wrote:

[PATCH v3] target/i386: Include 'hw/i386/apic.h' locally

2021-09-29 Thread Philippe Mathieu-Daudé
Instead of including a sysemu-specific header in "cpu.h" (which is shared with user-mode emulations), include it locally when required. Acked-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- target/i386/cpu.h| 4 hw/i386/kvmvapic.c | 1 +

[PATCH v3 2/3] qapi: Include qom-path in MEMORY_DEVICE_SIZE_CHANGE qapi events

2021-09-29 Thread David Hildenbrand
As we might not always have a device id, it is impossible to always match MEMORY_DEVICE_SIZE_CHANGE events to an actual device. Let's include the qom-path in the event, which allows for reliable mapping of events to devices. Fixes: 722a3c783ef4 ("virtio-pci: Send qapi events when the virtio-mem

Re: [PATCH v2] target/i386: Include 'hw/i386/apic.h' locally

2021-09-29 Thread Philippe Mathieu-Daudé
On 9/29/21 18:25, Philippe Mathieu-Daudé wrote: > Instead of including a sysemu-specific header in "cpu.h" > (which is shared with user-mode emulations), include it > locally when required. > > Acked-by: Paolo Bonzini > Signed-off-by: Philippe Mathieu-Daudé > --- > target/i386/cpu.h

[PATCH v3 3/3] monitor: Rate-limit MEMORY_DEVICE_SIZE_CHANGE qapi events per device

2021-09-29 Thread David Hildenbrand
We want to rate-limit MEMORY_DEVICE_SIZE_CHANGE events per device, otherwise we can lose some events for devices. We can now use the qom-path to reliably map an event to a device and make rate-limiting device-aware. This was noticed by starting a VM with two virtio-mem devices that each have a

Re: [PATCH 3/4] qemu-img: add --shallow option for qemu-img compare --stat

2021-09-29 Thread Vladimir Sementsov-Ogievskiy
29.09.2021 19:00, Nir Soffer wrote: On Wed, Sep 29, 2021 at 4:37 PM Vladimir Sementsov-Ogievskiy wrote: Allow compare only top images of backing chains. That's useful for comparing two increments from the same chain of incremental backups. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

  1   2   3   >