[PATCH v5 03/36] qapi-gen: Separate arg-parsing from generation

2020-10-05 Thread John Snow
This is a minor re-work of the entrypoint script. It isolates a generate() method from the actual command-line mechanism. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- scripts/qapi-gen.py | 85

[PATCH v3] scripts: Convert qemu-version.sh to qemu-version.py

2020-10-05 Thread Yonggang Luo
The sh script are harder to maintain for compatible different xsh environment so convert it to python script Also incorporate the fixes in https://patchew.org/QEMU/20200929143654.518157-1-marcandre.lur...@redhat.com/ Testing args length and if not enough, setting pkgversion and version to ''

[PATCH v5 04/36] qapi: move generator entrypoint into module

2020-10-05 Thread John Snow
As part of delinting and adding type hints to the QAPI generator, it's helpful for the entrypoint to be part of the package, only leaving a very tiny entrypoint shim outside of the module. Signed-off-by: John Snow Reviewed-by: Eduardo Habkost Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa

[PATCH v5 07/36] qapi: enforce import order/styling with isort

2020-10-05 Thread John Snow
While we're mucking around with imports, we might as well formalize the style we use. Let's use isort to do it for us. lines_after_imports=2: Use two lines after imports, to match PEP8's desire to have "two lines before and after" class definitions, which are likely to start immediately after

Re: [PATCH 10/14] hw/misc/bcm2835_cprman: implement clock mux behaviour

2020-10-05 Thread Luc Michel
On 20:37 Sun 04 Oct , Luc Michel wrote: > On 16:51 Fri 02 Oct , Philippe Mathieu-Daudé wrote: > > On 9/26/20 11:40 PM, Philippe Mathieu-Daudé wrote: > > > On 9/25/20 12:17 PM, Luc Michel wrote: > > >> A clock mux can be configured to select one of its 10 sources through > > >> the cm_ctl

[PATCH] docs/devel/clocks: Include API reference using kernel-doc

2020-10-05 Thread Eduardo Habkost
Use kernel-doc to include clock API reference in docs/devel/clocks.html. A few small change had to be made in clock.h and qdev-clock.h to use the kernel-doc syntax. Signed-off-by: Eduardo Habkost --- docs/devel/clocks.rst | 7 +++ include/hw/clock.h | 4 ++--

Re: [RFC PATCH] contrib/gitdm: Add more individual contributors

2020-10-05 Thread Volker Rümelin
> To the developers Cc'ed: If you agree with your entry, please > reply with a Reviewed-by/Acked-by tag. If you disagree or doesn't > care, please either reply with Nack-by or ignore this patch. > I'll repost in 2 weeks as formal patch (not RFC) with only the > entries acked by their author. > ---

Re: [PATCH v2] scripts: Convert qemu-version.sh to qemu-version.py

2020-10-05 Thread Peter Maydell
On Mon, 5 Oct 2020 at 18:24, Yonggang Luo wrote: > > The sh script are harder to maintain for compatible different > xsh environment > > Signed-off-by: Yonggang Luo > --- > meson.build | 2 +- > scripts/qemu-version.py | 30 ++ > scripts/qemu-version.sh

Re: [PATCH 01/16] hw/core/cpu: Let CPU object have a clock source

2020-10-05 Thread Eduardo Habkost
On Mon, Oct 05, 2020 at 08:29:24PM +0200, Philippe Mathieu-Daudé wrote: > On 10/5/20 8:09 PM, Philippe Mathieu-Daudé wrote: > > On 10/5/20 7:44 PM, Eduardo Habkost wrote: > >> On Mon, Oct 05, 2020 at 06:40:09PM +0200, Igor Mammedov wrote: > >>> On Wed, 30 Sep 2020 12:16:53 +0200 > >>> Philippe

Re: [RFC PATCH 06/21] contrib/gitdm: Add Google to the domain map

2020-10-05 Thread Erik Kline
LGTM Acked-by: Erik Kline On Sun, Oct 4, 2020 at 11:04 AM Philippe Mathieu-Daudé wrote: > > There is a number of contributors from this domain, > add its own entry to the gitdm domain map. > > Cc: Andrew Oates > Cc: Catalin Patulea > Cc: Christian Svensson > Cc: David 'Digit' Turner > Cc:

[PATCH v10 19/19] multi-process: add configure and usage information

2020-10-05 Thread elena . ufimtseva
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- MAINTAINERS| 2 ++ docs/multi-process.rst | 67 ++ scripts/mpqemu-launcher.py | 49

[PATCH v10 18/19] multi-process: add the concept description to docs/devel/qemu-multiprocess

2020-10-05 Thread elena . ufimtseva
From: John G Johnson Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- MAINTAINERS | 1 + docs/devel/index.rst | 1 + docs/devel/multi-process.rst | 966

[PATCH v10 13/19] multi-process: PCI BAR read/write handling for proxy & remote endpoints

