Re: [PATCH v4 08/14] vfio-user: handle PCI config space accesses

2021-12-16 Thread Stefan Hajnoczi
On Wed, Dec 15, 2021 at 10:35:32AM -0500, Jagannathan Raman wrote: > Define and register handlers for PCI config space accesses > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > hw/remote/vfio-user-obj.c | 45 +

Re: [PATCH v2 24/25] python: re-enable pylint duplicate-code warnings

2021-12-16 Thread Vladimir Sementsov-Ogievskiy
15.12.2021 22:39, John Snow wrote: With the old library gone, there's nothing duplicated in the tree, so the warning suppression can be removed. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v2 25/25] python: rename qemu.aqmp to qemu.qmp

2021-12-16 Thread Vladimir Sementsov-Ogievskiy
15.12.2021 22:39, John Snow wrote: Now that we are fully switched over to the new QMP library, move it back over the old namespace. This is being done primarily so that we may upload this package simply as "qemu.qmp" without introducing confusion over whether or not "aqmp" is a new protocol or no

Re: [PATCH v4 08/14] vfio-user: handle PCI config space accesses

2021-12-16 Thread John Levon
On Thu, Dec 16, 2021 at 11:30:20AM +, Stefan Hajnoczi wrote: > > +ret = vfu_setup_region(o->vfu_ctx, VFU_PCI_DEV_CFG_REGION_IDX, > > + pci_config_size(o->pci_dev), > > &vfu_object_cfg_access, > > + VFU_REGION_FLAG_RW | VFU_REGION_FLAG_AL

Re: [PATCH v3 0/3] block: minor refactoring in preparation to the block layer API split

2021-12-16 Thread Kevin Wolf
Am 15.12.2021 um 13:11 hat Emanuele Giuseppe Esposito geschrieben: > These patches are taken from my old patches and feedback of > my series "block layer: split block APIs in global state and I/O". > > The reason for a separate series is that the original one is > already too long, and these patch

Re: [PULL 000/102] ppc queue

2021-12-16 Thread Richard Henderson
On 12/15/21 11:02 PM, Cédric Le Goater wrote: Fails testing: /home/gitlab-runner/builds/yKcZqVC9/0/qemu-project/qemu/docs/specs/ppc-spapr-hcalls.rst:101:Block quote ends without a blank line; unexpected unindent. I didn't see it under  :   https://gitlab.com/legoater/qemu/-/pipelines/4298522

Re: [PULL 31/33] tests/acpi: add test case for VIOT

2021-12-16 Thread Richard Henderson
On 12/16/21 3:28 AM, Peter Maydell wrote: On Thu, 16 Dec 2021 at 09:58, Jean-Philippe Brucker wrote: On Wed, Dec 15, 2021 at 04:59:10PM -0800, Richard Henderson wrote: On 12/15/21 2:40 AM, Peter Maydell wrote: From: Jean-Philippe Brucker Add two test cases for VIOT, one on the q35 machine

Re: [PATCH v2 01/25] python/aqmp: add __del__ method to legacy interface

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:15PM -0500, John Snow wrote: > asyncio can complain *very* loudly if you forget to back out of things > gracefully before the garbage collector starts destroying objects that > contain live references to asyncio Tasks. > > The usual fix is just to remember to call aqm

[RFC 0/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-16 Thread David Edmondson
When examining a report of poor migration behaviour, it would often be useful to understand how much data was transferred in different phases of the migration process. For example, if the downtime limit is exceeded, to know how much data was transferred during the downtime. RFC because the name "

[RFC 1/2] migration: Introduce ram_transferred_add()

2021-12-16 Thread David Edmondson
...and use it. Signed-off-by: David Edmondson --- migration/ram.c | 23 ++- migration/ram.h | 1 + 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 57efa67f20..48ef2819f6 100644 --- a/migration/ram.c +++ b/migration/ram.

[RFC 2/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-16 Thread David Edmondson
Provide information on the number of bytes copied in the pre-copy, downtime and post-copy phases of migration. Signed-off-by: David Edmondson --- migration/migration.c | 3 +++ migration/ram.c | 7 +++ monitor/hmp-cmds.c| 12 qapi/migration.json | 4 +++- 4 files

[PATCH 0/8] hw: Have DMA API take MemTxAttrs arg & propagate MemTxResult (part 2)

2021-12-16 Thread Philippe Mathieu-Daudé
This is the continuation of part 1 (dma_memory API): https://www.mail-archive.com/qemu-devel@nongnu.org/msg820359.html This series update the dma_buf API. Based on "hw: Let the DMA API take a MemTxAttrs argument" Based-on: <20210702092439.989969-1-phi...@redhat.com> Philippe Mathieu-Daudé (8):

[PATCH 5/8] dma: Let dma_buf_write() take MemTxAttrs argument

2021-12-16 Thread Philippe Mathieu-Daudé
Let devices specify transaction attributes when calling dma_buf_write(). Keep the default MEMTXATTRS_UNSPECIFIED in the few callers. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/dma.h | 2 +- hw/ide/ahci.c | 6 -- hw/nvme/ctrl.c| 3 ++- hw/scsi/megasas.c | 2

[PATCH 2/8] dma: Have dma_buf_read() / dma_buf_write() take a void pointer

2021-12-16 Thread Philippe Mathieu-Daudé
DMA operations are run on any kind of buffer, not arrays of uint8_t. Convert dma_buf_read/dma_buf_write functions to take a void pointer argument and save us pointless casts to uint8_t *. Remove this pointless casts in the megasas device model. Signed-off-by: Philippe Mathieu-Daudé --- include/

[PATCH 1/8] dma: Have dma_buf_rw() take a void pointer

2021-12-16 Thread Philippe Mathieu-Daudé
DMA operations are run on any kind of buffer, not arrays of uint8_t. Convert dma_buf_rw() to take a void pointer argument to save us pointless casts to uint8_t *. Signed-off-by: Philippe Mathieu-Daudé --- softmmu/dma-helpers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[PATCH 3/8] dma: Let pci_dma_rw() take MemTxAttrs argument

2021-12-16 Thread Philippe Mathieu-Daudé
Let devices specify transaction attributes when calling pci_dma_rw(). Keep the default MEMTXATTRS_UNSPECIFIED in the few callers. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/pci/pci.h | 10 ++ hw/audio/intel-hda.c | 3 ++- hw/scsi/esp-pci.c| 2 +- 3 files changed, 9 inser

[PATCH 8/8] dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult

2021-12-16 Thread Philippe Mathieu-Daudé
Since the previous commit, dma_buf_rw() returns a MemTxResult type. Do not discard it, return it to the caller. Since both dma_buf_read/dma_buf_write functions were previously returning the QEMUSGList size not consumed, add an extra argument where the unconsummed size can be stored. Update the fe

[PATCH 4/8] dma: Let dma_buf_rw() take MemTxAttrs argument

2021-12-16 Thread Philippe Mathieu-Daudé
Let devices specify transaction attributes when calling dma_buf_rw(). Keep the default MEMTXATTRS_UNSPECIFIED in the 2 callers. Signed-off-by: Philippe Mathieu-Daudé --- softmmu/dma-helpers.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/softmmu/dma-helpers.c b

[PATCH 6/8] dma: Let dma_buf_read() take MemTxAttrs argument

2021-12-16 Thread Philippe Mathieu-Daudé
Let devices specify transaction attributes when calling dma_buf_read(). Keep the default MEMTXATTRS_UNSPECIFIED in the few callers. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/dma.h | 2 +- hw/ide/ahci.c | 4 ++-- hw/nvme/ctrl.c| 2 +- hw/scsi/megasas.c | 24

[PATCH 7/8] dma: Let dma_buf_rw() propagate MemTxResult

2021-12-16 Thread Philippe Mathieu-Daudé
dma_memory_rw() returns a MemTxResult type. Do not discard it, return it to the caller. Since dma_buf_rw() was previously returning the QEMUSGList size not consumed, add an extra argument where this size can be stored. Update the 2 callers. Signed-off-by: Philippe Mathieu-Daudé --- softmmu/dma

Re: [PATCH v2 02/25] python/aqmp: handle asyncio.TimeoutError on execute()

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:16PM -0500, John Snow wrote: > This exception can be injected into any await statement. If we are > canceled via timeout, we want to clear the pending execution record on > our way out. > > Signed-off-by: John Snow > --- > python/qemu/aqmp/qmp_client.py | 8 ++--

[PATCH v2 1/2] hw/arm/musicpal: Fix coding style of code related to MV88W8618 device

2021-12-16 Thread Philippe Mathieu-Daudé
We are going to move this code, so fix its style first to avoid: ERROR: spaces required around that '/' (ctx:VxV) Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/musicpal.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.

[PATCH v2 2/2] hw/net: Move MV88W8618 network device out of hw/arm/ directory

2021-12-16 Thread Philippe Mathieu-Daudé
The Marvell 88W8618 network device is hidden in the Musicpal machine. Move it into a new unit file under the hw/net/ directory. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/net/mv88w8618_eth.h | 12 + hw/arm/musicpal.c | 380 +-- hw/net/mv88w8618

Re: [PATCH 8/8] dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult

2021-12-16 Thread Philippe Mathieu-Daudé
On 12/16/21 13:35, Philippe Mathieu-Daudé wrote: > Since the previous commit, dma_buf_rw() returns a MemTxResult > type. Do not discard it, return it to the caller. > > Since both dma_buf_read/dma_buf_write functions were previously > returning the QEMUSGList size not consumed, add an extra argume

[PATCH v2 0/2] hw/net: Move MV88W8618 network device out of hw/arm/ directory

2021-12-16 Thread Philippe Mathieu-Daudé
This series simply extract the MV88W8618 device from the ARM machine in hw/arm/ and move it to hw/net/. Since v1: - update (c) notice Philippe Mathieu-Daudé (2): hw/arm/musicpal: Fix coding style of code related to MV88W8618 device hw/net: Move MV88W8618 network device out of hw/arm/ director

Re: [PULL 31/33] tests/acpi: add test case for VIOT

2021-12-16 Thread Jean-Philippe Brucker
On Thu, Dec 16, 2021 at 11:28:04AM +, Peter Maydell wrote: > On Thu, 16 Dec 2021 at 09:58, Jean-Philippe Brucker > wrote: > > > > On Wed, Dec 15, 2021 at 04:59:10PM -0800, Richard Henderson wrote: > > > On 12/15/21 2:40 AM, Peter Maydell wrote: > > > > From: Jean-Philippe Brucker > > > > > >

Re: [PATCH v2 04/25] python/aqmp: add SocketAddrT to package root

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:18PM -0500, John Snow wrote: > It's a commonly needed definition, it can be re-exported by the root. > > Signed-off-by: John Snow > --- > python/qemu/aqmp/__init__.py | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/python/qemu/aqm

[PATCH v6 0/8] tests/unit: Rework test-smp-parse tests

2021-12-16 Thread Philippe Mathieu-Daudé
Since v5: - Adapt test class names (Yanan Wang) Since v4: - Rebase (skipping merged patches) - Renamed tests (Yanan Wang) Since v2: - Restore 'dies_supported' field in test_with_dies (Yanan) - Add R-b tags - QOM-ify the TYPE_MACHINE classes Supersedes: <2025145900.2531865-1-phi...@redhat.com

[PATCH v6 2/8] tests/unit/test-smp-parse: Split the 'generic' test in valid / invalid

2021-12-16 Thread Philippe Mathieu-Daudé
Split the 'generic' test in two tests: 'valid' and 'invalid'. This will allow us to remove the hack which modifies the MachineClass internal state. Reviewed-by: Richard Henderson Reviewed-by: Yanan Wang Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-smp-parse.c | 21

[PATCH v6 5/8] tests/unit/test-smp-parse: Add 'smp-generic-valid' machine type

2021-12-16 Thread Philippe Mathieu-Daudé
Keep the common TYPE_MACHINE class initialization in machine_base_class_init(), make it abstract, and move the non-common code to a new class: "smp-generic-valid". Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-smp-parse.c | 19 +++ 1 fi

[PATCH v6 6/8] tests/unit/test-smp-parse: Simplify pointer to compound literal use

2021-12-16 Thread Philippe Mathieu-Daudé
We can simply use a local variable (and pass its pointer) instead of a pointer to a compound literal. Reviewed-by: Andrew Jones Reviewed-by: Richard Henderson Reviewed-by: Yanan Wang Tested-by: Yanan Wang Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-smp-parse.c | 66

Re: [PATCH v4 03/10] hw/core/machine: Wrap target specific parameters together

2021-12-16 Thread Philippe Mathieu-Daudé
On 11/21/21 13:24, Yanan Wang wrote: > Wrap the CPU target specific parameters together into a single > variable, so that we don't need to update the other lines but > a single line when new topology parameters are introduced. Where new params are introduced? Not in this series apparently. > No f

[PATCH v6 7/8] tests/unit/test-smp-parse: Constify some pointer/struct

2021-12-16 Thread Philippe Mathieu-Daudé
Declare structures const when we don't need to modify them at runtime. Reviewed-by: Andrew Jones Reviewed-by: Richard Henderson Reviewed-by: Yanan Wang Tested-by: Yanan Wang Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-smp-parse.c | 12 ++-- 1 file changed, 6 insertions(

[PATCH v6 1/8] tests/unit/test-smp-parse: Pass machine type as argument to tests

2021-12-16 Thread Philippe Mathieu-Daudé
Use g_test_add_data_func() instead of g_test_add_func() so we can pass the machine type to the tests (we will soon have different machine types). Reviewed-by: Richard Henderson Reviewed-by: Yanan Wang Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-smp-parse.c | 18 --

[PATCH v6 8/8] hw/core: Rename smp_parse() -> machine_parse_smp_config()

2021-12-16 Thread Philippe Mathieu-Daudé
All methods related to MachineState are prefixed with "machine_". smp_parse() does not need to be an exception. Rename it and const'ify the SMPConfiguration argument, since it doesn't need to be modified. Reviewed-by: Andrew Jones Reviewed-by: Richard Henderson Reviewed-by: Yanan Wang Tested-by

Re: [PATCH v2 07/25] python/qmp: switch qemu-ga-client to AQMP

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:21PM -0500, John Snow wrote: > Signed-off-by: John Snow > --- > python/qemu/qmp/qemu_ga_client.py | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/python/qemu/qmp/qemu_ga_client.py > b/python/qemu/qmp/qemu_ga_client.

[PATCH v6 4/8] tests/unit/test-smp-parse: Add 'smp-generic-invalid' machine type

2021-12-16 Thread Philippe Mathieu-Daudé
Avoid modifying the MachineClass internals by adding the 'smp-generic-invalid' machine, which inherits from TYPE_MACHINE. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-smp-parse.c | 25 - 1 file changed, 16 insertions(+), 9 dele

Re: [PATCH v4 09/14] vfio-user: handle DMA mappings

2021-12-16 Thread Stefan Hajnoczi
On Wed, Dec 15, 2021 at 10:35:33AM -0500, Jagannathan Raman wrote: > Define and register callbacks to manage the RAM regions used for > device DMA > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > Reviewed-by: Stefan Hajnoczi > --- > hw/re

[PATCH v6 3/8] tests/unit/test-smp-parse: Add 'smp-with-dies' machine type

2021-12-16 Thread Philippe Mathieu-Daudé
Avoid modifying the MachineClass internals by adding the 'smp-with-dies' machine, which inherits from TYPE_MACHINE. Reviewed-by: Richard Henderson Reviewed-by: Yanan Wang Tested-by: Yanan Wang Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-smp-parse.c | 22 +++--- 1

Re: [PATCH v2 11/25] python: move qmp-shell under the AQMP package

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:25PM -0500, John Snow wrote: > Signed-off-by: John Snow > --- > python/README.rst | 2 +- > python/qemu/{qmp => aqmp}/qmp_shell.py | 0 > python/setup.cfg | 2 +- > scripts/qmp/qmp-shell | 2 +- > 4 files ch

Re: [PATCH v2 08/25] python/qmp: switch qom tools to AQMP

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:22PM -0500, John Snow wrote: > Signed-off-by: John Snow > --- > python/qemu/qmp/qom.py| 5 +++-- > python/qemu/qmp/qom_common.py | 3 ++- > python/qemu/qmp/qom_fuse.py | 11 ++- > 3 files changed, 11 insertions(+), 8 deletions(-) > > diff --git a

Re: [PATCH v2 14/25] scripts/cpu-x86-uarch-abi: switch to AQMP

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:28PM -0500, John Snow wrote: > Signed-off-by: John Snow > --- > scripts/cpu-x86-uarch-abi.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/scripts/cpu-x86-uarch-abi.py b/scripts/cpu-x86-uarch-abi.py > index 8963d90f0b..c262d2f027 10064

[PATCH qemu] s390x/css: fix PMCW invalid mask

2021-12-16 Thread Nico Boehr
Previously, we required bits 5, 6 and 7 to be zero (0x07 == 0b111). But, as per the principles of operation, bit 5 is ignored in MSCH and bits 0, 1, 6 and 7 need to be zero. As both PMCW_FLAGS_MASK_INVALID and ioinst_schib_valid() are only used by ioinst_handle_msch(), adjust the mask accordingly.

Re: [PATCH v2 12/25] python/machine: permanently switch to AQMP

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:26PM -0500, John Snow wrote: > Remove the QEMU_PYTHON_LEGACY_QMP environment variable, making the > switch permanent. Update Exceptions and import paths as necessary. > > Signed-off-by: John Snow > --- > python/qemu/machine/machine.py | 18 +++--- > pyth

Re: [PATCH v2 16/25] scripts/bench-block-job: switch to AQMP

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:30PM -0500, John Snow wrote: > For this commit, we only need to remove accommodations for the > synchronous QMP library. > > Signed-off-by: John Snow > --- > scripts/simplebench/bench_block_job.py | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff -

Re: [PATCH v2 15/25] scripts/render-block-graph: switch to AQMP

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:29PM -0500, John Snow wrote: > Creating an instance of qemu.aqmp.ExecuteError is too involved here, so > just drop the specificity down to a generic AQMPError. > > Signed-off-by: John Snow > --- > scripts/render_block_graph.py | 8 +++- > 1 file changed, 3 inser

Re: [PATCH v2 17/25] iotests/mirror-top-perms: switch to AQMP

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:31PM -0500, John Snow wrote: > Signed-off-by: John Snow > > --- > > Note: I still need to adjust the logging. The problem now is that the > logging messages include the PID of the test process, so they need to be > filtered out. I'll investigate that for a follow-up

Re: [PATCH v6 4/8] tests/unit/test-smp-parse: Add 'smp-generic-invalid' machine type

2021-12-16 Thread wangyanan (Y)
On 2021/12/16 21:20, Philippe Mathieu-Daudé wrote: Avoid modifying the MachineClass internals by adding the 'smp-generic-invalid' machine, which inherits from TYPE_MACHINE. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-smp-parse.c | 25 +++

Re: [PATCH v6 5/8] tests/unit/test-smp-parse: Add 'smp-generic-valid' machine type

2021-12-16 Thread wangyanan (Y)
On 2021/12/16 21:20, Philippe Mathieu-Daudé wrote: Keep the common TYPE_MACHINE class initialization in machine_base_class_init(), make it abstract, and move the non-common code to a new class: "smp-generic-valid". Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- te

Re: [PATCH v2 18/25] iotests: switch to AQMP

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:32PM -0500, John Snow wrote: > Simply import the type defition from the new location. > > Signed-off-by: John Snow > --- > tests/qemu-iotests/iotests.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/qemu-iotests/iotests.py b/tests/q

Re: [PATCH v5 09/31] block: introduce assert_bdrv_graph_writable

2021-12-16 Thread Hanna Reitz
On 14.12.21 20:48, Emanuele Giuseppe Esposito wrote: On 10/12/2021 18:43, Hanna Reitz wrote: On 24.11.21 07:43, Emanuele Giuseppe Esposito wrote: We want to be sure that the functions that write the child and parent list of a bs are under BQL and drain. BQL prevents from concurrent writings

Re: [PATCH v5 05/31] block-backend: special comments for blk_set/get_perm due to fuse

2021-12-16 Thread Hanna Reitz
On 15.12.21 11:13, Emanuele Giuseppe Esposito wrote: On 15/12/2021 09:57, Emanuele Giuseppe Esposito wrote: On 10/12/2021 15:38, Hanna Reitz wrote: On 24.11.21 07:43, Emanuele Giuseppe Esposito wrote: Fuse logic can be classified as I/O, so there is no BQL held during its execution. And ye

Re: [PATCH v4 03/10] hw/core/machine: Wrap target specific parameters together

2021-12-16 Thread wangyanan (Y)
Hi, On 2021/12/16 21:23, Philippe Mathieu-Daudé wrote: On 11/21/21 13:24, Yanan Wang wrote: Wrap the CPU target specific parameters together into a single variable, so that we don't need to update the other lines but a single line when new topology parameters are introduced. Where new params a

Re: [PATCH v2 20/25] python/aqmp: take QMPBadPortError and parse_address from qemu.qmp

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:34PM -0500, John Snow wrote: > Shift these definitions over from the qmp package to the async qmp > package. > > Signed-off-by: John Snow > --- > python/qemu/aqmp/aqmp_tui.py | 2 +- > python/qemu/aqmp/legacy.py | 30 ++ > python/qemu/

Re: [PATCH v4 10/14] vfio-user: handle PCI BAR accesses

2021-12-16 Thread Stefan Hajnoczi
On Wed, Dec 15, 2021 at 10:35:34AM -0500, Jagannathan Raman wrote: > +static ssize_t vfu_object_bar_rw(PCIDevice *pci_dev, hwaddr addr, size_t > count, > + char * const buf, const bool is_write, > + bool is_io) > +{ > +AddressSpac

Re: [PATCH v3 02/28] glib-compat: Introduce g_memdup2() wrapper

2021-12-16 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > When experimenting raising GLIB_VERSION_MIN_REQUIRED to 2.68 > (Fedora 34 provides GLib 2.68.1) we get: > > hw/virtio/virtio-crypto.c:245:24: error: 'g_memdup' is deprecated: Use > 'g_memdup2' instead [-Werror,-Wdeprecated-declarations] > ... > > g_memdup()

[PATCH] tests/tcg/ppc64le: remove INT128 requirement to run non_signalling_xscv

2021-12-16 Thread matheus . ferst
From: Matheus Ferst The values can be passed with registers to the inline assembler and moved to/from the VSR with mtvsrd/mfvsrd. Signed-off-by: Matheus Ferst --- tests/tcg/ppc64le/non_signalling_xscv.c | 27 + 1 file changed, 14 insertions(+), 13 deletions(-) diff --g

Re: [PATCH v2 22/25] python/aqmp: copy qmp docstrings to qemu.aqmp.legacy

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:36PM -0500, John Snow wrote: > Copy the docstrings out of qemu.qmp, adjusting them as necessary to > more accurately reflect the current state of this class. > > Signed-off-by: John Snow > --- > python/qemu/aqmp/legacy.py | 110 ++---

Re: [PATCH v2 23/25] python: remove the old QMP package

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:37PM -0500, John Snow wrote: > Thank you for your service! > > Signed-off-by: John Snow > --- > python/PACKAGE.rst | 4 +- > python/README.rst | 2 +- > python/qemu/qmp/README.rst | 9 - > python/qemu/qmp/__init__.py | 396 -

Re: [PATCH v2 21/25] python/aqmp: fully separate from qmp.QEMUMonitorProtocol

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:35PM -0500, John Snow wrote: > After this patch, qemu.aqmp.legacy.QEMUMonitorProtocol no longer > inherits from qemu.qmp.QEMUMonitorProtocol. To do this, several > inherited methods need to be explicitly re-defined. > > Signed-off-by: John Snow > --- > python/qemu/a

Re: [PATCH v2 24/25] python: re-enable pylint duplicate-code warnings

2021-12-16 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 02:39:38PM -0500, John Snow wrote: > With the old library gone, there's nothing duplicated in the tree, so > the warning suppression can be removed. > > Signed-off-by: John Snow > --- > python/setup.cfg | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/python/setup

Re: [PATCH v4 11/14] vfio-user: IOMMU support for remote device

2021-12-16 Thread Stefan Hajnoczi
On Wed, Dec 15, 2021 at 10:35:35AM -0500, Jagannathan Raman wrote: > Assign separate address space for each device in the remote processes. If I understand correctly this isn't really an IOMMU. It's abusing the IOMMU APIs to create isolated address spaces for each device. This way memory regions a

[RFC PATCH] linux-user: don't adjust base of found hole

2021-12-16 Thread Alex Bennée
The pgb_find_hole function goes to the trouble of taking account of both mmap_min_addr and any offset we've applied to decide the starting address of a potential hole. This is especially important for emulating 32bit ARM in a 32bit build as we have applied the offset to ensure there will be space t

Re: [PATCH v5 10/31] block.c: modify .attach and .detach callbacks of child_of_bds

2021-12-16 Thread Hanna Reitz
On 24.11.21 07:43, Emanuele Giuseppe Esposito wrote: According to the assertions put in the previous patch, we should first drain and then modify the ->children list. In this way we prevent other iothreads to read the list while it is being updated. In this case, moving the drain won't cause any

Re: [PATCH 12/12] s390x/pci: let intercept devices have separate PCI groups

2021-12-16 Thread Matthew Rosato
On 12/16/21 3:15 AM, Pierre Morel wrote: On 12/7/21 22:04, Matthew Rosato wrote: Let's use the reserved pool of simulated PCI groups to allow intercept devices to have separate groups from interpreted devices as some group values may be different. If we run out of simulated PCI groups, subseq

Re: [PATCH v5 03/31] assertions for block global state API

2021-12-16 Thread Hanna Reitz
On 24.11.21 07:43, Emanuele Giuseppe Esposito wrote: All the global state (GS) API functions will check that qemu_in_main_thread() returns true. If not, it means that the safety of BQL cannot be guaranteed, and they need to be moved to I/O. Signed-off-by: Emanuele Giuseppe Esposito --- block.

Re: Redesign of QEMU startup & initial configuration

2021-12-16 Thread Paolo Bonzini
On 12/16/21 11:24, Markus Armbruster wrote: Not really, in particular the startup has been mostly reworked already and I disagree that it is messy. softmmu/vl.c is messy, sure: it has N different command line parser for command line options, magic related to default devices, and complicated orde

Re: [PATCH 07/10] configure: unify x86_64 and x32

2021-12-16 Thread Paolo Bonzini
On 12/16/21 10:10, Philippe Mathieu-Daudé wrote: On 12/16/21 09:51, Paolo Bonzini wrote: The only difference between the two, as far as either configure or Meson are concerned, is in the multilib flags passed to the compiler. For QEMU, this fixes the handling of TYPE_OLDDEVT in include/exec/use

Re: Redesign of QEMU startup & initial configuration

2021-12-16 Thread Daniel P . Berrangé
On Thu, Dec 16, 2021 at 04:28:29PM +0100, Paolo Bonzini wrote: > On 12/16/21 11:24, Markus Armbruster wrote: > > > Not really, in particular the startup has been mostly reworked already > > > and I disagree that it is messy. softmmu/vl.c is messy, sure: it has > > > N different command line parser

Re: [PATCH] e1000: fix tx re-entrancy problem

2021-12-16 Thread Jon Maloy
On 12/16/21 04:36, Philippe Mathieu-Daudé wrote: Hi Jon, On 10/21/21 18:10, Jon Maloy wrote: The fact that the MMIO handler is not re-entrant causes an infinite loop under certain conditions: Guest write to TDT -> Loopback -> RX (DMA to TDT) -> TX We now eliminate the effect of this probl

Re: [PATCH v4 12/14] vfio-user: handle device interrupts

2021-12-16 Thread Stefan Hajnoczi
On Wed, Dec 15, 2021 at 10:35:36AM -0500, Jagannathan Raman wrote: > @@ -62,6 +66,9 @@ void remote_iohub_set_irq(void *opaque, int pirq, int level) > QEMU_LOCK_GUARD(&iohub->irq_level_lock[pirq]); > > if (level) { > +if (iohub->intx_notify) { > +iohub->intx_notify(pi

Re: Redesign of QEMU startup & initial configuration

2021-12-16 Thread Mark Burton
> On 16 Dec 2021, at 16:40, Daniel P. Berrangé wrote: > > On Thu, Dec 16, 2021 at 04:28:29PM +0100, Paolo Bonzini wrote: >> On 12/16/21 11:24, Markus Armbruster wrote: Not really, in particular the startup has been mostly reworked already and I disagree that it is messy. softmmu/vl.

Re: [PATCH v4 08/14] vfio-user: handle PCI config space accesses

2021-12-16 Thread Stefan Hajnoczi
On Thu, Dec 16, 2021 at 11:47:40AM +, John Levon wrote: > On Thu, Dec 16, 2021 at 11:30:20AM +, Stefan Hajnoczi wrote: > > > > +ret = vfu_setup_region(o->vfu_ctx, VFU_PCI_DEV_CFG_REGION_IDX, > > > + pci_config_size(o->pci_dev), > > > &vfu_object_cfg_access, >

Introducing PECI support in Qemu

2021-12-16 Thread Patrick Venture
Hi all; My team has a working PECI bus/device in Qemu, but we only have internal board specifications that enable it. We'd like to upstream it as soon as possible, but obviously we can't enable testing for it without an upstream board that uses it. We only have it attached to Nuvoton 7xx present

Re: [PATCH v5 10/31] block.c: modify .attach and .detach callbacks of child_of_bds

2021-12-16 Thread Emanuele Giuseppe Esposito
On 16/12/2021 15:57, Hanna Reitz wrote: On 24.11.21 07:43, Emanuele Giuseppe Esposito wrote: According to the assertions put in the previous patch, we should first drain and then modify the ->children list. In this way we prevent other iothreads to read the list while it is being updated. In

Re: [PATCH v5 13/31] block.c: add assertions to static functions

2021-12-16 Thread Hanna Reitz
On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: Following the assertion derived from the API split, propagate the assertion also in the static functions. Signed-off-by: Emanuele Giuseppe Esposito --- block.c | 45 - 1 file changed, 44 insertio

Re: [PATCH] docs: Add measurement calculation details to amd-memory-encryption.txt

2021-12-16 Thread Daniel P . Berrangé
On Thu, Dec 16, 2021 at 12:38:34PM +0200, Dov Murik wrote: > > > On 14/12/2021 20:39, Daniel P. Berrangé wrote: > > On Tue, Dec 14, 2021 at 01:59:10PM +, Dov Murik wrote: > >> Add a section explaining how the Guest Owner should calculate the > >> expected guest launch measurement for SEV and

Re: [PATCH v5 10/31] block.c: modify .attach and .detach callbacks of child_of_bds

2021-12-16 Thread Hanna Reitz
On 16.12.21 17:05, Emanuele Giuseppe Esposito wrote: On 16/12/2021 15:57, Hanna Reitz wrote: On 24.11.21 07:43, Emanuele Giuseppe Esposito wrote: According to the assertions put in the previous patch, we should first drain and then modify the ->children list. In this way we prevent other ioth

Re: Redesign of QEMU startup & initial configuration

2021-12-16 Thread Daniel P . Berrangé
On Thu, Dec 16, 2021 at 05:00:55PM +0100, Mark Burton wrote: > > > > On 16 Dec 2021, at 16:40, Daniel P. Berrangé wrote: > > > > On Thu, Dec 16, 2021 at 04:28:29PM +0100, Paolo Bonzini wrote: > >> On 12/16/21 11:24, Markus Armbruster wrote: > Not really, in particular the startup has been

Re: [RFC PATCH v2 01/14] job.c: make job_lock/unlock public

2021-12-16 Thread Stefan Hajnoczi
On Thu, Nov 04, 2021 at 10:53:21AM -0400, Emanuele Giuseppe Esposito wrote: > job mutex will be used to protect the job struct elements and list, > replacing AioContext locks. > > Right now use a shared lock for all jobs, in order to keep things > simple. Once the AioContext lock is gone, we can i

Re: [RFC qemu.qmp PATCH 00/24] Python: Fork qemu.qmp Python lib into independent repo

2021-12-16 Thread John Snow
On Thu, Dec 16, 2021 at 5:41 AM Daniel P. Berrangé wrote: > On Wed, Dec 15, 2021 at 04:06:10PM -0500, John Snow wrote: > > Hi, this series is part of an effort to publish the qemu.qmp package on > > PyPI. It is the second of three series to complete this work: > > > > (1) Switch the new Async

Re: [RFC PATCH v2 02/14] job.h: categorize fields in struct Job

2021-12-16 Thread Stefan Hajnoczi
On Thu, Nov 04, 2021 at 10:53:22AM -0400, Emanuele Giuseppe Esposito wrote: > Categorize the fields in struct Job to understand which ones > need to be protected by the job mutex and which don't. > > Signed-off-by: Emanuele Giuseppe Esposito > --- > include/qemu/job.h | 57 ++

Re: [PATCH v2 00/25] Python: delete synchronous qemu.qmp package

2021-12-16 Thread John Snow
On Thu, Dec 16, 2021 at 5:51 AM Daniel P. Berrangé wrote: > On Wed, Dec 15, 2021 at 02:39:14PM -0500, John Snow wrote: > > GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-qmp-legacy-switch > > CI: https://gitlab.com/jsnow/qemu/-/pipelines/430491195 > > > > Hi, this series is part of an eff

Re: Redesign of QEMU startup & initial configuration

2021-12-16 Thread Mark Burton
>> >> Totally agree on this (of course). >> >> Thats why I’m here - I care about the people who care about emulation :-) >> >> In general, what we are working on is exactly the ability to service the >> ‘complex’ emulation use case. No CLI, nor single ‘config’ file will be good >> enough,

Re: [RFC qemu.qmp PATCH 03/24] Update maintainer metadata

2021-12-16 Thread John Snow
On Thu, Dec 16, 2021 at 5:43 AM Daniel P. Berrangé wrote: > On Wed, Dec 15, 2021 at 04:06:13PM -0500, John Snow wrote: > > I'm the primary author of this particular component; update the metadata > > accordingly. > > > > Signed-off-by: John Snow > > --- > > setup.cfg | 4 +++- > > 1 file change

Re: [PULL 0/8] s390x patches (and one gitlab-CI fix)

2021-12-16 Thread Richard Henderson
On 12/16/21 1:44 AM, Thomas Huth wrote: Hi! The following changes since commit e630bc7ec9dda656a452ed28cac4d1e9ed605d71: Merge tag 'pull-block-2021-12-15' of git://repo.or.cz/qemu/armbru into staging (2021-12-15 12:14:44 -0800) are available in the Git repository at: https://gitlab.c

Re: [PATCH v5 13/31] block.c: add assertions to static functions

2021-12-16 Thread Emanuele Giuseppe Esposito
On 16/12/2021 17:08, Hanna Reitz wrote: On 24.11.21 07:44, Emanuele Giuseppe Esposito wrote: Following the assertion derived from the API split, propagate the assertion also in the static functions. Signed-off-by: Emanuele Giuseppe Esposito ---   block.c | 45 +++

Re: [RFC PATCH v2 03/14] job.h: define locked functions

2021-12-16 Thread Stefan Hajnoczi
On Thu, Nov 04, 2021 at 10:53:23AM -0400, Emanuele Giuseppe Esposito wrote: > /** Returns whether the job is ready to be completed. */ > bool job_is_ready(Job *job); > > +/** Same as job_is_ready(), but assumes job_lock is held. */ > +bool job_is_ready_locked(Job *job); What I see here is that

Re: [RFC PATCH v2 04/14] job.h: define unlocked functions

2021-12-16 Thread Stefan Hajnoczi
On Thu, Nov 04, 2021 at 10:53:24AM -0400, Emanuele Giuseppe Esposito wrote: > All these functions assume that the lock is not held, and acquire > it internally. > > These functions will be useful when job_lock is globally applied, > as they will allow callers to access the job struct fields > with

Re: [RFC PATCH v2 06/14] job.c: make job_event_* functions static

2021-12-16 Thread Stefan Hajnoczi
On Thu, Nov 04, 2021 at 10:53:26AM -0400, Emanuele Giuseppe Esposito wrote: > job_event_* functions can all be static, as they are not used > outside job.c. > > Signed-off-by: Emanuele Giuseppe Esposito > --- > include/qemu/job.h | 6 -- > job.c | 12 ++-- > 2 files cha

Re: [PATCH v2 05/25] python/aqmp: rename AQMPError to QMPError

2021-12-16 Thread John Snow
On Thu, Dec 16, 2021 at 5:09 AM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > 15.12.2021 22:39, John Snow wrote: > > This is in preparation for renaming qemu.aqmp to qemu.qmp. I should have > > done this from this from the very beginning, but it's a convenient time > > to make

Re: [PATCH v2 01/25] python/aqmp: add __del__ method to legacy interface

2021-12-16 Thread John Snow
On Thu, Dec 16, 2021 at 4:31 AM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > 15.12.2021 22:39, John Snow wrote: > > asyncio can complain *very* loudly if you forget to back out of things > > gracefully before the garbage collector starts destroying objects that > > contain liv

Re: [RFC PATCH v2 03/14] job.h: define locked functions

2021-12-16 Thread Vladimir Sementsov-Ogievskiy
16.12.2021 19:48, Stefan Hajnoczi wrote: On Thu, Nov 04, 2021 at 10:53:23AM -0400, Emanuele Giuseppe Esposito wrote: /** Returns whether the job is ready to be completed. */ bool job_is_ready(Job *job); +/** Same as job_is_ready(), but assumes job_lock is held. */ +bool job_is_ready_lock

Re: [PATCH] hw/arm: add control knob to disable kaslr_seed via DTB

2021-12-16 Thread Heinrich Schuchardt
On 12/15/21 13:09, Alex Bennée wrote: Generally a guest needs an external source of randomness to properly enable things like address space randomisation. However in a trusted boot environment where the firmware will cryptographically verify components having random data in the DTB will cause ver

Re: [PATCH v2 02/25] python/aqmp: handle asyncio.TimeoutError on execute()

2021-12-16 Thread John Snow
On Thu, Dec 16, 2021 at 4:51 AM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > 15.12.2021 22:39, John Snow wrote: > > This exception can be injected into any await statement. If we are > > canceled via timeout, we want to clear the pending execution record on > > our way out. >

Re: [PATCH v2 02/25] python/aqmp: handle asyncio.TimeoutError on execute()

2021-12-16 Thread John Snow
On Thu, Dec 16, 2021 at 7:39 AM Beraldo Leal wrote: > On Wed, Dec 15, 2021 at 02:39:16PM -0500, John Snow wrote: > > This exception can be injected into any await statement. If we are > > canceled via timeout, we want to clear the pending execution record on > > our way out. > > > > Signed-off-by

Re: Introducing PECI support in Qemu

2021-12-16 Thread Winiarska, Iwona
On Thu, 2021-12-16 at 08:03 -0800, Patrick Venture wrote: > Hi all; > > My team has a working PECI bus/device in Qemu, but we only have internal board > specifications that enable it.  We'd like to upstream it as soon as possible, > but obviously we can't enable testing for it without an upstream

Re: [PATCH 1/3] ppc: Add QOM interface for machine check injection

2021-12-16 Thread Cédric Le Goater
On 10/13/21 23:40, Cédric Le Goater wrote: From: Nicholas Piggin This implements a machine check injection framework and defines a 'mce' monitor command for ppc. Signed-off-by: Nicholas Piggin [ clg: - moved definition under "hw/ppc/mce.h" - renamed to PPCMceInjection - simpli

Re: [PATCH v2 03/25] python/aqmp: copy type definitions from qmp

2021-12-16 Thread John Snow
On Thu, Dec 16, 2021 at 5:19 AM Daniel P. Berrangé wrote: > On Wed, Dec 15, 2021 at 02:39:17PM -0500, John Snow wrote: > > Copy the remaining type definitions from QMP into the qemu.aqmp.legacy > > module. Now, most users don't need to import anything else but > > qemu.aqmp.legacy. > > I'm probab

Re: [PATCH v2 06/25] python/qemu-ga-client: update instructions to newer CLI syntax

2021-12-16 Thread John Snow
On Thu, Dec 16, 2021 at 5:14 AM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > I had to search a bit through the history to check this ) > > The commit ccd3b3b8112b670f "qemu-option: warn for short-form boolean > options" may be noted here. > > And may be subject changed to "don

<    1   2   3   4   >