Re: [PATCH v2 2/3] hw/ssi: Add Nuvoton PSPI Module

2023-02-07 Thread Philippe Mathieu-Daudé
On 7/2/23 20:45, Hao Wu wrote: Nuvoton's PSPI is a general purpose SPI module which enables connections to SPI-based peripheral devices. Signed-off-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Philippe Mathieu-Daude --- MAINTAINERS| 6 +- hw/ssi/meson.build |

Re: [PATCH 2/3] hw/ssi: Add Nuvoton PSPI Module

2023-02-07 Thread Philippe Mathieu-Daudé
On 7/2/23 20:21, Hao Wu wrote: On Tue, Feb 7, 2023 at 10:46 AM Hao Wu > wrote: Thanks for your review! On Mon, Feb 6, 2023 at 11:13 PM Philippe Mathieu-Daudé mailto:phi...@linaro.org>> wrote: On 7/2/23 00:34, Hao Wu wrote: > Nuvoton's PS

[PATCH] qmp: Add error proofing for query-acpi-ospm-status

2023-02-07 Thread Kunkun Jiang via
The ACPI device may not implement the ospm_status callback. Executing qmp "query-acpi-ospm-status" will cause segmentation fault. Add error proofing add log to avoid such serious consequences. Signed-off-by: Kunkun Jiang --- monitor/qmp-cmds.c | 7 ++- 1 file changed, 6 insertions(+), 1 dele

Re: [PATCH] MAINTAINERS: add myself to ui/ and audio/

2023-02-07 Thread Gerd Hoffmann
On Tue, Feb 07, 2023 at 12:56:10PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Helping out with patch review & queue handling. > > Signed-off-by: Marc-André Lureau Reviewed-by: Gerd Hoffmann

Re: Porting the QEMU build architecture to Visual Studio

2023-02-07 Thread Yan Vugenfirer
Hi Andrew, I created a Visual Studio project a long time ago for qemu-ga. It is an ugly unsustainable hack that was done in the time before QEMU moved to meson and I had to deal with GCC extension that MS compiler couldn't handle. Today I would experiment with meson that should be able to create V

Re: [PATCH v3 08/10] qmp: teach 'getfd' to import sockets on win32

2023-02-07 Thread Marc-André Lureau
Hi On Tue, Feb 7, 2023 at 6:54 PM Daniel P. Berrangé wrote: > On Tue, Feb 07, 2023 at 06:25:33PM +0400, marcandre.lur...@redhat.com > wrote: > > From: Marc-André Lureau > > > > A process with enough capabilities can duplicate a socket to QEMU. > > Modify 'getfd' to import it and add it to the m