2020-10-05 Thread elena . ufimtseva
From: Jagannathan Raman Proxy device object implements handler for PCI BAR writes and reads. The handler uses BAR_WRITE/BAR_READ message to communicate to the remote process with the BAR address and value to be written/read. The remote process implements handler for BAR_WRITE/BAR_READ message.

[PATCH v10 00/19] Initial support for multi-process Qemu

2020-10-05 Thread elena . ufimtseva
From: Elena Ufimtseva From: Elena Ufimtseva Hello This is the v10 of the patchset. Thank you very much for the review of the v9 of the series. We are glad to hear the patchset is getting in a better shape. There are few patches that were changed and need the review: Drooped patch 07/20 from

[PATCH v10 04/19] multi-process: setup a machine object for remote device process

2020-10-05 Thread elena . ufimtseva
From: Jagannathan Raman remote-machine object sets up various subsystems of the remote device process. Instantiate PCI host bridge object and initialize RAM, IO & PCI memory regions. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Reviewed-by:

[PATCH v10 10/19] multi-process: introduce proxy object

2020-10-05 Thread elena . ufimtseva
From: Elena Ufimtseva Defines a PCI Device proxy object as a child of TYPE_PCI_DEVICE. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson --- MAINTAINERS| 2 + hw/pci/meson.build | 1 + hw/pci/proxy.c | 94

[PATCH v10 15/19] multi-process: create IOHUB object to handle irq

2020-10-05 Thread elena . ufimtseva
From: Jagannathan Raman IOHUB object is added to manage PCI IRQs. It uses KVM_IRQFD ioctl to create irqfd to injecting PCI interrupts to the guest. IOHUB object forwards the irqfd to the remote process. Remote process uses this fd to directly send interrupts to the guest, bypassing QEMU.

[PATCH v10 07/19] multi-process: Initialize message handler in remote device

2020-10-05 Thread elena . ufimtseva
From: Jagannathan Raman Initializes the message handler function in the remote process. It is called whenever there's an event pending on QIOChannel that registers this function. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- MAINTAINERS

[PATCH v10 17/19] multi-process: perform device reset in the remote process

2020-10-05 Thread elena . ufimtseva
From: Elena Ufimtseva Perform device reset in the remote process when QEMU performs device reset. This is required to reset the internal state (like registers, etc...) of emulated devices Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman

[PATCH v10 16/19] multi-process: Retrieve PCI info from remote process

2020-10-05 Thread elena . ufimtseva
From: Jagannathan Raman Retrieve PCI configuration info about the remote device and configure the Proxy PCI object based on the returned information Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/pci/proxy.c

[PATCH v10 11/19] multi-process: add proxy communication functions

2020-10-05 Thread elena . ufimtseva
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi --- include/io/mpqemu-link.h | 4 io/mpqemu-link.c | 38 ++ 2 files changed, 42 insertions(+)

[PATCH v10 03/19] multi-process: setup PCI host bridge for remote device

2020-10-05 Thread elena . ufimtseva
From: Jagannathan Raman PCI host bridge is setup for the remote device process. It is implemented using remote-pcihost object. It is an extension of the PCI host bridge setup by QEMU. Remote-pcihost configures a PCI bus which could be used by the remote PCI device to latch on to. Signed-off-by:

[PATCH v10 09/19] multi-process: setup memory manager for remote device

2020-10-05 Thread elena . ufimtseva
From: Jagannathan Raman SyncSysMemMsg message format is defined. It is used to send file descriptors of the RAM regions to remote device. RAM on the remote device is configured with a set of file descriptors. Old RAM regions are deleted and new regions, each with an fd, is added to the RAM.

[PATCH v10 14/19] multi-process: Synchronize remote memory

2020-10-05 Thread elena . ufimtseva
From: Jagannathan Raman Add memory-listener object which is used to keep the view of the RAM in sync between QEMU and remote process. A MemoryListener is registered for system-memory AddressSpace. The listener sends SYNC_SYSMEM message to the remote process when memory listener commits the

[PATCH v10 06/19] multi-process: define MPQemuMsg format and transmission functions

2020-10-05 Thread elena . ufimtseva
From: Elena Ufimtseva Defines MPQemuMsg, which is the message that is sent to the remote process. This message is sent over QIOChannel and is used to command the remote process to perform various tasks. Define transmission functions used by proxy and by remote. There are certain restrictions on

[PATCH v10 08/19] multi-process: Associate fd of a PCIDevice with its object

2020-10-05 Thread elena . ufimtseva
From: Jagannathan Raman Associate the file descriptor for a PCIDevice in remote process with DeviceState object. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- MAINTAINERS | 2 + hw/i386/meson.build | 1 +

[PATCH v10 05/19] multi-process: add qio channel function to transmit

2020-10-05 Thread elena . ufimtseva
From: Elena Ufimtseva The entire array of the memory regions and file handlers. Will be used in the next patch. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- include/io/channel.h | 24 +++

[PATCH v10 02/19] multi-process: Add config option for multi-process QEMU

