[RFC PATCH v3 1/3] hw/intc/arm_gicv3: Check for !MEMTX_OK instead of MEMTX_ERROR

2021-12-15 Thread Philippe Mathieu-Daudé
Quoting Peter Maydell: "These MEMTX_* aren't from the memory transaction API functions; they're just being used by gicd_readl() and friends as a way to indicate a success/failure so that the actual MemoryRegionOps read/write fns like gicv3_dist_read() can log a guest error." We are going

[PULL 098/102] ppc/pnv: Introduce a num_stack class attribute

2021-12-15 Thread Cédric Le Goater
Each PEC device of the POWER9 chip has a predefined number of stacks, equivalent of a root port complex: PEC0 -> 1 stack PEC1 -> 2 stacks PEC2 -> 3 stacks Introduce a class attribute to hold these values and remove the "num-stacks" property. Reviewed-by: Daniel Henrique Barboza Reviewed-b

[RFC PATCH v3 2/3] softmmu/physmem: Simplify flatview_write and address_space_access_valid

2021-12-15 Thread Philippe Mathieu-Daudé
Remove unuseful local 'result' variables. Reviewed-by: Peter Xu Reviewed-by: David Hildenbrand Reviewed-by: Alexander Bulekov Reviewed-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé --- softmmu/physmem.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git

Re: [RFC PATCH v2 3/5] exec/memattrs: Introduce MemTxAttrs::bus_perm field

2021-12-15 Thread Philippe Mathieu-Daudé
On 8/24/21 15:08, Stefan Hajnoczi wrote: > On Mon, Aug 23, 2021 at 06:41:55PM +0200, Philippe Mathieu-Daudé wrote: >> Add the 'direct_access' bit to the memory attributes to restrict >> bus master access to ROM/RAM. >> Have read/write accessors return MEMTX_BUS_ERROR if an access is >> restricted a

Re: [PATCH] hw: Add compat machines for 6.3

2021-12-15 Thread Peter Maydell
On Wed, 15 Dec 2021 at 17:06, Juan Quintela wrote: > > Add 6.2 machine types for arm/i440fx/q35/s390x/spapr. > > Shameless copy of commit > 52e64f5b1f2c81472b57dbad255ab9b00302f10d > from > Yanan Wang > +DEFINE_VIRT_MACHINE_AS_LATEST(6, 3) There is no 6.3 -- the next release (be

Re: [PATCH] target/rx: Correctly set Error Summary bit in set_fpsw() helper

2021-12-15 Thread Richard Henderson
On 12/15/21 4:43 AM, Philippe Mathieu-Daudé wrote: FIELD_DP32() does not update its first argument, so the Floating-Point Error Summary Flag (FS, summary of FV/FO/FZ/FU bits) is never updated to the Floating-Point Status Word (FPSW). Fix by assigning FIELD_DP32() returned value to env->fpsw. Fix

Re: [PULL 00/16] qtest and gitlab-CI improvements

2021-12-15 Thread Richard Henderson
On 12/14/21 11:33 PM, Thomas Huth wrote: Hi! The following changes since commit 76b56fdfc9fa43ec6e5986aee33f108c6c6a511e: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2021-12-14 12:46:18 -0800) are available in the Git repository at: https://gitlab

Re: [RFC PATCH v2 3/5] exec/memattrs: Introduce MemTxAttrs::bus_perm field

