Re: [PATCH v2 2/3] target/hexagon: fix some occurrences of -Wshadow=local

2023-10-05 Thread Philippe Mathieu-Daudé
On 6/10/23 00:22, Brian Cain wrote: Of the changes in this commit, the changes in `HELPER(commit_hvx_stores)()` are less obvious. They are required because of some macro invocations like SCATTER_OP_WRITE_TO_MEM(). e.g.: In file included from ../target/hexagon/op_helper.c:31:

[PATCH] target/ppc: Clean up local variable shadowing in kvm_arch_*_registers()

2023-10-05 Thread Cédric Le Goater
Remove extra 'i' variable to fix this warning : ../target/ppc/kvm.c: In function ‘kvm_arch_put_registers’: ../target/ppc/kvm.c:963:13: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local] 963 | int i; | ^

Re: [PATCH qemu] timer/i8254: Fix one shot PIT mode

2023-10-05 Thread Michael S. Tsirkin
On Fri, Oct 06, 2023 at 02:36:52AM +, Damien Zammit wrote: > >From: Michael Tokarev > >26.02.2023 04:58, Damien Zammit wrote: > >> Currently, the one-shot (mode 1) PIT expires far too quickly, > >> due to the output being set under the wrong logic. > >> This change fixes the one-shot PIT mode

[PATCH] tap-win32: Remove unnecessary stubs

2023-10-05 Thread Akihiko Odaki
Some of them are only necessary for POSIX systems. The others are assigned to function pointers in NetClientInfo that can actually be NULL. Signed-off-by: Akihiko Odaki --- net/tap-win32.c | 54 - 1 file changed, 54 deletions(-) diff --git

Re: [PATCH] scripts/xml-preprocess: Make sure this script is invoked via the right Python

2023-10-05 Thread Marc-André Lureau
On Fri, Oct 6, 2023 at 8:53 AM Thomas Huth wrote: > > If a script is executable and has a shebang line, Meson treats it as > a normal executable, so that this script here is run via the "python3" > binary in the $PATH. However, "python3" might not be in the $PATH at > all, or it might be a wrong

[PATCH] scripts/xml-preprocess: Make sure this script is invoked via the right Python

2023-10-05 Thread Thomas Huth
If a script is executable and has a shebang line, Meson treats it as a normal executable, so that this script here is run via the "python3" binary in the $PATH. However, "python3" might not be in the $PATH at all, or it might be a wrong version, so we should make sure to run this script via the

Re: [PATCH v4 3/3] hw/vfio: add ramfb migration support

2023-10-05 Thread Laszlo Ersek
On 10/5/23 18:34, Cédric Le Goater wrote: > On 10/5/23 13:30, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> >> Add a "VFIODisplay" subsection whenever "x-ramfb-migrate" is turned on. >> >> Turn it off by default on machines <= 8.1 for compatibility reasons. >> >> Signed-off-by:

[PATCH] hw/ide: Add command to sync cache on ATAPI

2023-10-05 Thread Damien Zammit
Bumping this thread[1] as it seems to have gotten lost: [1] https://lists.gnu.org/archive/html/qemu-block/2022-03/msg00586.html Damien

Re: [PATCH qemu] timer/i8254: Fix one shot PIT mode

2023-10-05 Thread Damien Zammit
>From: Michael Tokarev >26.02.2023 04:58, Damien Zammit wrote: >> Currently, the one-shot (mode 1) PIT expires far too quickly, >> due to the output being set under the wrong logic. >> This change fixes the one-shot PIT mode to behave similarly to mode 0. >> >> TESTED: using the one-shot PIT

RE: [PATCH v4] target/riscv: update checks on writing pmpcfg for Smepmp to version 1.0

2023-10-05 Thread Chang Alvin
> On Mon, Sep 25, 2023 at 2:11 AM Alvin Chang > wrote: > > > > Current checks on writing pmpcfg for Smepmp follows Smepmp version > > 0.9.1. However, Smepmp specification has already been ratified, and > > there are some differences between version 0.9.1 and 1.0. In this > > commit we

[PATCH v17 4/9] virtio-gpu: blob prep

2023-10-05 Thread Gurchetan Singh
From: Antonio Caggiano This adds preparatory functions needed to: - decode blob cmds - tracking iovecs Signed-off-by: Antonio Caggiano Signed-off-by: Dmitry Osipenko Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki

[PATCH v17 3/9] virtio-gpu: hostmem

2023-10-05 Thread Gurchetan Singh
From: Gerd Hoffmann Use VIRTIO_GPU_SHM_ID_HOST_VISIBLE as id for virtio-gpu. Signed-off-by: Antonio Caggiano Tested-by: Alyssa Ross Tested-by: Akihiko Odaki Tested-by: Huang Rui Acked-by: Huang Rui Acked-by: Michael S. Tsirkin Reviewed-by: Akihiko Odaki --- hw/display/virtio-gpu-pci.c