2020-10-05 Thread elena . ufimtseva
From: Jagannathan Raman Add a configuration option to separate multi-process code Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Reviewed-by: Stefan Hajnoczi --- configure | 10 ++ meson.build | 1 + 2 files changed, 11

[PATCH v10 12/19] multi-process: Forward PCI config space acceses to the remote process

2020-10-05 Thread elena . ufimtseva
From: Elena Ufimtseva The Proxy Object sends the PCI config space accesses as messages to the remote process over the communication channel TODO: Investigate if the local PCI config writes can be dropped. Without the proxy local PCI config space writes for the device, the driver in the guest

[PATCH v10 01/19] memory: alloc RAM from file at offset

2020-10-05 Thread elena . ufimtseva
From: Jagannathan Raman Allow RAM MemoryRegion to be created from an offset in a file, instead of allocating at offset of 0 by default. This is needed to synchronize RAM between QEMU & remote process. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena

Re: [PATCH 01/16] hw/core/cpu: Let CPU object have a clock source

2020-10-05 Thread Eduardo Habkost
On Mon, Oct 05, 2020 at 08:09:31PM +0200, Philippe Mathieu-Daudé wrote: > On 10/5/20 7:44 PM, Eduardo Habkost wrote: > > On Mon, Oct 05, 2020 at 06:40:09PM +0200, Igor Mammedov wrote: > >> On Wed, 30 Sep 2020 12:16:53 +0200 > >> Philippe Mathieu-Daudé wrote: > >> > >>> +arm/ppc/riscv folks > >>>

Re: [PATCH 01/16] hw/core/cpu: Let CPU object have a clock source

2020-10-05 Thread Philippe Mathieu-Daudé
On 10/5/20 8:09 PM, Philippe Mathieu-Daudé wrote: > On 10/5/20 7:44 PM, Eduardo Habkost wrote: >> On Mon, Oct 05, 2020 at 06:40:09PM +0200, Igor Mammedov wrote: >>> On Wed, 30 Sep 2020 12:16:53 +0200 >>> Philippe Mathieu-Daudé wrote: >>> +arm/ppc/riscv folks On 9/30/20 9:43 AM,

Re: [PATCH v10 5/9] copy-on-read: limit guest COR activity to base in COR driver

2020-10-05 Thread Andrey Shinkevich
On 05.10.2020 17:58, Vladimir Sementsov-Ogievskiy wrote: 29.09.2020 15:38, Andrey Shinkevich wrote: Limit the guest's COR operations by the base node in the backing chain when the base node name is given. It will be useful for a block stream job when the COR-filter is applied. Signed-off-by:

Re: [PATCH v2] scripts: Convert qemu-version.sh to qemu-version.py

2020-10-05 Thread Yonggang Luo
On Tue, Oct 6, 2020 at 2:10 AM Philippe Mathieu-Daudé wrote: > > On 10/5/20 7:21 PM, Yonggang Luo wrote: > > The sh script are harder to maintain for compatible different > > xsh environment > > > > Signed-off-by: Yonggang Luo > > --- > > What are the changes since v1? +pc =

Re: [PATCH] softmmu/memory: Log invalid memory accesses