2021-12-15 Thread Philippe Mathieu-Daudé
On 8/23/21 21:04, David Hildenbrand wrote: > On 23.08.21 20:41, Peter Xu wrote: >> On Mon, Aug 23, 2021 at 06:41:55PM +0200, Philippe Mathieu-Daudé wrote: >>> +/* Permission to restrict bus memory accesses. See >>> MemTxAttrs::bus_perm */ >>> +enum { >>> +    MEMTXPERM_UNSPECIFIED   = 0, >>> +    M

Re: [PATCH] linux-user: Remove the deprecated ppc64abi32 target

2021-12-15 Thread Cédric Le Goater
On 12/15/21 09:49, Thomas Huth wrote: It's likely broken, and nobody cared for picking it up again during the deprecation phase, so let's remove this now. Since this is the last entry in deprecated_targets_list, remove the related code in the configure script, too. Signed-off-by: Thomas Huth

Re: [PATCH v11 06/10] ACPI ERST: build the ACPI ERST table

2021-12-15 Thread Eric DeVolder
Hi Ani, Thanks for such quick feedback! One inline response below. eric On 12/15/21 10:33, Ani Sinha wrote: On Wed, Dec 15, 2021 at 9:08 PM Eric DeVolder wrote: This builds the ACPI ERST table to inform OSPM how to communicate with the acpi-erst device. Signed-off-by: Eric DeVolder --- hw

Re: [PATCH v11 06/10] ACPI ERST: build the ACPI ERST table

2021-12-15 Thread Ani Sinha
On Wed, Dec 15, 2021 at 23:27 Eric DeVolder wrote: > Hi Ani, > Thanks for such quick feedback! One inline response below. > eric > > On 12/15/21 10:33, Ani Sinha wrote: > > On Wed, Dec 15, 2021 at 9:08 PM Eric DeVolder > wrote: > >> > >> This builds the ACPI ERST table to inform OSPM how to comm

Re: [RFC PATCH] docs/devel: update C standard to C11

2021-12-15 Thread Richard Henderson
On 12/15/21 7:20 AM, Alex Bennée wrote: Since 8a9d3d5640 (configure: Use -std=gnu11) we have allowed C11 code so lets reflect that in the style guide. Signed-off-by: Alex Bennée --- docs/devel/style.rst | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/devel/st

[RFC PATCH v3 0/3] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-12-15 Thread Philippe Mathieu-Daudé
This series aim to kill a recent class of bug, the infamous "DMA reentrancy" issues found by Alexander while fuzzing. Introduce the 'memory' field in MemTxAttrs, allowing to restrict a controller to memories (and not devices). If a transaction permission is not allowed (for example access to devi

[RFC PATCH v3 3/3] softmmu/physmem: Introduce MemTxAttrs::memory field and MEMTX_BUS_ERROR

2021-12-15 Thread Philippe Mathieu-Daudé
Add the 'memory' bit to the memory attributes to restrict bus controller accesses to memories. Introduce flatview_access_allowed() to check bus permission before running any bus transaction. Have read/write accessors return MEMTX_BUS_ERROR if an access is restricted. There is no change for the d

Re: [PATCH 1/1] pcie: Do not set power state for some hot-plugged devices

2021-12-15 Thread Annie.li
On 12/15/2021 1:05 AM, Gerd Hoffmann wrote: On Tue, Dec 14, 2021 at 09:53:12PM +, Annie Li wrote: After the PCIe device is hot-plugged, the device's power state is initialized as ON. However, the device isn't powered on yet, i.e. the PCI_EXP_SYSCTL_PCC bit isn't set to PCI_EXP_SLTCTL_PWR_O

Re: Redesign of QEMU startup & initial configuration

2021-12-15 Thread Daniel P . Berrangé
On Wed, Dec 15, 2021 at 07:46:37PM +0100, Paolo Bonzini wrote: > On 12/13/21 19:53, Daniel P. Berrangé wrote: > > > Adding vhost-user backends and helper processes means one of two things: > > > either you are not going to support hotplug, or you are going to redo > > > libvirtd with a QMP-based RP

Re: [PULL 00/18] Migration 20211214 patches

2021-12-15 Thread Richard Henderson
On 12/15/21 2:32 AM, Juan Quintela wrote: The following changes since commit 76b56fdfc9fa43ec6e5986aee33f108c6c6a511e: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2021-12-14 12:46:18 -0800) are available in the Git repository at: https://gitlab.com/j

Re: Redesign of QEMU startup & initial configuration

2021-12-15 Thread Paolo Bonzini
On 12/13/21 19:53, Daniel P. Berrangé wrote: Adding vhost-user backends and helper processes means one of two things: either you are not going to support hotplug, or you are going to redo libvirtd with a QMP-based RPC. If it were possible to keep auto-spawning of helpers at the high level that

Re: [PATCH] hw: Add compat machines for 6.3

2021-12-15 Thread Peter Maydell
On Wed, 15 Dec 2021 at 17:13, Juan Quintela wrote: > I got confused with the version number on the tree. Yeah, the VERSION numbering is a bit odd: VERSION tag 6.2.0 v6.2.0 6.2.50none, development tree before next release 6.2.90v7.0.0-rc0 6.2.91v7.0.0-rc1 6.2.92v7.0.0-r

Re: [PATCH] migration: Report the error returned when save_live_iterate fails

2021-12-15 Thread Dr. David Alan Gilbert
* David Edmondson (david.edmond...@oracle.com) wrote: > Should qemu_savevm_state_iterate() encounter a failure when calling a > particular save_live_iterate function, report the error code returned > by the function. > > Signed-off-by: David Edmondson > --- > migration/savevm.c | 5 +++-- > 1 fi

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

2021-12-15 Thread John Snow
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 effort to publish the qemu.qmp package on PyPI. It is the first of three series to complete this work: --> (1) Switch the new Async QMP li

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

2021-12-15 Thread John Snow
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 aqmp.disconnect(), but for the sake of the legacy wrapper and quick, one

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

2021-12-15 Thread John Snow
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/aqmp/__init__.py b/python/qemu/aqmp/__init__.py index 880d5b6fa7..c6fa2dda58 1

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

2021-12-15 Thread John Snow
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 sure this churn is taken care of. Signed-off-by: John Snow --- python/qemu/aqmp/__init__.py | 6 +++--- python/qemu/aqmp/error.py | 12

[PATCH v2 09/25] python/qmp: switch qmp-shell to AQMP

2021-12-15 Thread John Snow
We have a replacement for async QMP, but it doesn't have feature parity yet. For now, then, port the old tool onto the new backend. Signed-off-by: John Snow --- python/qemu/aqmp/legacy.py | 3 +++ python/qemu/qmp/qmp_shell.py | 31 +-- 2 files changed, 20 insertion

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

2021-12-15 Thread John Snow
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 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/qe

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

2021-12-15 Thread John Snow
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.py index b3e1d98c9e..15ed430c61 100644 --- a/python/qemu/qmp/qemu_ga_clie

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

2021-12-15 Thread John Snow
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. Signed-off-by: John Snow --- python/qemu/aqmp/legacy.py | 22 -- python/qemu/aqmp/protocol.py | 16 ++-- 2 fil

[PATCH v2 13/25] scripts/cpu-x86-uarch-abi: fix CLI parsing

2021-12-15 Thread John Snow
Signed-off-by: John Snow --- scripts/cpu-x86-uarch-abi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/cpu-x86-uarch-abi.py b/scripts/cpu-x86-uarch-abi.py index 08acc52a81..8963d90f0b 100644 --- a/scripts/cpu-x86-uarch-abi.py +++ b/scripts/cpu-x86-uarch-abi.py @@

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

2021-12-15 Thread John Snow
Signed-off-by: John Snow --- python/qemu/qmp/qemu_ga_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/qemu/qmp/qemu_ga_client.py b/python/qemu/qmp/qemu_ga_client.py index 67ac0b4211..b3e1d98c9e 100644 --- a/python/qemu/qmp/qemu_ga_client.py +++ b/python/qemu/q

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

2021-12-15 Thread John Snow
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/python/qemu/qmp/qom.py b/python/qemu/qmp/qom.py index 8ff28a8343..bb5d1a78

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

2021-12-15 Thread John Snow
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/qemu-iotests/iotests.py index 83bfedb902..cb21aebe36 100644 --- a/tests/qemu

[PATCH v2 10/25] python: move qmp utilities to python/qemu/utils

2021-12-15 Thread John Snow
In order to upload a QMP package to PyPI, I want to remove any scripts that I am not 100% confident I want to support upstream, beyond our castle walls. Move most of our QMP utilities into the utils package so we can split them out from the PyPI upload. Signed-off-by: John Snow --- python/qemu/

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

2021-12-15 Thread John Snow
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 100644 --- a/scripts/cpu-x86-uarch-abi.py +++ b/scripts/cpu-x86-uarch-abi.py @

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

2021-12-15 Thread John Snow
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 python/qemu/qmp/py.typed| 0 python/setup.cfg

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

2021-12-15 Thread John Snow
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 +++--- python/qemu/machine/qtest.py | 2 +- 2 files changed, 8 insertions(+), 12

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

2021-12-15 Thread John Snow
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 changed, 3 insertions(+), 3 deletions(-) rename python/qemu/{qmp => aqmp}/

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

2021-12-15 Thread John Snow
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 insertions(+), 5 deletions(-) diff --git a/scripts/render_block_graph.py b/sc

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

2021-12-15 Thread John Snow
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 --git a/scripts/simplebench/bench_block_job.py b/scripts/simplebench/bench_bl

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

2021-12-15 Thread John Snow
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, or for v2. I could just add yet another filtering function somewhere,

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

2021-12-15 Thread John Snow
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/aqmp/legacy.py | 38 -- 1 file changed

[PATCH v2 19/25] python: temporarily silence pylint duplicate-code warnings

2021-12-15 Thread John Snow
The next several commits copy some code from qemu.qmp to qemu.aqmp, then delete qemu.qmp. In the interim, to prevent test failures, the duplicate code detection needs to be silenced to prevent bisect problems with CI testing. Signed-off-by: John Snow --- python/setup.cfg | 1 + 1 file changed, 1

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

2021-12-15 Thread John Snow
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.cfg b/python/setup.cfg index 5140a5b322..c341e922c2 100644 --- a/python/setu

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

2021-12-15 Thread John Snow
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/qmp/__init__.py | 26 -- 3 files changed, 27 inser

Re: Redesign of QEMU startup & initial configuration

2021-12-15 Thread Paolo Bonzini
On 12/14/21 12:48, Markus Armbruster wrote: Let's start with where we (hopefully) agree: More or less I do agree with this, except for a couple points below where I think we disagree. * We need a single, cohesive, low-level interface suitable for management applications. * The existing

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

2021-12-15 Thread John Snow
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 ++--- 1 file changed, 102 insertions(+), 8 deletions(-) diff --git a/python

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

2021-12-15 Thread John Snow
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 not. The trade-off is increased confus

Re: [PATCH for-7.0 v2] target/ppc: do not silence SNaN in xscvspdpn

2021-12-15 Thread Cédric Le Goater
On 12/15/21 18:11, Matheus K. Ferst wrote: On 15/12/2021 13:53, Cédric Le Goater wrote: On 12/14/21 15:44, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst The non-signalling versions of VSX scalar convert to shorter/longer precision insns doesn't silence SNaNs in the hardware. To bet

Re: [RFC PATCH] target/ppc: do not silence snan in xscvspdpn

2021-12-15 Thread Matheus K. Ferst
On 15/12/2021 12:55, Alex Bennée wrote: Philippe Mathieu-Daudé writes: On 12/13/21 21:15, Matheus K. Ferst wrote: On 13/12/2021 09:36, Philippe Mathieu-Daudé wrote: On 12/13/21 13:13, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst The non-signalling versions of VSX scalar conver

Re: [PULL 00/33] target-arm queue

2021-12-15 Thread Richard Henderson
021-12-14 12:46:18 -0800) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20211215 for you to fetch changes up to aed176558806674d030a8305d989d4e6a5073359: tests/acpi: add expected blob for VIOT test on virt machine (2021-

Re: Redesign of QEMU startup & initial configuration

2021-12-15 Thread Mark Burton
FWIW I Agree. (Which probably means somethings hiding somewhere :-) ) Cheers Mark. > On 15 Dec 2021, at 21:00, Paolo Bonzini wrote: > > On 12/14/21 12:48, Markus Armbruster wrote: >> Let's start with where we (hopefully) agree: > > More or less I do agree with this, except for a couple poin