[PATCH v17 8/9] gfxstream + rutabaga: enable rutabaga

2023-10-05 Thread Gurchetan Singh
This change enables rutabaga to receive virtio-gpu-3d hypercalls when it is active. Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Antonio Caggiano Reviewed-by: Emmanouil Pitsidianakis Reviewed-by: Akihiko Odaki

[PATCH v17 5/9] gfxstream + rutabaga prep: added need defintions, fields, and options

2023-10-05 Thread Gurchetan Singh
This modifies the common virtio-gpu.h file have the fields and defintions needed by gfxstream/rutabaga, by VirtioGpuRutabaga. Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Emmanouil Pitsidianakis Reviewed-by:

[PATCH v17 2/9] virtio-gpu: CONTEXT_INIT feature

2023-10-05 Thread Gurchetan Singh
From: Antonio Caggiano The feature can be enabled when a backend wants it. Signed-off-by: Antonio Caggiano Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Akihiko Odaki Tested-by: Huang Rui Acked-by: Huang Rui Reviewed-by: Marc-André Lureau Reviewed-by: Philippe

[PATCH v17 1/9] virtio: Add shared memory capability

2023-10-05 Thread Gurchetan Singh
From: "Dr. David Alan Gilbert" Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' to allow defining shared memory regions with sizes and offsets of 2^32 and more. Multiple instances of the capability are allowed and distinguished by a device-specific 'id'. Signed-off-by: Dr. David

[PATCH v17 7/9] gfxstream + rutabaga: meson support

2023-10-05 Thread Gurchetan Singh
- Add meson detection of rutabaga_gfx - Build virtio-gpu-rutabaga.c + associated vga/pci files when present Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Emmanouil Pitsidianakis Reviewed-by: Antonio Caggiano

[PATCH v17 9/9] docs/system: add basic virtio-gpu documentation

2023-10-05 Thread Gurchetan Singh
This adds basic documentation for virtio-gpu. Suggested-by: Akihiko Odaki Signed-off-by: Gurchetan Singh Tested-by: Alyssa Ross Tested-by: Emmanouil Pitsidianakis Tested-by: Akihiko Odaki Reviewed-by: Emmanouil Pitsidianakis Reviewed-by: Antonio Caggiano Reviewed-by: Akihiko Odaki ---

[PATCH v17 0/9] gfxstream + rutabaga_gfx

2023-10-05 Thread Gurchetan Singh
From: Gurchetan Singh Branch containing changes: https://gitlab.com/gurchetansingh/qemu/-/commits/qemu-gfxstream-v17 Changes since v16: - Fixed typo mentioned here: https://lists.gnu.org/archive/html/qemu-devel/2023-10/msg01407.html Antonio Caggiano (2): virtio-gpu: CONTEXT_INIT feature