2020-10-05 Thread Philippe Mathieu-Daudé
On 10/5/20 7:57 PM, Michael S. Tsirkin wrote: > On Mon, Oct 05, 2020 at 05:27:25PM +0200, Philippe Mathieu-Daudé wrote: >> Log invalid memory accesses with as GUEST_ERROR. >> >> This is particularly useful since commit 5d971f9e67 which reverted >> ("memory: accept mismatching sizes in

Re: [PATCH v2] scripts: Convert qemu-version.sh to qemu-version.py

2020-10-05 Thread Philippe Mathieu-Daudé
On 10/5/20 7:21 PM, Yonggang Luo wrote: > The sh script are harder to maintain for compatible different > xsh environment > > Signed-off-by: Yonggang Luo > --- What are the changes since v1? > meson.build | 2 +- > scripts/qemu-version.py | 30 ++ >

Re: [PATCH 01/16] hw/core/cpu: Let CPU object have a clock source

2020-10-05 Thread Philippe Mathieu-Daudé
On 10/5/20 7:44 PM, Eduardo Habkost wrote: > On Mon, Oct 05, 2020 at 06:40:09PM +0200, Igor Mammedov wrote: >> On Wed, 30 Sep 2020 12:16:53 +0200 >> Philippe Mathieu-Daudé wrote: >> >>> +arm/ppc/riscv folks >>> >>> On 9/30/20 9:43 AM, Igor Mammedov wrote: On Mon, 28 Sep 2020 19:15:24 +0200

Re: [PATCH] softmmu/memory: Log invalid memory accesses

2020-10-05 Thread Michael S. Tsirkin
On Mon, Oct 05, 2020 at 05:27:25PM +0200, Philippe Mathieu-Daudé wrote: > Log invalid memory accesses with as GUEST_ERROR. > > This is particularly useful since commit 5d971f9e67 which reverted > ("memory: accept mismatching sizes in memory_region_access_valid"). > > Signed-off-by: Philippe

Re: [PATCH v3 2/2] hw/virtio-pci Added AER capability.

2020-10-05 Thread Michael S. Tsirkin
On Mon, Oct 05, 2020 at 02:56:01PM +0300, and...@daynix.com wrote: > From: Andrew > > Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1878465 That's a private bug - what information can you share about the motivation for the patch? > Added AER capability for virtio-pci devices. > Also

Re: [PATCH 01/16] hw/core/cpu: Let CPU object have a clock source

2020-10-05 Thread Eduardo Habkost
On Mon, Oct 05, 2020 at 06:40:09PM +0200, Igor Mammedov wrote: > On Wed, 30 Sep 2020 12:16:53 +0200 > Philippe Mathieu-Daudé wrote: > > > +arm/ppc/riscv folks > > > > On 9/30/20 9:43 AM, Igor Mammedov wrote: > > > On Mon, 28 Sep 2020 19:15:24 +0200 > > > Philippe Mathieu-Daudé wrote: > > >

Re: [PATCH] tests/tcg/linux-test: Adjust getsockname for musl

2020-10-05 Thread Richard Henderson
On 10/5/20 11:58 AM, Richard Henderson wrote: > Unlike glibc, musl does not use transparent unions to hide > the different structures that overlap struct sockaddr. > > Add an explicit cast to work around this. Bah. I meant to point out that this affects our microblaze docker cross-compile.

Re: [PATCH v5 1/1] accel/tcg: Fix computing of is_write for MIPS

2020-10-05 Thread Richard Henderson
On 10/2/20 3:14 AM, Kele Huang wrote: > Detect all MIPS store instructions in cpu_signal_handler for all available > MIPS versions, and set is_write if encountering such store instructions. > > This fixed the error while dealing with self-modified code for MIPS. > > Reviewed-by: Richard

Re: [PATCH] tests/tcg/linux-test: Adjust getsockname for musl

2020-10-05 Thread Philippe Mathieu-Daudé
On 10/5/20 6:58 PM, Richard Henderson wrote: > Unlike glibc, musl does not use transparent unions to hide > the different structures that overlap struct sockaddr. > > Add an explicit cast to work around this. > > Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé > --- >

[PATCH v2] scripts: Convert qemu-version.sh to qemu-version.py

2020-10-05 Thread Yonggang Luo
The sh script are harder to maintain for compatible different xsh environment Signed-off-by: Yonggang Luo --- meson.build | 2 +- scripts/qemu-version.py | 30 ++ scripts/qemu-version.sh | 25 - 3 files changed, 31 insertions(+),

Re: [PATCH] qom: Improve error message displayed with missing object properties

2020-10-05 Thread Philippe Mathieu-Daudé
On 10/5/20 6:42 PM, Eduardo Habkost wrote: > On Mon, Oct 05, 2020 at 10:46:38AM +0200, Paolo Bonzini wrote: >> On 20/09/20 17:53, Philippe Mathieu-Daudé wrote: >>> Instead of only displaying the property missing, also display >>> the object name. This help developer to quickly figure out the >>>

Re: [PATCH 01/16] hw/core/cpu: Let CPU object have a clock source

2020-10-05 Thread Philippe Mathieu-Daudé
On 10/5/20 6:40 PM, Igor Mammedov wrote: > On Wed, 30 Sep 2020 12:16:53 +0200 > Philippe Mathieu-Daudé wrote: > >> +arm/ppc/riscv folks >> >> On 9/30/20 9:43 AM, Igor Mammedov wrote: >>> On Mon, 28 Sep 2020 19:15:24 +0200 >>> Philippe Mathieu-Daudé wrote: >>> Let CPUState have a clock

[PATCH] scripts: Convert qemu-version.sh to qemu-version.py

2020-10-05 Thread Yonggang Luo
The sh script are harder to maintain for compatible different xsh environment Signed-off-by: Yonggang Luo --- meson.build | 2 +- scripts/qemu-version.py | 29 + scripts/qemu-version.sh | 25 - 3 files changed, 30 insertions(+),

Re: [PATCH 0/4] Convert remaining submodules to meson, cleanup env var handling

2020-10-05 Thread Richard Henderson
On 10/5/20 8:56 AM, Paolo Bonzini wrote: > The main purpose of this series is to have a correct and consistent > handling of CFLAGS/CXXFLAGS/LDFLAGS environment variables: > > - correct: avoid that the -pie flag, used for the compiler checks in > the configure script, ends up being passed to

Re: [RFC PATCH] scripts/qemu-version.sh: Always describe tag version

2020-10-05 Thread Yonggang Luo
On windows executing "pkgversion=$(git describe --match 'v*' --dirty --always | echo "")" $ bash ./scripts/qemu-version.sh . '' '' #define QEMU_PKGVERSION "" #define QEMU_FULL_VERSION "" The result are empty. By removing echo "" pkgversion=$(git describe --match 'v*' --dirty --always)

[PATCH] tests/tcg/linux-test: Adjust getsockname for musl

2020-10-05 Thread Richard Henderson
Unlike glibc, musl does not use transparent unions to hide the different structures that overlap struct sockaddr. Add an explicit cast to work around this. Signed-off-by: Richard Henderson --- tests/tcg/multiarch/linux-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 1/6] spapr/xive: Introduce a StoreEOI capability