Re: [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances

2023-02-07 Thread Philippe Mathieu-Daudé
On 8/2/23 01:43, BALATON Zoltan wrote: On Wed, 8 Feb 2023, Bernhard Beschow wrote: Am 7. Februar 2023 20:52:02 UTC schrieb Mark Cave-Ayland : On 06/02/2023 23:40, Bernhard Beschow wrote: Am 5. Februar 2023 22:32:03 UTC schrieb Mark Cave-Ayland : On 05/02/2023 22:21, BALATON Zoltan wrote: On

Re: Porting the QEMU build architecture to Visual Studio

2023-02-07 Thread Philippe Mathieu-Daudé
Hi Andrew, On 8/2/23 05:56, Andrew Numrich wrote: Hello, I’m looking to experiment with QEMU in a Windows specific environment. For that I’ll need to build QEMU’s source code in Visual Studio 2017. I’m seeing that QEMU’s sources calls for a `config-host.h` file generated by a `create_config`

[PULL v2 11/19] migration: Clean up includes

2023-02-07 Thread Markus Armbruster
This commit was created with scripts/clean-includes. All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a .h is redundant, since the .c already includes it. Drop such inclusions. * Likewise, in

[PULL v2 00/19] Header cleanup patches for 2023-02-06

2023-02-07 Thread Markus Armbruster
The following changes since commit 969d09c3a6186c0a4bc8a41db0c1aba1c76081fc: Merge tag 'pull-aspeed-20230207' of https://github.com/legoater/qemu into staging (2023-02-07 20:13:38 +) are available in the Git repository at: https://repo.or.cz/qemu/armbru.git tags/pull-include-

Re: [PATCH V2 1/4] qapi: strList_from_string

2023-02-07 Thread Marc-André Lureau
Hi On Tue, Feb 7, 2023 at 10:50 PM Steve Sistare wrote: > > Generalize hmp_split_at_comma() to take any delimiter character, rename > as strList_from_string(), and move it to qapi/util.c. > > No functional change. The g_strsplit() version was a bit simpler, but if you want to optimize it a bit f

Re: [PATCH v2 12/23] vfio-user: region read/write

2023-02-07 Thread John Johnson
> On Feb 6, 2023, at 11:07 AM, Alex Williamson > wrote: > > On Wed, 1 Feb 2023 21:55:48 -0800 > John Johnson wrote: > >> Add support for posted writes on remote devices >> >> Signed-off-by: Elena Ufimtseva >> Signed-off-by: John G Johnson >> Signed-off-by: Jagannathan Raman >> --- >> hw

Re: [PATCH v2 15/23] vfio-user: forward msix BAR accesses to server

2023-02-07 Thread John Johnson
> On Feb 6, 2023, at 12:33 PM, Alex Williamson > wrote: > > On Wed, 1 Feb 2023 21:55:51 -0800 > John Johnson wrote: > >> Server holds device current device pending state >> Use irq masking commands in socket case >> >> Signed-off-by: John G Johnson >> Signed-off-by: Elena Ufimtseva >> Si

[PATCH v2] target/riscv: Remove privileged spec version restriction for RVV

2023-02-07 Thread frank . chang
From: Frank Chang The RVV specification does not require that the core needs to support the privileged specification v1.12.0 to support RVV, and there is no dependency from ISA level. This commit removes the restriction from both RVV CSRs and extension CPU ISA string. Signed-off-by: Frank Chang

Re: [PATCH] target/riscv: Remove .min_priv_ver restriction from RVV CSRs

2023-02-07 Thread Frank Chang
I realized that I should also remove the privileged version check in isa_edata_arr[], too. I will send out v2 patch to fix it. Regards, Frank Chang On Tue, Feb 7, 2023 at 4:43 PM wrote: > From: Frank Chang > > The RVV specification does not require that the core needs to support > the privileg

Re: [PATCH 04/10] hw/riscv/virt: virt-acpi-build.c: Add basic ACPI tables

2023-02-07 Thread Sunil V L
On Wed, Feb 08, 2023 at 09:06:48AM +0800, Bin Meng wrote: > On Wed, Feb 8, 2023 at 2:15 AM Sunil V L wrote: > > > > On Wed, Feb 08, 2023 at 12:10:55AM +0800, Bin Meng wrote: > > > On Mon, Feb 6, 2023 at 9:24 PM Sunil V L wrote: > > > > > > > > On Mon, Feb 06, 2023 at 06:17:50PM +0800, Bin Meng wr

[PATCH v13 2/2] vhost-vdpa: add support for vIOMMU

2023-02-07 Thread Cindy Lu
1.Add support for vIOMMU. Add the new function to deal with iommu MR. - during iommu_region_add register a specific IOMMU notifier, and store all notifiers in a list. - during iommu_region_del, compare and delete the IOMMU notifier from the list - since the SVQ not support iommu yet, add the chec

[PATCH v13 0/2] vhost-vdpa: add support for vIOMMU

2023-02-07 Thread Cindy Lu
These patches are to support vIOMMU in vdpa device changes in V3 1. Move function vfio_get_xlat_addr to memory.c 2. Use the existing memory listener, while the MR is iommu MR then call the function iommu_region_add/ iommu_region_del changes in V4 1.make the comments in vfio_get_xlat_addr more gen

[PATCH v13 1/2] vhost: expose function vhost_dev_has_iommu()

2023-02-07 Thread Cindy Lu
To support vIOMMU in vdpa, need to exposed the function vhost_dev_has_iommu, vdpa will use this function to check if vIOMMU enable. Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 2 +- include/hw/virtio/vhost.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/virt

[PATCH v2 4/7] qapi/expr: add typing workaround for AbstractSet

2023-02-07 Thread John Snow
As part of attempting to unify the JSON types, I discovered that mypy believes that `Mapping[str, ...].keys() & Set[str]` produces an `AbstractSet[str]` and not a `Set[str]`. As a result, mypy is unsure if the .pop() is safe. Eh, fine, just wrap the expression in a set() constructor to force it t

[PATCH v2 1/7] qapi/expr: Split check_expr out from check_exprs

2023-02-07 Thread John Snow
Primarily, this reduces a nesting level of a particularly long block. It's mostly code movement, but a new docstring is created. It also has the effect of creating a fairly convenient "catch point" in check_exprs for exception handling without making the nesting level even worse. Signed-off-by: J

[PATCH v2 3/7] qapi/expr: Use TopLevelExpr where appropriate

2023-02-07 Thread John Snow
Remove most usages of _JSONObject with a more semantically meaningful alias. Note that this is only a semantic alias; the distinction is not enforced by the type system. This is merely a benefit for the human: instead of check_xyz functions operating on a representation of some "JSON Object", we ca

[PATCH v2 0/7] qapi: static typing conversion, pt5c

2023-02-07 Thread John Snow
This is part five (c), and focuses on sharing strict types between parser.py and expr.py. gitlab: https://gitlab.com/jsnow/qemu/-/commits/python-qapi-cleanup-pt5c Every commit should pass with: - `isort -c qapi/` - `flake8 qapi/` - `pylint --rcfile=qapi/pylintrc qapi/` - `mypy --config-file=q

[PATCH v2 2/7] qapi/parser.py: add ParsedExpression type

2023-02-07 Thread John Snow
This is an immutable, named, typed tuple. It's arguably nicer than arbitrary dicts for passing data around when using strict typing. This patch turns parser.exprs into a list of ParsedExpressions instead, and adjusts expr.py to match. This allows the types we specify in parser.py to be "remembere

[PATCH v2 7/7] qapi: remove JSON value FIXME

2023-02-07 Thread John Snow
With the two major JSON-ish type hierarchies clarified for distinct purposes; QAPIExpression for parsed expressions and JSONValue for introspection data, remove this FIXME as no longer an action item. In theory, it may be possible to define a completely agnostic one-size-fits-all JSON type hierarc

[PATCH] xen/pt: fix igd passthrough for pc machine with xen accelerator

2023-02-07 Thread Chuck Zmudzinski
Commit 998250e97661 ("xen, gfx passthrough: register host bridge specific to passthrough") uses the igd-passthrough-i440FX pci host device with the xenfv machine type and igd-passthru=on, but using it for the pc machine type, xen accelerator, and igd-passtru=on was omitted from that commit. The ig

Re: [PATCH] target/riscv: Remove .min_priv_ver restriction from RVV CSRs

2023-02-07 Thread LIU Zhiwei
On 2023/2/7 16:43, frank.ch...@sifive.com wrote: From: Frank Chang The RVV specification does not require that the core needs to support the privileged specification v1.12.0 to support RVV, and there is no dependency from ISA level. This commit removes the restriction. Signed-off-by: Frank C

Re: [PATCH 04/10] hw/riscv/virt: virt-acpi-build.c: Add basic ACPI tables

2023-02-07 Thread Bin Meng
On Wed, Feb 8, 2023 at 2:15 AM Sunil V L wrote: > > On Wed, Feb 08, 2023 at 12:10:55AM +0800, Bin Meng wrote: > > On Mon, Feb 6, 2023 at 9:24 PM Sunil V L wrote: > > > > > > On Mon, Feb 06, 2023 at 06:17:50PM +0800, Bin Meng wrote: > > > > On Thu, Feb 2, 2023 at 12:54 PM Sunil V L > > > > wrote

Re: [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances

2023-02-07 Thread BALATON Zoltan
On Wed, 8 Feb 2023, Bernhard Beschow wrote: Am 7. Februar 2023 20:52:02 UTC schrieb Mark Cave-Ayland : On 06/02/2023 23:40, Bernhard Beschow wrote: Am 5. Februar 2023 22:32:03 UTC schrieb Mark Cave-Ayland : On 05/02/2023 22:21, BALATON Zoltan wrote: On Sun, 5 Feb 2023, Mark Cave-Ayland wro

Re: [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances

2023-02-07 Thread Bernhard Beschow
Am 7. Februar 2023 20:52:02 UTC schrieb Mark Cave-Ayland : >On 06/02/2023 23:40, Bernhard Beschow wrote: > >> Am 5. Februar 2023 22:32:03 UTC schrieb Mark Cave-Ayland >> : >>> On 05/02/2023 22:21, BALATON Zoltan wrote: >>> On Sun, 5 Feb 2023, Mark Cave-Ayland wrote: > On 26/01/2023 2

Re: [PATCH 0/7] hw/ide: Untangle ISA/PCI abuses of ide_init_ioport()

2023-02-07 Thread Philippe Mathieu-Daudé
On 8/2/23 01:07, Philippe Mathieu-Daudé wrote: Background thread: https://lore.kernel.org/qemu-devel/5095dffc-309b-6c72-d255-8cdaa6fd3...@ilande.co.uk/ The ide_init_ioport() method expect an ISA device, but is massaged to accept NULL device (IOW, non-ISA devices...). A plausible explanation is

[PATCH 6/7] hw/isa: Assert isa_register_portio_list() gets non-NULL ISA device

2023-02-07 Thread Philippe Mathieu-Daudé
The previous commit removed the single call to isa_register_portio_list() with dev=NULL. To be sure we won't reintroduce such weird (ab)use, add an assertion. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/isa-bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/isa/

[PATCH 7/7] hw/ide/piix: Remove dead code in pci_piix_init_ports()

2023-02-07 Thread Philippe Mathieu-Daudé
pci_piix_init_ports() always return '0' so can't fail. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/piix.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 1cd4389611..54d545ce3a 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c

[PATCH 4/7] hw/ide: Introduce generic ide_init_ioport()

2023-02-07 Thread Philippe Mathieu-Daudé
Add ide_init_ioport() which is not restricted to the ISA bus. (Next commit will use it for a PCI device). Inspired-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ioport.c | 11 +-- include/hw/ide/internal.h | 2 ++ 2 files changed, 11 insertions(+), 2 d

[PATCH 5/7] hw/ide/piix: Use generic ide_init_ioport()

2023-02-07 Thread Philippe Mathieu-Daudé
TYPE_PIIX3_IDE is a PCI function inheriting from QOM TYPE_PCI_DEVICE. To be able to call the ISA specific ide_init_ioport_isa(), we call this function passing a NULL ISADevice argument. Remove this hack by calling the recently added generic ide_init_ioport(), which doesn't expect any ISADevice. In

[PATCH 0/7] hw/ide: Untangle ISA/PCI abuses of ide_init_ioport()

2023-02-07 Thread Philippe Mathieu-Daudé
Background thread: https://lore.kernel.org/qemu-devel/5095dffc-309b-6c72-d255-8cdaa6fd3...@ilande.co.uk/ The ide_init_ioport() method expect an ISA device, but is massaged to accept NULL device (IOW, non-ISA devices...). A plausible explanation is QOM objects can only inherit one parent, and ide_

[PATCH 2/7] hw/isa: Use isa_address_space_io() to reduce access on global 'isabus'

2023-02-07 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/isa-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 5bd99379e9..95fc1ba5f7 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -114,7 +114,7 @@ static inline void isa_init_

[PATCH 3/7] hw/ide: Rename ISA specific ide_init_ioport() as ide_init_ioport_isa()

2023-02-07 Thread Philippe Mathieu-Daudé
Rename ide_init_ioport() as ide_init_ioport_isa() to make explicit it expects an ISA device. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ioport.c | 2 +- hw/ide/isa.c | 2 +- hw/ide/piix.c | 4 ++-- include/hw/ide/internal.h | 2 +- 4 files changed, 5 inse

[PATCH 1/7] hw/isa: Un-inline isa_bus_from_device()

2023-02-07 Thread Philippe Mathieu-Daudé
No point in inlining isa_bus_from_device() which is only used at device realization time. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/isa-bus.c | 5 + include/hw/isa/isa.h | 5 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c i

Re: [PATCH v9 14/14] docs/devel: Align VFIO migration docs to v2 protocol

2023-02-07 Thread Alex Williamson
On Mon, 6 Feb 2023 14:31:37 +0200 Avihai Horon wrote: > Now that VFIO migration protocol v2 has been implemented and v1 protocol > has been removed, update the documentation according to v2 protocol. > > Signed-off-by: Avihai Horon > Reviewed-by: Cédric Le Goater > --- > docs/devel/vfio-migra

[PATCH 1/2] exec/ioport: Factor portio_list_register_flush_coalesced() out

2023-02-07 Thread Philippe Mathieu-Daudé
We always follow the same pattern when registering coalesced portio: - portio_list_init() - portio_list_set_flush_coalesced() - portio_list_add() Factor these 3 operations in a single helper named portio_list_register_flush_coalesced(). Drop portio_list_set_flush_coalesced() which is now i

[PATCH 0/2] exec/ioport: Factor portio_list_register[flush_coalesced]() out

2023-02-07 Thread Philippe Mathieu-Daudé
Preliminary to further ISA API cleanups... Convert this sequence: - portio_list_init() - portio_list_set_flush_coalesced() - portio_list_add() to portio_list_register_flush_coalesced(), and the non-coalescing equivalent: - portio_list_init() - portio_list_add() to portio_list_register(). Phil

[PATCH 2/2] exec/ioport: Factor portio_list_register() out

2023-02-07 Thread Philippe Mathieu-Daudé
We always follow the same pattern when registering non-coalesced portio: - portio_list_init() - portio_list_add() Factor these 2 operations in a single helper named portio_list_register(). Since both calls become local to ioport.c, reduce their scope by declaring them static. Signed-off-by:

Re: [PATCH v9 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-02-07 Thread Alex Williamson
On Mon, 6 Feb 2023 14:31:33 +0200 Avihai Horon wrote: > @@ -523,6 +745,41 @@ static int vfio_save_iterate(QEMUFile *f, void *opaque) > return 0; > } > > +static int vfio_save_complete_precopy(QEMUFile *f, void *opaque) > +{ > +VFIODevice *vbasedev = opaque; > +enum vfio_device_mig_

Re: [PATCH 3/3] hw/isa/vt82c686: Implement ACPI powerdown

2023-02-07 Thread Bernhard Beschow
Am 31. Januar 2023 14:58:01 UTC schrieb BALATON Zoltan : >On Sun, 29 Jan 2023, Bernhard Beschow wrote: >> Signed-off-by: Bernhard Beschow >> --- >> hw/isa/vt82c686.c | 15 +++ >> 1 file changed, 15 insertions(+) >> >> diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c >> index b0765

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-07 Thread Tom Lendacky
On 2/7/23 15:45, Michael S. Tsirkin wrote: On Tue, Feb 07, 2023 at 08:41:16AM +, Dov Murik wrote: Recent feature to supply RNG seed to the guest kernel modifies the kernel command-line by adding extra data at its end; this breaks measured boot with SEV and OVMF, and possibly signed boot. Sp

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-07 Thread Jason A. Donenfeld
Hi Tom, On Tue, Feb 7, 2023 at 8:21 PM Tom Lendacky wrote: > > On 2/7/23 15:45, Michael S. Tsirkin wrote: > > On Tue, Feb 07, 2023 at 08:41:16AM +, Dov Murik wrote: > >> Recent feature to supply RNG seed to the guest kernel modifies the > >> kernel command-line by adding extra data at its end

Re: [PATCH 1/3] hw/isa/vt82c686: Fix SCI routing

2023-02-07 Thread Bernhard Beschow
Am 31. Januar 2023 14:42:29 UTC schrieb BALATON Zoltan : >On Sun, 29 Jan 2023, Bernhard Beschow wrote: >> According to the PCI specification, the hardware is not supposed to use >> PCI_INTERRUPT_PIN for interrupt routing. Use the dedicated ACPI >> Interrupt Select register for SCI routing instea

Re: [PATCH v2 10/11] target/arm: Store CPUARMState::nvic as NVICState*

2023-02-07 Thread Richard Henderson
On 2/6/23 12:35, Philippe Mathieu-Daudé wrote: There is no point in using a void pointer to access the NVIC. Use the real type to avoid casting it while debugging. Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/armv7m_nvic.c | 38 --- target/arm/cpu.c |

Re: [PATCH v2 09/11] target/arm: Restrict CPUARMState::nvic to sysemu

2023-02-07 Thread Richard Henderson
On 2/6/23 12:35, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 05/11] target/arm: Convert CPUARMState::eabi to boolean

2023-02-07 Thread Richard Henderson
On 2/6/23 12:34, Philippe Mathieu-Daudé wrote: Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- linux-user/arm/cpu_loop.c | 4 ++-- linux-user/user-internals.h | 2 +- target/arm/cpu.h| 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) Reviewed

Re: [PATCH v2 03/11] target/arm: Reduce arm_v7m_mmu_idx_[all/for_secstate_and_priv]() scope

2023-02-07 Thread Richard Henderson
On 2/6/23 12:34, Philippe Mathieu-Daudé wrote: arm_v7m_mmu_idx_all() and arm_v7m_mmu_idx_for_secstate_and_priv() are only used for system emulation in m_helper.c. Move the definitions to avoid prototype forward declarations. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/internals.h | 14

Re: [PATCH v2 02/11] target/arm: Simplify arm_v7m_mmu_idx_for_secstate() for user emulation

2023-02-07 Thread Richard Henderson
On 2/6/23 12:34, Philippe Mathieu-Daudé wrote: Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/arm/m_helper.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 01/11] hw/intc/armv7m_nvic: Use OBJECT_DECLARE_SIMPLE_TYPE() macro

2023-02-07 Thread Richard Henderson
On 2/6/23 12:34, Philippe Mathieu-Daudé wrote: Manually convert to OBJECT_DECLARE_SIMPLE_TYPE() macro, similarly to automatic conversion from commit 8063396bf3 ("Use OBJECT_DECLARE_SIMPLE_TYPE when possible"). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/intc/armv7m_nvic.h | 5 +

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-07 Thread Jason A. Donenfeld
On Tue, Feb 07, 2023 at 07:33:09PM -0300, Jason A. Donenfeld wrote: > On Tue, Feb 7, 2023 at 7:31 PM Michael S. Tsirkin wrote: > > > > On Tue, Feb 07, 2023 at 07:17:58PM -0300, Jason A. Donenfeld wrote: > > > On Tue, Feb 07, 2023 at 04:45:19PM -0500, Michael S. Tsirkin wrote: > > > > On Tue, Feb 0

[PATCH 1/2] x86: reset rng seed when reading cmdline, not kernel image

2023-02-07 Thread Jason A. Donenfeld
With eac7a7791bb6 ("x86: don't let decompressed kernel image clobber setup_data"), the rng seed setup_data is now appended to the cmdline file rather than the kernel image file. But in the process, the code to re-randomize the seed when selecting the image was left out. So, change the re-randomizat

[PATCH 0/2] x86: fix fallout from switching setup_data from kernel image to cmdline

2023-02-07 Thread Jason A. Donenfeld
With eac7a7791bb6 ("x86: don't let decompressed kernel image clobber setup_data"), the rng seed setup_data is now appended to the cmdline file rather than the kernel image file. In the process of doing that, two things were left out: the check for sev_enabled(), and resetting the RNG seed when sele

[PATCH 2/2] x86: don't append setup_data to cmdline for SEV guests

2023-02-07 Thread Jason A. Donenfeld
From: Dov Murik Modifying the cmdline by appending setup_data breaks measured boot with SEV and OVMF, and possibly signed boot. Previously this was disabled when appending to the kernel image, but with eac7a7791bb6 ("x86: don't let decompressed kernel image clobber setup_data"), this was changed

Re: [PATCH v3 9/9] target/i386/tcg/sysemu/tcg-cpu: Avoid own opinion about smram size

2023-02-07 Thread Bernhard Beschow
Am 5. Februar 2023 11:26:10 UTC schrieb "Philippe Mathieu-Daudé" : >On 4/2/23 16:10, Bernhard Beschow wrote: >> When setting up the CPU's smram memory region alias, the code currently >> assumes that the smram size is 4 GiB. While this is true, it repeats a >> decision made elsewhere which seem

Re: [PATCH v3 8/9] hw/i386/x86: Make TYPE_X86_MACHINE the owner of smram

2023-02-07 Thread Bernhard Beschow
Am 7. Februar 2023 18:34:40 UTC schrieb Juan Quintela : >Bernhard Beschow wrote: >v> On Mon, Feb 6, 2023 at 11:06 AM Juan Quintela wrote: >> >>> Philippe Mathieu-Daudé wrote: >>> > On 4/2/23 16:10, Bernhard Beschow wrote: >>> >> Treat the smram MemoryRegion analoguous to other memory regions

Re: [PATCH v9 07/14] vfio/migration: Block multiple devices migration

2023-02-07 Thread Alex Williamson
On Mon, 6 Feb 2023 14:31:30 +0200 Avihai Horon wrote: > Currently VFIO migration doesn't implement some kind of intermediate > quiescent state in which P2P DMAs are quiesced before stopping or > running the device. This can cause problems in multi-device migration > where the devices are doing P2

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-07 Thread Jason A. Donenfeld
On Tue, Feb 7, 2023 at 7:31 PM Michael S. Tsirkin wrote: > > On Tue, Feb 07, 2023 at 07:17:58PM -0300, Jason A. Donenfeld wrote: > > On Tue, Feb 07, 2023 at 04:45:19PM -0500, Michael S. Tsirkin wrote: > > > On Tue, Feb 07, 2023 at 08:41:16AM +, Dov Murik wrote: > > > > Recent feature to supply

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-07 Thread Michael S. Tsirkin
On Tue, Feb 07, 2023 at 07:17:58PM -0300, Jason A. Donenfeld wrote: > On Tue, Feb 07, 2023 at 04:45:19PM -0500, Michael S. Tsirkin wrote: > > On Tue, Feb 07, 2023 at 08:41:16AM +, Dov Murik wrote: > > > Recent feature to supply RNG seed to the guest kernel modifies the > > > kernel command-line

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-07 Thread Jason A. Donenfeld
On Tue, Feb 07, 2023 at 04:45:19PM -0500, Michael S. Tsirkin wrote: > On Tue, Feb 07, 2023 at 08:41:16AM +, Dov Murik wrote: > > Recent feature to supply RNG seed to the guest kernel modifies the > > kernel command-line by adding extra data at its end; this breaks > > measured boot with SEV and

Re: [PULL 00/25] aspeed queue

2023-02-07 Thread Peter Maydell
ilable in the Git repository at: > > https://github.com/legoater/qemu/ tags/pull-aspeed-20230207 > > for you to fetch changes up to bf81b8f8acda4f1f774adc5f8e76225d472c6ae5: > > aspeed/sdmc: Drop unnecessary scu include (2023-02-07 09:02:05 +0100) > >

Re: [PATCH] virtio-rng-pci: fix transitional migration compat for vectors

2023-02-07 Thread Michael S. Tsirkin
On Tue, Feb 07, 2023 at 06:31:53PM +, Dr. David Alan Gilbert wrote: > * Philippe Mathieu-Daudé (phi...@linaro.org) wrote: > > On 7/2/23 18:49, Dr. David Alan Gilbert (git) wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > In bad9c5a5166fd5e3a892b7b0477cf2f4bd3a959a I fixed the virito-rn

Re: [PATCH] virtio-rng-pci: fix transitional migration compat for vectors

2023-02-07 Thread Michael S. Tsirkin
On Tue, Feb 07, 2023 at 05:49:44PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > In bad9c5a5166fd5e3a892b7b0477cf2f4bd3a959a I fixed the virito-rng-pci virtio? > migration compatibility, but it was discovered that we also need to fix > the other aliases of the

Re: [PATCH V2] memory: flat section iterator

2023-02-07 Thread Peter Xu
On Tue, Feb 07, 2023 at 04:28:49PM -0500, Steven Sistare wrote: > On 2/7/2023 3:10 PM, Peter Xu wrote: > > On Tue, Feb 07, 2023 at 11:03:29AM -0800, Steve Sistare wrote: > >> Add an iterator over the sections of a flattened address space. > >> This will be needed by cpr to issue vfio ioctl's on the

Re: [PATCH] x86: Don't add RNG seed to Linux cmdline for SEV guests

2023-02-07 Thread Michael S. Tsirkin
On Tue, Feb 07, 2023 at 08:41:16AM +, Dov Murik wrote: > Recent feature to supply RNG seed to the guest kernel modifies the > kernel command-line by adding extra data at its end; this breaks > measured boot with SEV and OVMF, and possibly signed boot. > > Specifically SEV doesn't miss this fea

Re: [PATCH V2] python/machine: QEMUMachine reopen_qmp_connection

2023-02-07 Thread Steven Sistare
On 2/7/2023 4:23 PM, John Snow wrote: > On Tue, Feb 7, 2023 at 4:04 PM Steven Sistare > wrote: >> >> On 2/7/2023 3:28 PM, John Snow wrote: >>> On Tue, Feb 7, 2023 at 2:03 PM Steve Sistare >>> wrote: Provide reopen_qmp_connection() to reopen a closed monitor connection. This will

Re: [PATCH V2] migration: simplify blockers

2023-02-07 Thread Peter Xu
On Tue, Feb 07, 2023 at 04:17:34PM -0500, Steven Sistare wrote: > >> + * *@reasonp is freed and set to NULL if failure is returned. > >> + * On success, the caller no longer owns *@reasonp and must not free it. > > > > This statement reads weird. IMHO the caller still owns @reasonp, but if it > >

Re: [PATCH V2] memory: flat section iterator

2023-02-07 Thread Steven Sistare
On 2/7/2023 3:10 PM, Peter Xu wrote: > On Tue, Feb 07, 2023 at 11:03:29AM -0800, Steve Sistare wrote: >> Add an iterator over the sections of a flattened address space. >> This will be needed by cpr to issue vfio ioctl's on the same memory >> ranges that are already programmed. > > Should this bet

Re: [PATCH V2] python/machine: QEMUMachine reopen_qmp_connection

2023-02-07 Thread John Snow
On Tue, Feb 7, 2023 at 4:04 PM Steven Sistare wrote: > > On 2/7/2023 3:28 PM, John Snow wrote: > > On Tue, Feb 7, 2023 at 2:03 PM Steve Sistare > > wrote: > >> > >> Provide reopen_qmp_connection() to reopen a closed monitor connection. > >> This will be needed by cpr, because qemu exec closes th

Re: [PATCH V2] migration: simplify blockers

2023-02-07 Thread Steven Sistare
On 2/7/2023 3:05 PM, Peter Xu wrote: > On Tue, Feb 07, 2023 at 11:03:13AM -0800, Steve Sistare wrote: >> Modify migrate_add_blocker and migrate_del_blocker to take an Error ** >> reason. This allows migration to own the Error object, so that if >> an error occurs, migration code can free the Error

Re: [RFC PATCH] tests: add LKFT baseline test to avocado

2023-02-07 Thread Fabiano Rosas
Alex Bennée writes: > The Linux Kernel Function Test (LKFT) project uses QEMU to test a wide > variety of kernel configurations on wide range of our emulated > platforms. They publish a known good set of images at: > > https://storage.tuxboot.com/ > > to help with bisecting regressions in eithe

Re: [PATCH V2] python/machine: QEMUMachine reopen_qmp_connection

2023-02-07 Thread Steven Sistare
On 2/7/2023 3:28 PM, John Snow wrote: > On Tue, Feb 7, 2023 at 2:03 PM Steve Sistare > wrote: >> >> Provide reopen_qmp_connection() to reopen a closed monitor connection. >> This will be needed by cpr, because qemu exec closes the monitor socket. >> >> Signed-off-by: Steve Sistare >> Reviewed-by

[PATCH v3 1/2] linux-headers: Update to v6.1

2023-02-07 Thread Peter Xu
Signed-off-by: Peter Xu --- include/standard-headers/drm/drm_fourcc.h | 34 - include/standard-headers/linux/ethtool.h | 63 +++- include/standard-headers/linux/fuse.h | 6 +- .../linux/input-event-codes.h | 1 + include/standard-headers/linux/virtio

[PATCH v3 2/2] util/userfaultfd: Support /dev/userfaultfd

2023-02-07 Thread Peter Xu
Teach QEMU to use /dev/userfaultfd when it existed and fallback to the system call if either it's not there or doesn't have enough permission. Firstly, as long as the app has permission to access /dev/userfaultfd, it always have the ability to trap kernel faults which QEMU mostly wants. Meanwhile,

[PATCH v3 0/2] util/userfaultfd: Support /dev/userfaultfd

2023-02-07 Thread Peter Xu
To Juan: from what I observe on how to update the linux headers, I think it can simply be in a pull just like a normal patch. The most recent change and its pull for reference: https://lore.kernel.org/all/20220915091035.3897-1-chenyi.qi...@intel.com/ https://lore.kernel.org/all/20220926170804.453

Re: Can we unpoison CONFIG_FOO macros?

2023-02-07 Thread Thomas Huth
On 07/02/2023 16.39, Markus Armbruster wrote: We have a boatload of CONFIG_FOO macros that may only be used in target-dependent code. We use generated config-poison.h to enforce. This is a bit annoying in the QAPI schema. Let me demonstrate with an example: QMP commands query-rocker, query-roc

Re: [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances

2023-02-07 Thread Mark Cave-Ayland
On 06/02/2023 23:40, Bernhard Beschow wrote: Am 5. Februar 2023 22:32:03 UTC schrieb Mark Cave-Ayland : On 05/02/2023 22:21, BALATON Zoltan wrote: On Sun, 5 Feb 2023, Mark Cave-Ayland wrote: On 26/01/2023 21:17, Bernhard Beschow wrote: Internal instances now defer interrupt wiring to the c

[RFC PATCH] tests: add LKFT baseline test to avocado

2023-02-07 Thread Alex Bennée
The Linux Kernel Function Test (LKFT) project uses QEMU to test a wide variety of kernel configurations on wide range of our emulated platforms. They publish a known good set of images at: https://storage.tuxboot.com/ to help with bisecting regressions in either the kernel, firmware or QEMU its

[PATCH v4 4/4] iotests/detect-zeroes-registered-buf: add new test

2023-02-07 Thread Stefan Hajnoczi
This regression test demonstrates that detect-zeroes works with registered buffers. Bug details: https://gitlab.com/qemu-project/qemu/-/issues/1404 Reviewed-by: Eric Blake Reviewed-by: Hanna Czenczek Signed-off-by: Stefan Hajnoczi --- .../tests/detect-zeroes-registered-buf| 58

[PATCH v4 0/4] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF

2023-02-07 Thread Stefan Hajnoczi
v4: - Add 'r' to read_f() getopt() call [Hanna] - Fix qemu_io_alloc() and friends buf and len with qemuio_misalign [Hanna] - Fix qemu_iovec_destroy()/qemu_io_free() ordering in aio_write_done() [Hanna] - Add mutually exclusive -z -r option check in aio_write_f() [Hanna] v3: - Restore alphabetical o

[PATCH v4 3/4] qemu-io: add -r option to register I/O buffer

2023-02-07 Thread Stefan Hajnoczi
The blk_register_buf() API is an optimization hint that allows some block drivers to avoid I/O buffer housekeeping or bounce buffers. Add an -r option to register the I/O buffer so that qemu-io can be used to test the blk_register_buf() API. The next commit will add a test that uses the new option

[PATCH v4 1/4] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF

2023-02-07 Thread Stefan Hajnoczi
When a write request is converted into a write zeroes request by the detect-zeroes= feature, it is no longer associated with an I/O buffer. The BDRV_REQ_REGISTERED_BUF flag doesn't make sense without an I/O buffer and must be cleared because bdrv_co_do_pwrite_zeroes() fails with -EINVAL when it's s

[PATCH v4 2/4] qemu-io: use BdrvRequestFlags instead of int

2023-02-07 Thread Stefan Hajnoczi
The block layer APIs use BdrvRequestFlags while qemu-io code uses int. Although the code compiles and runs fine, BdrvRequestFlags is clearer because it differentiates between other types of flags like bdrv_open() flags. This is purely refactoring. Reviewed-by: Eric Blake Reviewed-by: Hanna Czenc

Re: [PATCH 0/9] hw: Use QOM alias properties and few QOM/QDev cleanups

2023-02-07 Thread Mark Cave-Ayland
On 06/02/2023 23:04, Philippe Mathieu-Daudé wrote: On 6/2/23 22:54, Mark Cave-Ayland wrote: On 06/02/2023 15:27, Philippe Mathieu-Daudé wrote: On 6/2/23 00:29, Mark Cave-Ayland wrote: On 03/02/2023 11:36, Philippe Mathieu-Daudé wrote: These patches are extracted from a QOM/QDev refactor se

Re: [PATCH V2] python/machine: QEMUMachine reopen_qmp_connection

2023-02-07 Thread John Snow
On Tue, Feb 7, 2023 at 2:03 PM Steve Sistare wrote: > > Provide reopen_qmp_connection() to reopen a closed monitor connection. > This will be needed by cpr, because qemu exec closes the monitor socket. > > Signed-off-by: Steve Sistare > Reviewed-by: John Snow > --- > python/qemu/machine/machine

Re: [PATCH V2] memory: RAM_NAMED_FILE flag

2023-02-07 Thread Peter Xu
On Tue, Feb 07, 2023 at 11:03:33AM -0800, Steve Sistare wrote: > migrate_ignore_shared() is an optimization that avoids copying memory > that is visible and can be mapped on the target. However, a > memory-backend-ram or a memory-backend-memfd block with the RAM_SHARED > flag set is not migrated w

[PATCH v2 2/5] gitlab-ci.d/buildtest: Remove aarch64-softmmu from the build-system-ubuntu job

2023-02-07 Thread Thomas Huth
aarch64-softmmu is also checked on the same version of Ubuntu in the gcov job, so it is redundant to check again in the normal ubuntu job. Signed-off-by: Thomas Huth --- .gitlab-ci.d/buildtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.g

[PATCH v2 3/5] gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job

2023-02-07 Thread Thomas Huth
We can get rid of the build-coroutine-sigaltstack job by moving the configure flags that should be tested here to other jobs: Move --with-coroutine=sigaltstack to the build-system-debian job (where the coroutines should get some more test coverage with "make check-block", too) and --enable-trace-ba

[PATCH v2 4/5] .gitlab-ci.d/buildtest-template: Simplify the configure step

2023-02-07 Thread Thomas Huth
It's easier to use ${TARGETS:+--target-list="$TARGETS"} to add a --target-list parameter depending on whether the TARGETS variable is set or not. Signed-off-by: Thomas Huth --- .gitlab-ci.d/buildtest-template.yml | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.git

[PATCH v2 1/5] build: deprecate --enable-gprof builds and remove from CI

2023-02-07 Thread Thomas Huth
From: Alex Bennée As gprof relies on instrumentation you rarely get useful data compared to a real optimised build. Lets deprecate the build option and simplify the CI configuration as a result. Buglink: https://gitlab.com/qemu-project/qemu/-/issues/1338 Signed-off-by: Alex Bennée Message-Id: <

[PATCH v2 5/5] gitlab-ci.d: Build with --enable-fdt=system by default

2023-02-07 Thread Thomas Huth
By using --enable-fdt=system we can make sure that the configure script does not try to check out the "dtc" submodule. This should help to safe some precious CI minutes in the long run. While we're at it, also drop some now-redundant --enable-slirp and --enable-capstone statements. These used to h

[PATCH v2 0/5] Shorten the runtime of some gitlab-CI shared runner jobs

2023-02-07 Thread Thomas Huth
We're currently facing the problem that the gitlab-CI jobs for the shared runners take too much of the limited CI minutes on gitlab.com. Here are now some patches that optimize some of the jobs a little bit to take less runtime. v2: - Dropped the patches that have already been merged - Rework the

Re: [PULL 00/32] riscv-to-apply queue

2023-02-07 Thread Peter Maydell
:49:09 +) > > are available in the Git repository at: > > https://github.com/alistair23/qemu.git tags/pull-riscv-to-apply-20230207 > > for you to fetch changes up to 5474aa4f3e0a3e9c171db7c55b5baf15f2e2778c: > > hw/riscv: virt: Simp

Re: [PATCH V2] memory: flat section iterator

2023-02-07 Thread Peter Xu
On Tue, Feb 07, 2023 at 11:03:29AM -0800, Steve Sistare wrote: > Add an iterator over the sections of a flattened address space. > This will be needed by cpr to issue vfio ioctl's on the same memory > ranges that are already programmed. Should this better be proposed with the context of using it?

Re: [PATCH V2] migration: simplify blockers

2023-02-07 Thread Peter Xu
On Tue, Feb 07, 2023 at 11:03:13AM -0800, Steve Sistare wrote: > Modify migrate_add_blocker and migrate_del_blocker to take an Error ** > reason. This allows migration to own the Error object, so that if > an error occurs, migration code can free the Error and clear the client > handle, simplifyin

Re: random copy-before-write iotest failure

2023-02-07 Thread Fabiano Rosas
Peter Maydell writes: > This is on ppc64 (big-endian), a random failure > (it was while testing the riscv pullreq, but that doesn't touch > any of the block stuff): > > 616/635 qemu:block / qemu-iotests qcow2 >ERROR > 101.88s exit status 1 > ―――

  1   2   3   4   >