[PATCH v17 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-10-05 Thread Gurchetan Singh
This adds initial support for gfxstream and cross-domain. Both features rely on virtio-gpu blob resources and context types, which are also implemented in this patch. gfxstream has a long and illustrious history in Android graphics paravirtualization. It has been powering graphics in the

Re: [RFC PATCH v2 1/9] Add Rust SEV library as subproject

2023-10-05 Thread Tyler Fanelli
On 10/5/23 2:03 AM, Philippe Mathieu-Daudé wrote: Hi Tyler, On 4/10/23 22:34, Tyler Fanelli wrote: The Rust sev library provides a C API for the AMD SEV launch ioctls, as well as the ability to build with meson. Add the Rust sev library as a QEMU subproject with the goal of outsourcing all SEV

Re: [PATCH v2 5/5] hw/intc/apic: Pass CPU using QOM link property

2023-10-05 Thread Paolo Bonzini
On 10/3/23 10:27, Philippe Mathieu-Daudé wrote: -/* TODO: convert to link<> */ -apic = APIC_COMMON(cpu->apic_state); -apic->cpu = cpu; -apic->apicbase = APIC_DEFAULT_ADDRESS | MSR_IA32_APICBASE_ENABLE; +qdev_prop_set_uint32(cpu->apic_state, "base-addr", +

Re: [PATCH v2 4/5] hw/intc/apic: Rename x86_cpu_apic_create() -> x86_cpu_apic_new()

2023-10-05 Thread Paolo Bonzini
On 10/3/23 10:27, Philippe Mathieu-Daudé wrote: -x86_cpu_apic_create(cpu, _err); -if (local_err != NULL) { -goto out; -} +x86_cpu_apic_new(cpu); I don't like this, "*_new" is generally for functions that return what they create. Patch 2 is scary

Re: [PATCH v2] coverity: physmem: use simple assertions instead of modelling

2023-10-05 Thread Paolo Bonzini
On Thu, Oct 5, 2023 at 4:04 PM Vladimir Sementsov-Ogievskiy wrote: > +/* > + * Assure Coverity (and ourselves) that we are not going to > OVERRUN > + * the buffer by following ldn_he_p(). > + */ > +assert((l == 1 && len >= 1) || > +

[PATCH v2 2/3] target/hexagon: fix some occurrences of -Wshadow=local

2023-10-05 Thread Brian Cain
Of the changes in this commit, the changes in `HELPER(commit_hvx_stores)()` are less obvious. They are required because of some macro invocations like SCATTER_OP_WRITE_TO_MEM(). e.g.: In file included from ../target/hexagon/op_helper.c:31: ../target/hexagon/mmvec/macros.h:205:18: error:

[PATCH v2 1/3] target/hexagon: move GETPC() calls to top level helpers

2023-10-05 Thread Brian Cain
From: Matheus Tavares Bernardino As docs/devel/loads-stores.rst states: ``GETPC()`` should be used with great care: calling it in other functions that are *not* the top level ``HELPER(foo)`` will cause unexpected behavior. Instead, the value of ``GETPC()`` should be read from the helper

[PATCH v2 3/3] target/hexagon: avoid shadowing globals

2023-10-05 Thread Brian Cain
The typedef `vaddr` is shadowed by `vaddr` identifiers, so we rename the identifiers to avoid shadowing the type name. The global `cpu_env` is shadowed by local `cpu_env` arguments, so we rename the function arguments to avoid shadowing the global. Signed-off-by: Brian Cain ---

[PATCH v2 0/3] hexagon: GETPC() and shadowing fixes

2023-10-05 Thread Brian Cain
In v2: reworked with suggestions from Philippe and added a new patch to cover -Wshadow=global. Brian Cain (2): target/hexagon: fix some occurrences of -Wshadow=local target/hexagon: avoid shadowing globals Matheus Tavares Bernardino (1): target/hexagon: move GETPC() calls to top level

[PATCH 3/3] hw/ppc: Add emulation of AmigaOne XE board

2023-10-05 Thread BALATON Zoltan
The AmigaOne is a rebranded MAI Teron board that uses U-Boot firmware with patches to support AmigaOS and is very similar to pegasos2 so can be easily emulated sharing most code with pegasos2. The reason to emulate it is that AmigaOS comes in different versions for AmigaOne and PegasosII which

[PATCH 0/3] Add emulation of AmigaOne XE board

2023-10-05 Thread BALATON Zoltan
This small series adds amigaone PPC machine which can be emulated mostly reusing existing models used by pegasos2 as these machines are very similar. The reason to add another board is that AmigaOS has different versions for different machines that only run on that machine and the AmigaOne version

[PATCH 2/3] hw/pci-host: Add emulation of Mai Logic Articia S

2023-10-05 Thread BALATON Zoltan
The Articia S is a generic chipset supporting several different CPUs that were used on some PPC boards. This is a minimal emulation of the parts needed for emulating the AmigaOne board. Signed-off-by: BALATON Zoltan --- hw/pci-host/Kconfig | 5 + hw/pci-host/articia.c | 266

[PATCH 1/3] via-ide: Fix legacy mode emulation

2023-10-05 Thread BALATON Zoltan
The initial value for BARs were set in reset method for emulating legacy mode at start but this does not work because PCI code resets BARs after calling device reset method. Additionally the values written to BARs were also wrong. Move setting the BARs to a callback on writing the PCI config

Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER

2023-10-05 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Oct 05, 2023 at 06:10:20PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Thu, Oct 05, 2023 at 10:37:56AM -0300, Fabiano Rosas wrote: >> >> >> +/* >> >> >> + * Make sure both QEMU instances will go into RECOVER stage, then >> >> >> test >> >> >>

Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER

2023-10-05 Thread Peter Xu
On Thu, Oct 05, 2023 at 06:10:20PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Thu, Oct 05, 2023 at 10:37:56AM -0300, Fabiano Rosas wrote: > >> >> +/* > >> >> + * Make sure both QEMU instances will go into RECOVER stage, then > >> >> test > >> >> + * kicking them out

Re: [PATCH] qtest/migration: Add a test for the analyze-migration script

2023-10-05 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Sep 27, 2023 at 06:47:56PM -0300, Fabiano Rosas wrote: >> I know this adds a python dependency to qtests and I'm not sure how >> much we care about this script, but on the other hand it would be nice >> to catch these errors early on. >> >> This would also help with

[PATCH v2] misc/pca9552: Fix for pca9552 not getting reset

2023-10-05 Thread Glenn Miles
Testing of the pca9552 device on the powernv platform showed that the reset method was not being called when an instance of the device was realized. This was causing the INPUT0/INPUT1 POR values to be incorrect. Fixed by overriding the parent pca955x_realize method with a new pca9552_realize

Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER

2023-10-05 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Oct 05, 2023 at 10:37:56AM -0300, Fabiano Rosas wrote: >> >> +/* >> >> + * Make sure both QEMU instances will go into RECOVER stage, then >> >> test >> >> + * kicking them out using migrate-pause. >> >> + */ >> >> +wait_for_postcopy_status(from,

Re: [PATCH v3 10/10] tests/migration-test: Add a test for postcopy hangs during RECOVER

2023-10-05 Thread Peter Xu
On Thu, Oct 05, 2023 at 10:37:56AM -0300, Fabiano Rosas wrote: > >> +/* > >> + * Make sure both QEMU instances will go into RECOVER stage, then test > >> + * kicking them out using migrate-pause. > >> + */ > >> +wait_for_postcopy_status(from, "postcopy-recover"); > >> +

Re: [PATCH v3 07/10] migration: Add migration_rp_wait|kick()

2023-10-05 Thread Peter Xu
On Thu, Oct 05, 2023 at 09:49:25AM +0200, Juan Quintela wrote: > Peter Xu wrote: > > It's just a simple wrapper for rp_sem on either wait() or kick(), make it > > even clearer on how it is used. Prepared to be used even for other things. > > > > Reviewed-by: Fabiano Rosas > > Signed-off-by:

[PATCH] misc/pca9552: Fix for pca9552 not getting reset

2023-10-05 Thread Glenn Miles
Testing of the pca9552 device on the powernv platform showed that the reset method was not being called when an instance of the device was realized. This was causing the INPUT0/INPUT1 POR values to be incorrect. Fixed by calling pca9552_reset from within the pca9552_realize method.

[PATCH v2] misc/pca9552: Let external devices set pca9552 inputs

2023-10-05 Thread Glenn Miles
Allow external devices to drive pca9552 input pins by adding input GPIO's to the model. This allows a device to connect its output GPIO's to the pca9552 input GPIO's. In order for an external device to set the state of a pca9552 pin, the pin must first be configured for high impedance (LED is

Re: [PATCH 0/3] hvf x86 correctness and efficiency improvements

2023-10-05 Thread Phil Dennis-Jordan
Ping - let me know if there's anything particularly controversial, unclear, etc. about these patches or if I can do anything to make reviewing easier. Thanks! On Fri, 22 Sept 2023 at 16:09, Phil Dennis-Jordan wrote: > > This is a series of semi-related patches for the x86 macOS >

Re: [PATCH v6 14/14] python: use vm.cmd() instead of vm.qmp() where appropriate

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:50PM +0300, Vladimir Sementsov-Ogievskiy wrote: > In many cases we just want an effect of qmp command and want to raise on > failure. Use vm.cmd() method which does exactly this. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/avocado/vnc.py

Re: [PATCH v6 13/14] tests/vm/basevm.py: use cmd() instead of qmp()

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:49PM +0300, Vladimir Sementsov-Ogievskiy wrote: > We don't expect failure here and need 'result' object. cmd() is better > in this case. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/vm/basevm.py | 4 ++-- > 1 file changed, 2 insertions(+), 2

Re: [PATCH v6 12/14] iotests.py: pause_job(): drop return value

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:48PM +0300, Vladimir Sementsov-Ogievskiy wrote: > The returned value is unused. It's simple to check by command > > git grep -B 3 '\.pause_job(' > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/iotests.py | 3 +-- > 1 file changed, 1

Re: [PATCH v6 11/14] iotests: drop some extra ** in qmp() call

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:47PM +0300, Vladimir Sementsov-Ogievskiy wrote: > qmp() method supports passing dict (if it doesn't need substituting > '_' to '-' in keys). So, drop some extra '**' operators. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/040

Re: [PATCH v6 10/14] iotests: drop some occasional semicolons

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:46PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/041 | 2 +- > tests/qemu-iotests/196 | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Maybe in the subject s/occasional/extra/

Re: [PATCH v6 09/14] iotests: refactor some common qmp result checks into generic pattern

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:45PM +0300, Vladimir Sementsov-Ogievskiy wrote: > To simplify further conversion. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/040 | 3 ++- > tests/qemu-iotests/147 | 3 ++- > tests/qemu-iotests/155 | 4 ++-- > tests/qemu-iotests/218 |

Re: [PATCH v6 08/14] iotests: add some missed checks of qmp result

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:44PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/041| 1 + > tests/qemu-iotests/151| 1 + > tests/qemu-iotests/152| 2 ++ >

Re: [PATCH v2 03/21] preallocate: Don't poll during permission updates

2023-10-05 Thread Vladimir Sementsov-Ogievskiy
On 11.09.23 12:46, Kevin Wolf wrote: When the permission related BlockDriver callbacks are called, we are in the middle of an operation traversing the block graph. Polling in such a place is a very bad idea because the graph could change in unexpected ways. In the future, callers will also hold

Re: [PATCH v6 07/14] iotests: QemuStorageDaemon: add cmd() method like in QEMUMachine.

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:43PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Add similar method for consistency. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > tests/qemu-iotests/iotests.py | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > Reviewed-by: Eric Blake

Re: [PATCH v6 06/14] python/machine.py: upgrade vm.cmd() method

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:42PM +0300, Vladimir Sementsov-Ogievskiy wrote: > The method is not popular in iotests, we prefer use vm.qmp() and then > check success by hand.. But that's not optimal. To simplify movement to extra '.' > vm.cmd() let's support same interface improvements like in

Re: [PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-05 Thread Peter Xu
On Thu, Oct 05, 2023 at 10:22:52AM +0200, Juan Quintela wrote: > Peter Xu wrote: > > rp_state.error was a boolean used to show error happened in return path > > thread. That's not only duplicating error reporting (migrate_set_error), > > but also not good enough in that we only do error_report()

Re: [PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-05 Thread Peter Xu
On Thu, Oct 05, 2023 at 09:57:58AM -0300, Fabiano Rosas wrote: > > @@ -2008,9 +1996,14 @@ static void *source_return_path_thread(void *opaque) > > } > > > > out: > > -if (qemu_file_get_error(rp)) { > > +if (err) { > > Need to keep both checks here. The next patch did that. Let

Re: [PATCH v8 2/2] tpm: add backend for mssim

2023-10-05 Thread James Bottomley
On Thu, 2023-10-05 at 18:11 +0200, Philippe Mathieu-Daudé wrote: > On 5/10/23 15:57, James Bottomley wrote: > > On Thu, 2023-10-05 at 08:49 +0200, Philippe Mathieu-Daudé wrote: > > > On 4/10/23 20:42, James Bottomley wrote: > > > > From: James Bottomley [...] > > > > +.. code-block:: console > >

Re: [PATCH] MAINTANERS: Split vt82c686 out of fuloong2e

2023-10-05 Thread BALATON Zoltan
On Thu, 5 Oct 2023, Philippe Mathieu-Daudé wrote: On 5/10/23 20:18, BALATON Zoltan wrote: It is used by other machines not just fuloong2e so put it in a separate section and add myself as reviewer. Signed-off-by: BALATON Zoltan --- By the way, PIIX4 already has a section just above where I've

Re: [PATCH v6 05/14] python/qemu: rename command() to cmd()

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:41PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Use a shorter name. We are going to move in iotests from qmp() to > command() where possible. But command() is longer than qmp() and don't > look better. Let's rename. > > You can simply grep for '\.command(' and for

Re: [PATCH v6 04/14] python: rename QEMUMonitorProtocol.cmd() to cmd_raw()

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:40PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Having cmd() and command() methods in one class doesn't look good. > Rename cmd() to cmd_raw(), to show its meaning better. > > We also want to rename command() to cmd() in future, so this commit is > a necessary

Re: [PATCH v6 03/14] scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd()

2023-10-05 Thread Eric Blake
On Thu, Oct 05, 2023 at 04:55:39PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Here we don't expect a failure. In case on failure we'll crash on s/case on/case of/ > trying to access ['return']. Let's better use .command() that clearly > raise on failure. Maybe: s/Let's better /Better is to/;

[PULL 13/15] nbd/server: Refactor list of negotiated meta contexts

2023-10-05 Thread Eric Blake
Peform several minor refactorings of how the list of negotiated meta contexts is managed, to make upcoming patches easier: Promote the internal type NBDExportMetaContexts to the public opaque type NBDMetaContexts, and mark exp const. Use a shorter member name in NBDClient. Hoist calls to

[PULL 11/15] nbd/client: Accept 64-bit block status chunks

2023-10-05 Thread Eric Blake
Once extended mode is enabled, we need to accept 64-bit status replies (even for replies that don't exceed a 32-bit length). It is easier to normalize narrow replies into wide format so that the rest of our code only has to handle one width. Although a server is non-compliant if it sends a

[PULL 12/15] nbd/client: Request extended headers during negotiation

2023-10-05 Thread Eric Blake
All the pieces are in place for a client to finally request extended headers. Note that we must not request extended headers when qemu-nbd is used to connect to the kernel module (as nbd.ko does not expect them, but expects us to do the negotiation in userspace before handing the socket over to

[PULL 06/15] nbd/server: Prepare to send extended header replies

2023-10-05 Thread Eric Blake
Although extended mode is not yet enabled, once we do turn it on, we need to reply with extended headers to all messages. Update the low level entry points necessary so that all other callers automatically get the right header based on the current mode. Signed-off-by: Eric Blake Reviewed-by:

[PULL 09/15] nbd/client: Plumb errp through nbd_receive_replies

2023-10-05 Thread Eric Blake
Instead of ignoring the low-level error just to refabricate our own message to pass to the caller, we can just plumb the caller's errp down to the low level. Signed-off-by: Eric Blake Message-ID: <20230925192229.3186470-20-ebl...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy ---

[PULL 07/15] nbd/server: Support 64-bit block status

2023-10-05 Thread Eric Blake
The NBD spec states that if the client negotiates extended headers, the server must avoid NBD_REPLY_TYPE_BLOCK_STATUS and instead use NBD_REPLY_TYPE_BLOCK_STATUS_EXT which supports 64-bit lengths, even if the reply does not need more than 32 bits. As of this patch, client->mode is still never

[PULL 03/15] mailmap: Fix BALATON Zoltan author email

2023-10-05 Thread Eric Blake
This fixes authorship of commits 5cbd51a5 and friends, where the qemu-ppc mailing list rewrote the "From:" field in the corresponding patches. See commit 3bd2608db7 ("maint: Add .mailmap entries for patches claiming list authorship") for explanation. Signed-off-by: Eric Blake Message-ID:

[PULL 00/15] NBD patches through 2023-10-05

2023-10-05 Thread Eric Blake
The following changes since commit 2f3913f4b2ad74baeb5a6f1d36efbd9ecdf1057d: Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2023-10-05 09:01:01 -0400) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git

[PULL 02/15] maint: Tweak comments in mailmap regarding SPF

2023-10-05 Thread Eric Blake
Documenting that we should not add new lines to work around SPF rewrites sounds foreboding; the intent is instead that new lines here are okay, but indicate a second problem elsewhere in our build process that we should also consider fixing at the same time, to keep the section from growing

[PULL 04/15] nbd/server: Support a request payload

2023-10-05 Thread Eric Blake
Upcoming additions to support NBD 64-bit effect lengths allow for the possibility to distinguish between payload length (capped at 32M) and effect length (64 bits, although we generally assume 63 bits because of off_t limitations). Without that extension, only the NBD_CMD_WRITE request has a

[PULL 05/15] nbd/server: Prepare to receive extended header requests

2023-10-05 Thread Eric Blake
Although extended mode is not yet enabled, once we do turn it on, we need to accept extended requests for all messages. Previous patches have already taken care of supporting 64-bit lengths, now we just need to read it off the wire. Note that this implementation will block indefinitely on a

[PULL 14/15] nbd/server: Prepare for per-request filtering of BLOCK_STATUS

2023-10-05 Thread Eric Blake
The next commit will add support for the optional extension NBD_CMD_FLAG_PAYLOAD during NBD_CMD_BLOCK_STATUS, where the client can request that the server only return a subset of negotiated contexts, rather than all contexts. To make that task easier, this patch populates the list of contexts to

[PULL 10/15] nbd/client: Initial support for extended headers

2023-10-05 Thread Eric Blake
Update the client code to be able to send an extended request, and parse an extended header from the server. Note that since we reject any structured reply with a too-large payload, we can always normalize a valid header back into the compact form, so that the caller need not deal with two

[PULL 15/15] nbd/server: Add FLAG_PAYLOAD support to CMD_BLOCK_STATUS

2023-10-05 Thread Eric Blake
Allow a client to request a subset of negotiated meta contexts. For example, a client may ask to use a single connection to learn about both block status and dirty bitmaps, but where the dirty bitmap queries only need to be performed on a subset of the disk; forcing the server to compute that

[PULL 08/15] nbd/server: Enable initial support for extended headers

2023-10-05 Thread Eric Blake
Time to start supporting clients that request extended headers. Now we can finally reach the code added across several previous patches. Even though the NBD spec has been altered to allow us to accept NBD_CMD_READ larger than the max payload size (provided our response is a hole or broken up

[PULL 01/15] mailmap: Fix Andrey Drobyshev author email

2023-10-05 Thread Eric Blake
From: Andrey Drobyshev This fixes authorship of commits 2848289168, 52b10c9c0c as the mailing list rewrote the "From:" field in the corresponding patches. See commit 3bd2608db7 ("maint: Add .mailmap entries for patches claiming list authorship") for explanation. Signed-off-by: Andrey Drobyshev

Re: [PATCH] MAINTANERS: Split vt82c686 out of fuloong2e

2023-10-05 Thread Philippe Mathieu-Daudé
On 5/10/23 20:18, BALATON Zoltan wrote: It is used by other machines not just fuloong2e so put it in a separate section and add myself as reviewer. Signed-off-by: BALATON Zoltan --- By the way, PIIX4 already has a section just above where I've added this but some files are still listed in

[QEMU][PATCH v1 0/7] Xen: support grant mappings.

2023-10-05 Thread Vikram Garhwal
Hi, This patch series add support for grant mappings as a pseudo RAM region for Xen. Enabling grant mappings patches(first 6) are written by Juergen in 2021. QEMU Virtio device provides an emulated backends for Virtio frontned devices in Xen. Please set "iommu_platform=on" option when invoking

[QEMU][PATCH v1 1/7] xen: when unplugging emulated devices skip virtio devices

2023-10-05 Thread Vikram Garhwal
From: Juergen Gross Virtio devices should never be unplugged at boot time, as they are similar to pci passthrough devices. Signed-off-by: Juergen Gross Signed-off-by: Vikram Garhwal --- hw/i386/xen/xen_platform.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

Re: [PATCH 5/7] audio: do not use first -audiodev as default audio device

2023-10-05 Thread BALATON Zoltan
On Thu, 5 Oct 2023, Paolo Bonzini wrote: Il gio 5 ott 2023, 17:40 BALATON Zoltan ha scritto: Much better, thanks. Maybe some more small clarifications as below: === Using ``-audiodev`` to define the default audio backend (removed in 8.2)

[PATCH] MAINTANERS: Split vt82c686 out of fuloong2e

2023-10-05 Thread BALATON Zoltan
It is used by other machines not just fuloong2e so put it in a separate section and add myself as reviewer. Signed-off-by: BALATON Zoltan --- By the way, PIIX4 already has a section just above where I've added this but some files are still listed in Malta. You may want to have a look at that.

[PATCH v4] hw/isa/vt82c686: Respect SCI interrupt assignment

2023-10-05 Thread BALATON Zoltan
According to the datasheet, SCI interrupts of the power management function aren't routed through the PCI pins but rather directly to the integrated PIC. The routing is configurable through the ACPI interrupt select register at offset 0x42 in the PCI configuration space of the power management

[QEMU][PATCH v1 3/7] softmmu: let qemu_map_ram_ptr() use qemu_ram_ptr_length()

2023-10-05 Thread Vikram Garhwal
From: Juergen Gross qemu_map_ram_ptr() and qemu_ram_ptr_length() share quite some code, so modify qemu_ram_ptr_length() a little bit and use it for qemu_map_ram_ptr(), too. Signed-off-by: Juergen Gross Signed-off-by: Vikram Garhwal --- softmmu/physmem.c | 58

[QEMU][PATCH v1 7/7] hw: arm: Add grant mapping.

2023-10-05 Thread Vikram Garhwal
Enable grant ram mapping support for Xenpvh machine on ARM. Signed-off-by: Vikram Garhwal --- hw/arm/xen_arm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index f83b983ec5..553c289720 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -125,6

[QEMU][PATCH v1 2/7] xen: add pseudo RAM region for grant mappings

2023-10-05 Thread Vikram Garhwal
From: Juergen Gross Add a memory region which can be used to automatically map granted memory. It is starting at 0x8000ULL in order to be able to distinguish it from normal RAM. For this reason the xen.ram memory region is expanded, which has no further impact as it is used just as

[QEMU][PATCH v1 6/7] xen: add map and unmap callbacks for grant region

2023-10-05 Thread Vikram Garhwal
From: Juergen Gross Add the callbacks for mapping/unmapping guest memory via grants to the special grant memory region. Signed-off-by: Juergen Gross Signed-off-by: Vikram Garhwal --- hw/xen/xen-mapcache.c | 167 +- softmmu/physmem.c | 11 ++- 2

[QEMU][PATCH v1 4/7] xen: let xen_ram_addr_from_mapcache() return -1 in case of not found entry

2023-10-05 Thread Vikram Garhwal
From: Juergen Gross Today xen_ram_addr_from_mapcache() will either abort() or return 0 in case it can't find a matching entry for a pointer value. Both cases are bad, so change that to return an invalid address instead. Signed-off-by: Juergen Gross --- hw/xen/xen-mapcache.c | 12 +++-

[QEMU][PATCH v1 5/7] memory: add MemoryRegion map and unmap callbacks

2023-10-05 Thread Vikram Garhwal
From: Juergen Gross In order to support mapping and unmapping guest memory dynamically to and from qemu during address_space_[un]map() operations add the map() and unmap() callbacks to MemoryRegionOps. Those will be used e.g. for Xen grant mappings when performing guest I/Os. Signed-off-by:

Re: [PATCH v4 0/8] vhost-user: Back-end state migration

2023-10-05 Thread Stefan Hajnoczi
On Wed, Oct 04, 2023 at 02:58:56PM +0200, Hanna Czenczek wrote: > RFC: > https://lists.nongnu.org/archive/html/qemu-devel/2023-03/msg04263.html > > v1: > https://lists.nongnu.org/archive/html/qemu-devel/2023-04/msg01575.html > > v2: >

Re: [PATCH v4 6/8] vhost-user: Interface for migration state transfer

2023-10-05 Thread Stefan Hajnoczi
On Wed, Oct 04, 2023 at 02:59:02PM +0200, Hanna Czenczek wrote: > Add the interface for transferring the back-end's state during migration > as defined previously in vhost-user.rst. > > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Hanna Czenczek > --- > include/hw/virtio/vhost-backend.h | 24

Re: [PATCH v4 8/8] vhost-user-fs: Implement internal migration

2023-10-05 Thread Stefan Hajnoczi
On Wed, Oct 04, 2023 at 02:59:04PM +0200, Hanna Czenczek wrote: > A virtio-fs device's VM state consists of: > - the virtio device (vring) state (VMSTATE_VIRTIO_DEVICE) > - the back-end's (virtiofsd's) internal state > > We get/set the latter via the new vhost operations to transfer migratory >

Re: [PATCH v4 7/8] vhost: Add high-level state save/load functions

2023-10-05 Thread Stefan Hajnoczi
On Wed, Oct 04, 2023 at 02:59:03PM +0200, Hanna Czenczek wrote: > vhost_save_backend_state() and vhost_load_backend_state() can be used by > vhost front-ends to easily save and load the back-end's state to/from > the migration stream. > > Because we do not know the full state size ahead of time,

Re: [PATCH v4 5/8] vhost-user.rst: Migrating back-end-internal state

2023-10-05 Thread Stefan Hajnoczi
On Wed, Oct 04, 2023 at 02:59:01PM +0200, Hanna Czenczek wrote: > For vhost-user devices, qemu can migrate the virtio state, but not the > back-end's internal state. To do so, we need to be able to transfer > this internal state between front-end (qemu) and back-end. > > At this point, this new

Re: [PATCH v4 4/8] vhost-user.rst: Introduce suspended state

2023-10-05 Thread Stefan Hajnoczi
On Wed, Oct 04, 2023 at 02:59:00PM +0200, Hanna Czenczek wrote: > In vDPA, GET_VRING_BASE does not stop the queried vring, which is why > SUSPEND was introduced so that the returned index would be stable. In > vhost-user, it does stop the vring, so under the same reasoning, it can > get away

Re: [PATCH v4 3/8] vhost-user.rst: Clarify enabling/disabling vrings

2023-10-05 Thread Stefan Hajnoczi
On Wed, Oct 04, 2023 at 02:58:59PM +0200, Hanna Czenczek wrote: > Currently, the vhost-user documentation says that rings are to be > initialized in a disabled state when VHOST_USER_F_PROTOCOL_FEATURES is > negotiated. However, by the time of feature negotiation, all rings have > already been

[PATCH 0/2] topic: meson: add more compiler hardening flags

2023-10-05 Thread Daniel P . Berrangé
This brings more compiler hardening flags to the default QEMU build process. The proposed flags have already been adopted by default in the kernel build process. At some point it is hoped that distros might enable them globally, as they've done in the past with things like _FORTIFY_SOURCE.

Re: [PATCH v4 2/8] vhost-user.rst: Improve [GS]ET_VRING_BASE doc

2023-10-05 Thread Stefan Hajnoczi
On Wed, Oct 04, 2023 at 02:58:58PM +0200, Hanna Czenczek wrote: > GET_VRING_BASE does not mention that it stops the respective ring. Fix > that. > > Furthermore, it is not fully clear what the "base offset" these > commands' documentation refers to is; an offset could be many things. > Be more

[PATCH 1/2] meson: mitigate against ROP exploits with -fzero-call-used-regs

2023-10-05 Thread Daniel P . Berrangé
To quote wikipedia: "Return-oriented programming (ROP) is a computer security exploit technique that allows an attacker to execute code in the presence of security defenses such as executable space protection and code signing. In this technique, an attacker gains control of the

[PATCH 2/2] meson: mitigate against use of uninitialize stack for exploits

2023-10-05 Thread Daniel P . Berrangé
When variables are used without being initialized, there is potential to take advantage of data that was pre-existing on the stack from an earlier call, to drive an exploit. It is good practice to always initialize variables, and the compiler can warn about flaws when -Wuninitialized is present.

[PATCH v25 19/21] tests/avocado: s390x cpu topology test socket full

2023-10-05 Thread Nina Schoetterl-Glausch
From: Pierre Morel This test verifies that QMP set-cpu-topology does not accept to overload a socket. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth --- tests/avocado/s390_topology.py | 26 ++ 1 file changed, 26 insertions(+) diff --git

[PATCH v25 20/21] tests/avocado: s390x cpu topology dedicated errors

2023-10-05 Thread Nina Schoetterl-Glausch
From: Pierre Morel Let's test that QEMU refuses to setup a dedicated CPU with low or medium entitlement. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth --- tests/avocado/s390_topology.py | 48 ++ 1 file changed, 48 insertions(+) diff --git

  1   2   3   >