2020-10-05 Thread Cédric Le Goater
When an interrupt has been handled, the OS notifies the interrupt controller with an EOI sequence. On the XIVE interrupt controller (POWER9 and POWER10), this can be done with a load or a store operation on the ESB interrupt management page of the interrupt. The StoreEOI operation has less latency

[PATCH v2 4/6] spapr/xive: Enforce load-after-store ordering

2020-10-05 Thread Cédric Le Goater
The XIVE_ESB_SET_PQ_10 load operation is used to disable temporarily an interrupt source. If StoreEOI is active, a source could be left enabled if the load and store operations come out of order. QEMU makes use of this offset to quiesce the sources before a migration. Enforce the load-after-store

[PATCH v2 5/6] spapr/xive: Activate StoreEOI at the source level

2020-10-05 Thread Cédric Le Goater
When the StoreEOI capability is "on", the H_INT_GET_SOURCE_INFO will set the StoreEOI flag for all sources. This could be an issue if StoreEOI is not supported on a specific source, of a passthrough device for instance. In that case, we could either introduce a new KVM ioctl to query the

[PATCH v2 0/6] spapr/xive: Activate StoreEOI in P10 compat guests

2020-10-05 Thread Cédric Le Goater
Hello, When an interrupt has been handled, the OS notifies the interrupt controller with an EOI sequence. On the XIVE interrupt controller (POWER9 and POWER10), this can be done with a load or a store operation on the ESB interrupt management page of the interrupt. The StoreEOI operation has less

[PATCH v2 2/6] spapr/xive: Add a warning when StoreEOI is activated on POWER8 CPUs

2020-10-05 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ppc/spapr_caps.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c index 57c62c22e4cc..b0a9d0227db2 100644 --- a/hw/ppc/spapr_caps.c +++ b/hw/ppc/spapr_caps.c @@ -535,6 +535,14 @@ static void

[PATCH v2 6/6] spapr/xive: Introduce a new CAS value for the StoreEOI capability

2020-10-05 Thread Cédric Le Goater
When the StoreEOI capability is set to "cas", let CAS decide when StoreEOI should be advertised. StoreEOI is safe to use with a P10 compat machine because the OS enforces load-after-store ordering but not with P9 compat. The question now is : should we make "cas" the default at the machine level

[PATCH v2 3/6] spapr/xive: Add a warning when StoreEOI is activated on POWER9 CPUs

2020-10-05 Thread Cédric Le Goater
StoreEOI on POWER9 CPUs is racy because load-after-store ordering is not enforced. Signed-off-by: Cédric Le Goater --- hw/ppc/spapr_caps.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c index b0a9d0227db2..9251badbdc27 100644 ---

Re: [PATCH] qom: fix objects with improper parent type

2020-10-05 Thread Igor Mammedov
On Tue, 29 Sep 2020 16:47:14 -0700 Sergey Nizovtsev wrote: > Some objects accidentally inherit ObjectClass instead of Object. > They compile silently but may crash after downcasting. > > In this patch, we introduce a coccinelle script to find broken > declarations and fix them manually with

RE: [RFC PATCH 12/21] contrib/gitdm: Add Qualcomm to the domain map

2020-10-05 Thread Taylor Simpson
> -Original Message- > From: Philippe Mathieu-Daudé On > Behalf Of Philippe Mathieu-Daudé > Sent: Sunday, October 4, 2020 12:05 PM > To: qemu-devel@nongnu.org > Cc: Alex Bennée ; Philippe Mathieu-Daudé > ; Stephen Long ; Taylor > Simpson > Subject: [RFC PATCH 12/21] contrib/gitdm: Add

Re: [PATCH v10 5/9] copy-on-read: limit guest COR activity to base in COR driver

2020-10-05 Thread Andrey Shinkevich
On 05.10.2020 17:58, Vladimir Sementsov-Ogievskiy wrote: 29.09.2020 15:38, Andrey Shinkevich wrote: Limit the guest's COR operations by the base node in the backing chain when the base node name is given. It will be useful for a block stream job when the COR-filter is applied.

Re: [PATCH] qom: Improve error message displayed with missing object properties

2020-10-05 Thread Eduardo Habkost
On Mon, Oct 05, 2020 at 10:46:38AM +0200, Paolo Bonzini wrote: > On 20/09/20 17:53, Philippe Mathieu-Daudé wrote: > > Instead of only displaying the property missing, also display > > the object name. This help developer to quickly figure out the > > mistake without opening a debugger. > > > >

[PATCH v4 6/6] cirrus: Enable plugin in cirrus for windows