[PULL 00/13] Misc patches for 2021-12-15

2021-12-15 Thread Paolo Bonzini
The following changes since commit 50456a6794fbb8dc94a31eb9534e91c586da7add: Merge tag 'pull-ppc-20211129' of https://github.com/legoater/qemu into staging (2021-11-29 21:56:06 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to f

[PULL 02/13] tests/qtest: Add fuzz-lsi53c895a-test

2021-12-15 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Without the previous commit, this test triggers: $ make check-qtest-x86_64 [...] Running test qtest-x86_64/fuzz-lsi53c895a-test qemu-system-x86_64: hw/scsi/lsi53c895a.c:624: lsi_do_dma: Assertion `s->current' failed. ERROR qtest-x86_64/fuzz-lsi53c895a-test

[PULL 07/13] gdbstub: reject unsupported flags in handle_set_qemu_sstep

2021-12-15 Thread Paolo Bonzini
From: Maxim Levitsky handle_query_qemu_sstepbits is reporting NOIRQ and NOTIMER bits even if they are not supported (as is the case with record/replay). Instead, store the supported singlestep flags and reject any unsupported bits in handle_set_qemu_sstep. This removes the need for the get_sstep

[PULL 08/13] gdbstub, kvm: let KVM report supported singlestep flags

2021-12-15 Thread Paolo Bonzini
From: Maxim Levitsky Signed-off-by: Maxim Levitsky [Extracted from Maxim's patch into a separate commit. - Paolo] Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée Message-Id: <2021110604.207376-5-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 12 +++

[PULL 12/13] doc: Add the SGX numa description

2021-12-15 Thread Paolo Bonzini
From: Yang Zhong Add the SGX numa reference command and how to check if SGX numa is support or not with multiple EPC sections. Signed-off-by: Yang Zhong Message-Id: <20211101162009.62161-5-yang.zh...@intel.com> Signed-off-by: Paolo Bonzini --- docs/system/i386/sgx.rst | 31 +++

[PULL 10/13] numa: Enable numa for SGX EPC sections

2021-12-15 Thread Paolo Bonzini
From: Yang Zhong The basic SGX did not enable numa for SGX EPC sections, which result in all EPC sections located in numa node 0. This patch enable SGX numa function in the guest and the EPC section can work with RAM as one numa node. The Guest kernel related log: [0.009981] ACPI: SRAT: Node

[PULL 03/13] qapi/machine.json: Fix incorrect description for die-id

2021-12-15 Thread Paolo Bonzini
From: Yanan Wang In terms of scope, die-id should mean "the die number within socket the CPU belongs to" instead of "the die number within node/board the CPU belongs to". Fix it to avoid confusing the Doc reader. Fixes: 176d2cda0d ("i386/cpu: Consolidate die-id validity in smp context") Signed-o

[PULL 01/13] hw/scsi/lsi53c895a: Do not abort when DMA requested and no data queued

2021-12-15 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé If asked for DMA request and no data is available, simply wait for data to be queued, do not abort. This fixes: $ cat << EOF | \ qemu-system-i386 -nographic -M q35,accel=qtest -serial none \ -monitor none -qtest stdio -trace lsi* \ -drive if=none,id

[PULL 04/13] scripts/entitlement.sh: Use backward-compatible cp flags

2021-12-15 Thread Paolo Bonzini
From: Evan Miller Older versions of Mac OS X do not support cp -a. The cp man page indicates that -a is equivalent to -pPR. Signed-off-by: Evan Miller Message-Id: <40635c6e-059a-4146-b1e2-f6376700e...@gmail.com> [Leave out -R, these are files and not directories. - Paolo] Signed-off-by: Paolo B

[PULL 05/13] virtio-gpu: do not byteswap padding

2021-12-15 Thread Paolo Bonzini
In Linux 5.16, the padding of struct virtio_gpu_ctrl_hdr has become a single-byte field followed by a uint8_t[3] array of padding bytes, and virtio_gpu_ctrl_hdr_bswap does not compile anymore. Signed-off-by: Paolo Bonzini Acked-by: Cornelia Huck Reviewed-by: Alex Bennée Reviewed-by: Michael S.

[PULL 06/13] linux-headers: update to 5.16-rc1

2021-12-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini Acked-by: Cornelia Huck Reviewed-by: Alex Bennée Message-Id: <2021110604.207376-3-pbonz...@redhat.com> Signed-off-by: Paolo Bonzini --- include/standard-headers/drm/drm_fourcc.h | 121 +- include/standard-headers/linux/ethtool.h | 31 +

[PULL 09/13] kvm: add support for KVM_GUESTDBG_BLOCKIRQ

2021-12-15 Thread Paolo Bonzini
From: Maxim Levitsky Use the KVM_GUESTDBG_BLOCKIRQ debug flag if supported. Signed-off-by: Maxim Levitsky [Extracted from Maxim's patch into a separate commit. - Paolo] Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <2021110604.20737

[PULL 11/13] numa: Support SGX numa in the monitor and Libvirt interfaces

2021-12-15 Thread Paolo Bonzini
From: Yang Zhong Add the SGXEPCSection list into SGXInfo to show the multiple SGX EPC sections detailed info, not the total size like before. This patch can enable numa support for 'info sgx' command and QMP interfaces. The new interfaces show each EPC section info in one numa node. Libvirt can u

[PULL 13/13] configure: remove dead variables

2021-12-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 5 - 1 file changed, 5 deletions(-) diff --git a/configure b/configure index 48c21775f3..d3aac031a5 100755 --- a/configure +++ b/configure @@ -626,7 +626,6 @@ fi case $targetos in MINGW32*) mingw32="yes" - supported_os="yes" plugins="no"

Re: [PULL 00/16] qtest and gitlab-CI improvements

2021-12-15 Thread Thomas Huth
On 15/12/2021 18.14, Richard Henderson wrote: On 12/14/21 11:33 PM, Thomas Huth wrote:   Hi! The following changes since commit 76b56fdfc9fa43ec6e5986aee33f108c6c6a511e:    Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2021-12-14 12:46:18 -0800) are availa

[PATCH 0/3] hw/sd/sdhci: Fix DMA re-entrancy issue

2021-12-15 Thread Philippe Mathieu-Daudé
Hi, This series is an attempt to fix the DMA re-entrancy problem on the SDHCI device. OSS-Fuzz found it and Alexander generated a helpful reproducer. By setting the MemTxAttrs::memory bit before doing DMA transactions, the flatview API will return MEMTX_BUS_ERROR if the transaction targets a non-

Re: [PATCH 0/3] hw/sd/sdhci: Fix DMA re-entrancy issue

2021-12-15 Thread Philippe Mathieu-Daudé
On 12/15/21 21:55, Philippe Mathieu-Daudé wrote: > Hi, > > This series is an attempt to fix the DMA re-entrancy problem > on the SDHCI device. OSS-Fuzz found it and Alexander generated > a helpful reproducer. > > By setting the MemTxAttrs::memory bit before doing DMA transactions, > the flatview

[RFC PATCH 1/3] hw/sd/sdhci: Honor failed DMA transactions

2021-12-15 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé DMA transactions might fail. The DMA API returns a MemTxResult, indicating such failures. Do not ignore it. On failure, raise the ADMA error flag and eventually triggering an IRQ (see spec chapter 1.13.5: "ADMA2 States"). Signed-off-by: Philippe Mathieu-Daudé --- h

[RFC PATCH 0/3] hw/sd/sdhci: Fix DMA re-entrancy issue

2021-12-15 Thread Philippe Mathieu-Daudé
Hi, This series is an attempt to fix the DMA re-entrancy problem on the SDHCI device. OSS-Fuzz found it and Alexander generated a helpful reproducer. By setting the MemTxAttrs::memory bit before doing DMA transactions, the flatview API will return MEMTX_BUS_ERROR if the transaction targets a non-

[RFC PATCH 2/3] hw/sd/sdhci: Prohibit DMA accesses to devices

2021-12-15 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé The issue reported by OSS-Fuzz produces the following backtrace: ==447470==ERROR: AddressSanitizer: heap-buffer-overflow READ of size 1 at 0x6152a080 thread T0 #0 0x71766d47 in sdhci_read_dataport hw/sd/sdhci.c:474:18 #1 0x7175f139 in sdhci_read h

[RFC PATCH 3/3] tests/qtest/fuzz-sdcard-test: Add reproducer for OSS-Fuzz (Issue 29225)

2021-12-15 Thread Philippe Mathieu-Daudé
Include the qtest reproducer provided by Alexander Bulekov in https://gitlab.com/qemu-project/qemu/-/issues/451. Without the previous commit, we get: $ make check-qtest-i386 ... Running test qtest-i386/fuzz-sdcard-test ==447470==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6

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

2021-12-15 Thread John Snow
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 QMP library in to python/qemu/qmp --> (2) Fork python/qemu/qmp out into its own repository, with updated GitLab CI/CD targets t

[RFC qemu.qmp PATCH 01/24] Fork qemu.qmp from qemu.git

2021-12-15 Thread John Snow
Split python/ from qemu.git, using these commands: > git subtree split -P python/ -b python-split-v2 > mkdir ~/src/tmp > cd ~/src/tmp > git clone --no-local --branch python-split-v2 --single-branch ~/src/qemu > cd qemu > git filter-repo --path qemu/machine/ \ --path qem

[RFC qemu.qmp PATCH 10/24] Add build and test container to gitlab CI configuration

2021-12-15 Thread John Snow
Heavily copy-pasted from the QEMU source tree, with bits and pieces not needed for this repository trimmed down. Signed-off-by: John Snow --- .gitlab-ci.d/containers.yml| 28 .gitlab-ci.d/index.yml | 8 .gitlab-ci.d/python.Dockerfile | 31 ++

[RFC qemu.qmp PATCH 06/24] Move README.rst to INDEX.rst and update

2021-12-15 Thread John Snow
The intent is to use README.rst as the new package-level readme that will be bundled with the source; so move the old "git level readme" over to INDEX.rst instead, and update it accordingly. This is primarily here to just document and explain what all the little bits and pieces of files in the roo

[RFC qemu.qmp PATCH 02/24] Update VERSION to 0.0.0a1

2021-12-15 Thread John Snow
qemu.qmp will be independently versioned, without regard to QMP version. While the repo is being established here, set the version to something impossibly low. Signed-off-by: John Snow --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index c19f3b8

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

2021-12-15 Thread John Snow
I'm the primary author of this particular component; update the metadata accordingly. Signed-off-by: John Snow --- setup.cfg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index bca..7cd8470 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,9 @@

[RFC qemu.qmp PATCH 05/24] Update project URLs

2021-12-15 Thread John Snow
Point to this library's URLs instead of the entire project's. FIXME: In development, the URLs here are jsnow/qemu.qmp. It is intended that the production version that gets pushed to qemu-project/qemu.qmp will use URLs that reflect that repository appropriately. Signed-off-by: John Snow --- setu

[RFC qemu.qmp PATCH 12/24] GitLab CI: Add check-dco script

2021-12-15 Thread John Snow
Borrowed with minor modifications from qemu.git. Signed-off-by: John Snow --- .gitlab-ci.d/check-dco.py | 98 +++ .gitlab-ci.d/index.yml| 2 + .gitlab-ci.d/test.yml | 15 ++ 3 files changed, 115 insertions(+) create mode 100755 .gitlab-ci.d/check

[RFC qemu.qmp PATCH 09/24] Remove sub-dependency pins from Pipfile

2021-12-15 Thread John Snow
Now that we've got a Pipfile.lock generated that works, we can remove the static pins from the Pipfile to allow various dependencies to be added or removed as necessary when updating our direct dependencies in the future. So long as --keep-outdated is always passed to Pipenv, items that aren't abs

[RFC qemu.qmp PATCH 04/24] Update project description

2021-12-15 Thread John Snow
Signed-off-by: John Snow --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 7cd8470..9946875 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,7 +7,7 @@ maintainer = QEMU Project maintainer_email = qemu-devel@nongnu.org url = https://www.qem

[RFC qemu.qmp PATCH 08/24] Update Pipfile.lock

2021-12-15 Thread John Snow
The name of the package has changed, and the dependencies are different now as well. Re-do the Pipfile. This is a little annoying, but Python doesn't offer any tool that behaves in a manner that gives you the *oldest* but still adequate versions of dependencies. So, I'm doing this manually: pin e

[RFC qemu.qmp PATCH 07/24] Move PACKAGE.rst to README.rst and update

2021-12-15 Thread John Snow
The README here will reflect both what is shown on GitLab and on the PyPI landing page. Update it accordingly. Signed-off-by: John Snow --- INDEX.rst | 2 +- MANIFEST.in | 2 +- PACKAGE.rst | 43 -- README.rst | 129 se

[RFC qemu.qmp PATCH 14/24] GitLab CI: Add avocado junit XML output to tests

2021-12-15 Thread John Snow
Signed-off-by: John Snow --- .gitlab-ci.d/test.yml | 16 Makefile | 1 + avocado.cfg | 7 +++ 3 files changed, 24 insertions(+) diff --git a/.gitlab-ci.d/test.yml b/.gitlab-ci.d/test.yml index 19e0c37..3b2a142 100644 --- a/.gitlab-ci.d/test.yml +++ b

[RFC qemu.qmp PATCH 11/24] Add package build step to GitLab CI

2021-12-15 Thread John Snow
Signed-off-by: John Snow --- .gitlab-ci.d/build.yml | 13 + .gitlab-ci.d/index.yml | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 .gitlab-ci.d/build.yml diff --git a/.gitlab-ci.d/build.yml b/.gitlab-ci.d/build.yml new file mode 100644 index 000..6a68408 --- /dev/n

[RFC qemu.qmp PATCH 17/24] Makefile: add build and publish targets

2021-12-15 Thread John Snow
Signed-off-by: John Snow --- Makefile | 32 1 file changed, 32 insertions(+) diff --git a/Makefile b/Makefile index 97d737a..81bfca8 100644 --- a/Makefile +++ b/Makefile @@ -110,3 +110,35 @@ distclean: clean rm -f .coverage .coverage.* rm -rf html

[RFC qemu.qmp PATCH 13/24] GitLab CI: Add pipenv and tox tests

2021-12-15 Thread John Snow
FIXME: For testing purposes, this patch is still using my personal GitLab URLs, which will have to be changed before this is pushed to production. Signed-off-by: John Snow --- .gitlab-ci.d/test.yml | 43 +++ 1 file changed, 43 insertions(+) diff --git a/.

[RFC qemu.qmp PATCH 18/24] add Sphinx documentation config stub

2021-12-15 Thread John Snow
This is the result of this command: sphinx-apidoc --separate \ --no-toc \ --module-first \ --implicit-namespaces \ --full \ --ext-intersphinx \ --ext-coverage \ --ext-viewcode \ -o docs/

[RFC qemu.qmp PATCH 21/24] Fix doc cross-reference regressions

2021-12-15 Thread John Snow
Before enabling docs building as a CI step, lingering cross-reference failures need to be addressed. Signed-off-by: John Snow --- qemu/qmp/legacy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/qmp/legacy.py b/qemu/qmp/legacy.py index 6c250cd..8e976f9 100644 --- a

[RFC qemu.qmp PATCH 23/24] docs: add doc build to GitLab CI build step

2021-12-15 Thread John Snow
Signed-off-by: John Snow --- .gitlab-ci.d/build.yml | 1 + .gitlab-ci.d/python.Dockerfile | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.gitlab-ci.d/build.yml b/.gitlab-ci.d/build.yml index bf2d487..5634173 100644 --- a/.gitlab-ci.d/build.yml +++ b/.gitlab-ci.d/build.yml @@ -4,6

[RFC qemu.qmp PATCH 15/24] GitLab CI: Publish python packages to GitLab package repo

2021-12-15 Thread John Snow
Signed-off-by: John Snow --- .gitlab-ci.d/index.yml | 2 ++ .gitlab-ci.d/publish.yml | 11 +++ .gitlab-ci.d/python.Dockerfile | 1 + 3 files changed, 14 insertions(+) create mode 100644 .gitlab-ci.d/publish.yml diff --git a/.gitlab-ci.d/index.yml b/.gitlab-ci.d/index.yml

[RFC qemu.qmp PATCH 16/24] Add setuptools_scm package versioning

2021-12-15 Thread John Snow
The version number will now be generated using the setuptools_scm package, which pulls the version number from git tags. As PEP660 is not yet usable with pyproject.toml style packages, we will be sticking to setup.py style installation for now. "version = 0.0.0" exists as a fallback in the event

[RFC qemu.qmp PATCH 22/24] docs: add Makefile target

2021-12-15 Thread John Snow
Signed-off-by: John Snow --- Makefile | 5 + 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 81bfca8..029a824 100644 --- a/Makefile +++ b/Makefile @@ -103,6 +103,7 @@ check-coverage: clean: python3 setup.py clean --all rm -f pyproject.toml + make

[RFC qemu.qmp PATCH 20/24] python: adjust apidoc stubs

2021-12-15 Thread John Snow
Change the configuration for the generated apidoc stubs. Some of the changes, as a summary: - Collapse the hierarchy to omit the QEMU namespace page - Add more meaningful titles to the subpackages - Prefer source ordering in most places - Do not index pages that do not define their own symbols (v

[RFC qemu.qmp PATCH 24/24] v0.0.1

2021-12-15 Thread John Snow
Add v0.0.1 tag, marking the first public alpha release of the qemu.qmp package. --- README.rst | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index bd4a301..e82ac03 100644 --- a/README.rst +++ b/README.rst @@ -126,4 +126,7 @@ locally before submitti

Re: [PATCH v3] monitor: move x-query-profile into accel/tcg to fix build

2021-12-15 Thread Mark Cave-Ayland
On 15/12/2021 14:04, Alex Bennée wrote: As --enable-profiler isn't defended in CI we missed this breakage. Move the qmp handler into accel/tcg so we have access to the helpers we need. While we are at it ensure we gate the feature on CONFIG_TCG. Signed-off-by: Alex Bennée Suggested-by: Daniel

[RFC qemu.qmp PATCH 19/24] python: configure sphinx

2021-12-15 Thread John Snow
With a Sphinx project auto-generated, configure it to be something a bit more useful. And pretty. Signed-off-by: John Snow --- docs/conf.py | 45 - 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index c7ce779

Re: [PATCH v4 02/14] tests/avocado: Specify target VM argument to helper routines

2021-12-15 Thread Beraldo Leal
On Wed, Dec 15, 2021 at 10:35:26AM -0500, Jagannathan Raman wrote: > Specify target VM for exec_command and > exec_command_and_wait_for_pattern routines > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > tests/avocado/avocado_qemu/__in

[RFC 2/5] libvhost-user: Add vu_add_mem_reg input validation

2021-12-15 Thread Raphael Norwitz
Signed-off-by: Raphael Norwitz --- subprojects/libvhost-user/libvhost-user.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index 573212a83b..80ef335254 100644 --- a/subprojects/libvhost-user/libvhos

<    1   2   3   4   5   6   >