2020-10-05 Thread Yonggang Luo
Signed-off-by: Yonggang Luo --- .cirrus.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 86ea33926a..5363142373 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -104,7 +104,8 @@ windows_msys2_task: - C:\tools\msys64\usr\bin\bash.exe -lc

Re: [PATCH 01/16] hw/core/cpu: Let CPU object have a clock source

2020-10-05 Thread Igor Mammedov
On Wed, 30 Sep 2020 12:16:53 +0200 Philippe Mathieu-Daudé wrote: > +arm/ppc/riscv folks > > On 9/30/20 9:43 AM, Igor Mammedov wrote: > > On Mon, 28 Sep 2020 19:15:24 +0200 > > Philippe Mathieu-Daudé wrote: > > > >> Let CPUState have a clock source (named 'clk') and CPUClass > >> have a

[PATCH v4 4/6] plugin: Fixes typo in qemu-plugin.h

2020-10-05 Thread Yonggang Luo
Getting the comment consistence with the function name Signed-off-by: Yonggang Luo --- include/qemu/qemu-plugin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index bab8b0d4b3..daac8291b8 100644 ---

Re: [RFC PATCH 08/21] contrib/gitdm: Add Mentor Graphics to the domain map

2020-10-05 Thread Alex Bennée
Joseph Myers writes: > On Sun, 4 Oct 2020, Philippe Mathieu-Daudé wrote: > >> There is a number of contributors from this domain, >> add its own entry to the gitdm domain map. > > At some point the main branding will be Siemens; not sure how you want to > handle that. We've already done

Re: [PATCH v8 02/14] monitor: Add Monitor parameter to monitor_get_cpu_index()

2020-10-05 Thread Eric Blake
On 10/5/20 10:58 AM, Kevin Wolf wrote: > Most callers actually don't have to rely on cur_mon, but already know > for which monitor they call monitor_get_cpu_index(). > > Signed-off-by: Kevin Wolf > --- > include/monitor/monitor.h | 2 +- > hw/core/machine-hmp-cmds.c | 2 +- >

Re: [PATCH v8 000/133] Fixes curses on msys2/mingw

2020-10-05 Thread Yonggang Luo
Err, sorry for this, don't know if this would broken the patchew On Mon, Oct 5, 2020 at 11:54 PM Yonggang Luo wrote: > > V7-V8 > Rebase to master and resolve conflict of > *configure: fixes indent of $meson setup > > V6-V7 > Update the configure script for > * curses: Fixes compiler error that

[PATCH v4 5/6] plugin: Getting qemu-plugin works under win32.

2020-10-05 Thread Yonggang Luo
Define QEMU_PLUGIN_API_IMPLEMENTATION in api.c and core.c We removed the need of .symbols file, so is the configure script, if we one expose a function to qemu-plugin just need prefix the function with QEMU_PLUGIN_EXPORT We use QEMU_PLUGIN_EXPORT export the functions in api.c and core.c and

[PATCH v4 3/6] plugin: getting qemu_plugin_get_hwaddr only expose one function prototype

2020-10-05 Thread Yonggang Luo
This is used for counting how much function are export to qemu plugin. Signed-off-by: Yonggang Luo Reviewed-by: Alex Bennée --- plugins/api.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/api.c b/plugins/api.c index bbdc5a4eb4..13177d3578 100644 ---

[PATCH v8 14/14] block: Convert 'block_resize' to coroutine

2020-10-05 Thread Kevin Wolf
block_resize performs some I/O that could potentially take quite some time, so use it as an example for the new 'coroutine': true annotation in the QAPI schema. bdrv_truncate() requires that we're already in the right AioContext for the BlockDriverState if called in coroutine context. So instead

[PATCH v4 1/6] plugins: Fixes a issue when dlsym failed, the handle not closed

2020-10-05 Thread Yonggang Luo
Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- plugins/loader.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/loader.c b/plugins/loader.c index 685d334e1a..8ac5dbc20f 100644 --- a/plugins/loader.c +++ b/plugins/loader.c @@ -235,6

[PATCH v8 10/14] hmp: Add support for coroutine command handlers

2020-10-05 Thread Kevin Wolf
Often, QMP command handlers are not only called to handle QMP commands, but also from a corresponding HMP command handler. In order to give them a consistent environment, optionally run HMP command handlers in a coroutine, too. The implementation is a lot simpler than in QMP because for HMP, we

[PATCH v4 2/6] plugin: Fixes compiling errors on msys2/mingw

2020-10-05 Thread Yonggang Luo
Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- contrib/plugins/hotblocks.c | 2 +- tests/plugin/bb.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index

[PATCH v4 0/6] Enable plugin support on msys2/mingw

2020-10-05 Thread Yonggang Luo
V3-V4 Split plugin: Fixes typo in qemu-plugin.h out Trying to explain the design of plugin: Getting qemu-plugin works under win32. V1-V2 1. Fixes review comments 2. Increase QEMU_PLUGIN_VERSION to 1 for compat QEMU_PLUGIN_VERSION 0 3. Revise the loader to support for version 0 and 1 4. By

[PATCH v8 07/14] monitor: Make current monitor a per-coroutine property

2020-10-05 Thread Kevin Wolf
This way, a monitor command handler will still be able to access the current monitor, but when it yields, all other code code will correctly get NULL from monitor_cur(). This uses a hash table to map the coroutine pointer to the current monitor of that coroutine. Outside of coroutine context, we

[PATCH v8 06/14] qmp: Call monitor_set_cur() only in qmp_dispatch()

2020-10-05 Thread Kevin Wolf
The correct way to set the current monitor for a coroutine handler will be different than for a blocking handler, so monitor_set_cur() needs to be called in qmp_dispatch(). Signed-off-by: Kevin Wolf --- include/qapi/qmp/dispatch.h | 3 ++- monitor/qmp.c | 9 ++---

Re: [PATCH 15/16] target/mips/cpu: Do not allow system-mode use without input clock

2020-10-05 Thread Igor Mammedov
On Tue, 29 Sep 2020 16:40:24 +0200 Philippe Mathieu-Daudé wrote: > On 9/29/20 3:01 PM, Igor Mammedov wrote: > > On Mon, 28 Sep 2020 19:15:38 +0200 > > Philippe Mathieu-Daudé wrote: > > > >> Now than all QOM users provides the input clock, do not allow > >> using a CPU core without its input

Re: [PATCH v10 2/9] copy-on-read: add filter append/drop functions

2020-10-05 Thread Andrey Shinkevich
On 05.10.2020 16:34, Vladimir Sementsov-Ogievskiy wrote: 29.09.2020 15:38, Andrey Shinkevich wrote: Provide API for the COR-filter insertion/removal. Also, drop the filter child permissions for an inactive state when the filter node is being removed. Signed-off-by: Andrey Shinkevich ---  

[PATCH v8 03/14] monitor: Use getter/setter functions for cur_mon

2020-10-05 Thread Kevin Wolf
cur_mon really needs to be coroutine-local as soon as we move monitor command handlers to coroutines and let them yield. As a first step, just remove all direct accesses to cur_mon so that we can implement this in the getter function later. Signed-off-by: Kevin Wolf ---

[PATCH v8 00/14] monitor: Optionally run handlers in coroutines

2020-10-05 Thread Kevin Wolf
Some QMP command handlers can block the main loop for a relatively long time, for example because they perform some I/O. This is quite nasty. Allowing such handlers to run in a coroutine where they can yield (and therefore release the BQL) while waiting for an event such as I/O completion solves

[PATCH v8 4/4] win32: Simplify gmtime_r detection not depends on if _POSIX_C_SOURCE are defined on msys2/mingw

2020-10-05 Thread Yonggang Luo
We remove the CONFIG_LOCALTIME_R detection option in configure, and move the check existence of gmtime_r from configure into C header and source directly by using macro `_POSIX_THREAD_SAFE_FUNCTIONS`. Before this patch, the configure script are always assume the compiler doesn't define

[PATCH v8 1/4] configure: fixes indent of $meson setup

2020-10-05 Thread Yonggang Luo
convert these line from tab to space Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- configure | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 66641099fc..7d5ffee29a 100755 --- a/configure +++ b/configure @@

[PATCH v8 0/4] Fixes curses on msys2/mingw

2020-10-05 Thread Yonggang Luo
V7-V8 Rebase to master and resolve conflict of *configure: fixes indent of $meson setup V6-V7 Update the configure script for * curses: Fixes compiler error that complain don't have langinfo.h on msys2/m= ingw V5-V6 Dropping configure: Fixes ncursesw detection under msys2/mingw by convert the=

[PATCH v8 11/14] util/async: Add aio_co_reschedule_self()

2020-10-05 Thread Kevin Wolf
Add a function that can be used to move the currently running coroutine to a different AioContext (and therefore potentially a different thread). Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- include/block/aio.h | 10 ++ util/async.c| 30

[PATCH v8 08/14] qapi: Add a 'coroutine' flag for commands

2020-10-05 Thread Kevin Wolf
This patch adds a new 'coroutine' flag to QMP command definitions that tells the QMP dispatcher that the command handler is safe to be run in a coroutine. The documentation of the new flag pretends that this flag is already used as intended, which it isn't yet after this patch. We'll implement

[PATCH v8 13/14] block: Add bdrv_lock()/unlock()

2020-10-05 Thread Kevin Wolf
Inside of coroutine context, we can't directly use aio_context_acquire() for the AioContext of a block node because we already own the lock of the current AioContext and we need to avoid double locking to prevent deadlocks. This provides helper functions to lock the AioContext of a node only if

[PATCH v8 05/14] qmp: Assert that no other monitor is active

2020-10-05 Thread Kevin Wolf
monitor_qmp_dispatch() is never supposed to be called in the context of another monitor, so assert that monitor_cur() is NULL instead of saving and restoring it. Signed-off-by: Kevin Wolf --- monitor/qmp.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monitor/qmp.c

[PULL v2 16/17] util/vfio-helpers: Collect IOVA reserved regions

2020-10-05 Thread Stefan Hajnoczi
From: Eric Auger The IOVA allocator currently ignores host reserved regions. As a result some chosen IOVAs may collide with some of them, resulting in VFIO MAP_DMA errors later on. This happens on ARM where the MSI reserved window quickly is encountered: [0x800, 0x810]. since 5.4 kernel,

[PATCH v8 09/14] qmp: Move dispatcher to a coroutine

2020-10-05 Thread Kevin Wolf
This moves the QMP dispatcher to a coroutine and runs all QMP command handlers that declare 'coroutine': true in coroutine context so they can avoid blocking the main loop while doing I/O or waiting for other events. For commands that are not declared safe to run in a coroutine, the dispatcher

[PULL v2 15/17] docs: add 'io_uring' option to 'aio' param in qemu-options.hx

2020-10-05 Thread Stefan Hajnoczi
From: Stefano Garzarella When we added io_uring AIO engine, we forgot to update qemu-options.hx, so qemu(1) man page and qemu help were outdated. Signed-off-by: Stefano Garzarella Signed-off-by: Stefan Hajnoczi Reviewed-by: Julia Suvorova Reviewed-by: Pankaj Gupta Message-Id:

[PATCH v8 02/14] monitor: Add Monitor parameter to monitor_get_cpu_index()

2020-10-05 Thread Kevin Wolf
Most callers actually don't have to rely on cur_mon, but already know for which monitor they call monitor_get_cpu_index(). Signed-off-by: Kevin Wolf --- include/monitor/monitor.h | 2 +- hw/core/machine-hmp-cmds.c | 2 +- monitor/hmp-cmds.c | 2 +- monitor/misc.c | 20

[PATCH v8 04/14] hmp: Update current monitor only in handle_hmp_command()

2020-10-05 Thread Kevin Wolf
The current monitor is updated relatively early in the command handling code even though only the command handler actually needs it. The current monitor will become coroutine-local later, so we can only update it when we know in which coroutine the command will be exectued. Move it to

[PULL v2 13/17] block/io: refactor save/load vmstate

2020-10-05 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy Like for read/write in a previous commit, drop extra indirection layer, generate directly bdrv_readv_vmstate() and bdrv_writev_vmstate(). Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Stefan

[PATCH v8 01/14] monitor: Add Monitor parameter to monitor_set_cpu()

2020-10-05 Thread Kevin Wolf
Most callers actually don't have to rely on cur_mon, but already know for which monitor they call monitor_set_cpu(). Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- include/monitor/monitor.h | 2 +- monitor/hmp-cmds.c| 2 +- monitor/misc.c| 10 +- 3 files

[PATCH v8 3/4] curses: Fixes curses compiling errors.

2020-10-05 Thread Yonggang Luo
This is the compiling error: ../ui/curses.c: In function 'curses_refresh': ../ui/curses.c:256:5: error: 'next_maybe_keycode' may be used uninitialized in this function [-Werror=maybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keycode) |

Re: [PATCH v3 4/6] plugin: define QEMU_PLUGIN_API_IMPLEMENTATION first

2020-10-05 Thread Yonggang Luo
Hi, I split this out just for easier review, so the lines changed in api.c and core.c equales to the number of function exported, anyway On Mon, Oct 5, 2020 at 6:44 PM Alex Bennée wrote: > > > Yonggang Luo writes: > > > This is used to distinguish from the qemu and plugin in > > header

[PATCH v8 12/14] block: Add bdrv_co_enter()/leave()

2020-10-05 Thread Kevin Wolf
Add a pair of functions to temporarily move the current coroutine to the AioContext of a given BlockDriverState. Signed-off-by: Kevin Wolf --- include/block/block.h | 17 + block.c | 23 +++ 2 files changed, 40 insertions(+) diff --git

[PULL v2 10/17] scripts: add block-coroutine-wrapper.py

2020-10-05 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy We have a very frequent pattern of creating a coroutine from a function with several arguments: - create a structure to pack parameters - create _entry function to call original function taking parameters from struct - do different magic to handle

[PATCH v8 2/4] curses: Fixes compiler error that complain don't have langinfo.h on msys2/mingw

2020-10-05 Thread Yonggang Luo
msys2/mingw lacks the POSIX-required langinfo.h. gcc test.c -DNCURSES_WIDECHAR -I/mingw64/include/ncursesw -pipe -lncursesw -lgnurx -ltre -lintl -liconv test.c:4:10: fatal error: langinfo.h: No such file or directory 4 | #include | ^~~~ compilation terminated. So we

[PULL v2 07/17] block: return error-code from bdrv_invalidate_cache

2020-10-05 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy This is the only coroutine wrapper from block.c and block/io.c which doesn't return a value, so let's convert it to the common behavior, to simplify moving to generated coroutine wrappers in a further commit. Also, bdrv_invalidate_cache is a void function,

<    1   2   3   4   >