Re: [PATCH v4 29/66] i386/tdx: Support user configurable mrconfigid/mrowner/mrownerconfig

2024-02-19 Thread Markus Armbruster
Xiaoyao Li writes: > From: Isaku Yamahata > > Three sha384 hash values, mrconfigid, mrowner and mrownerconfig, of a TD > can be provided for TDX attestation. Detailed meaning of them can be > found: > https://lore.kernel.org/qemu-devel/31d6dbc1-f453-4cef-ab08-4813f4e0f...@intel.com/ > > Allow u

Re: [PATCH 1/6] hw/arm: Inline sysbus_create_simple(PL110 / PL111)

2024-02-19 Thread Mark Cave-Ayland
On 19/02/2024 12:00, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Philippe Mathieu-Daudé wrote: On 19/2/24 12:27, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Philippe Mathieu-Daudé wrote: On 16/2/24 20:54, Philippe Mathieu-Daudé wrote: On 16/2/24 18:14, BALATON Zoltan wrote: On Fri, 16 Feb 202

Re: [PATCH v2 1/3] tests/migration-test: Stick with gicv3 in aarch64 test

2024-02-19 Thread Peter Maydell
On Mon, 19 Feb 2024 at 11:54, Thomas Huth wrote: > > On 07/02/2024 01.54, pet...@redhat.com wrote: > > From: Peter Xu > > > > Recently we introduced cross-binary migration test. It's always wanted > > that migration-test uses stable guest ABI for both QEMU binaries in this > > case, so that both

Re: [PATCH v4 53/66] i386/tdx: Wire TDX_REPORT_FATAL_ERROR with GuestPanic facility

2024-02-19 Thread Markus Armbruster
Xiaoyao Li writes: > Integrate TDX's TDX_REPORT_FATAL_ERROR into QEMU GuestPanic facility > > Originated-from: Isaku Yamahata > Signed-off-by: Xiaoyao Li > --- > Changes in v4: > - refine the documentation; (Markus) > > Changes in v3: > - Add docmentation of new type and struct; (Daniel) > - re

Re: [PATCH v4 50/66] i386/tdx: handle TDG.VP.VMCALL

2024-02-19 Thread Daniel P . Berrangé
On Mon, Feb 19, 2024 at 01:50:12PM +0100, Markus Armbruster wrote: > Xiaoyao Li writes: > > > From: Isaku Yamahata > > > > Add property "quote-generation-socket" to tdx-guest, which is a property > > of type SocketAddress to specify Quote Generation Service(QGS). > > > > On request of GetQuote,

Re: [PATCH v2 07/11] hw/audio/virtio-sound: add stream state variable

2024-02-19 Thread Manos Pitsidianakis
Hello Volker, On Sun, 18 Feb 2024 at 10:34, Volker Rümelin wrote: > > So far, only rudimentary checks have been made to ensure that > the guest only performs state transitions permitted in > virtio-v1.2-csd01 5.14.6.6.1 PCM Command Lifecycle. 5.14.6.6.1 is non-normative in virtio v1.2. You can e

Re: [PATCH v2 07/11] hw/audio/virtio-sound: add stream state variable

2024-02-19 Thread Michael S. Tsirkin
On Mon, Feb 19, 2024 at 02:59:45PM +0200, Manos Pitsidianakis wrote: > Hello Volker, > > On Sun, 18 Feb 2024 at 10:34, Volker Rümelin wrote: > > > > So far, only rudimentary checks have been made to ensure that > > the guest only performs state transitions permitted in > > virtio-v1.2-csd01 5.14.

Re: [PATCH v3 01/11] gdbstub: Support disablement in a multi-threaded process

2024-02-19 Thread Ilya Leoshkevich
On Sat, 2024-02-17 at 10:21 -1000, Richard Henderson wrote: > On 2/16/24 03:05, Ilya Leoshkevich wrote: > > The upcoming follow-fork-mode child support will require disabling > > gdbstub in the parent process, which may have multiple threads > > (which > > are represented as CPUs). > > > > Loop ov

Re: [PATCH 1/6] hw/arm: Inline sysbus_create_simple(PL110 / PL111)

2024-02-19 Thread Peter Maydell
On Mon, 19 Feb 2024 at 12:49, Mark Cave-Ayland wrote: > > On 19/02/2024 12:00, BALATON Zoltan wrote: > > For new people trying to contribute to QEMU QDev is overwhelming so having > > some way > > to need less of it to do simple things would help them to get started. > > It depends what how you d

Re: [PATCH] tests/qtest: Fix boot-serial-test when using --without-default-devices

2024-02-19 Thread BALATON Zoltan
On Mon, 19 Feb 2024, Thomas Huth wrote: On 19/02/2024 12.37, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Thomas Huth wrote: If "configure" has been run with "--without-default-devices", there is no e1000 device in the binaries, so the boot-serial-test currently fails in that case since it tries

Re: [PATCH 1/6] hw/arm: Inline sysbus_create_simple(PL110 / PL111)

2024-02-19 Thread Mark Cave-Ayland
On 19/02/2024 13:05, Peter Maydell wrote: On Mon, 19 Feb 2024 at 12:49, Mark Cave-Ayland wrote: On 19/02/2024 12:00, BALATON Zoltan wrote: For new people trying to contribute to QEMU QDev is overwhelming so having some way to need less of it to do simple things would help them to get starte

Re: [PATCH 1/6] hw/arm: Inline sysbus_create_simple(PL110 / PL111)

2024-02-19 Thread Peter Maydell
On Mon, 19 Feb 2024 at 13:33, Mark Cave-Ayland wrote: > > On 19/02/2024 13:05, Peter Maydell wrote: > > > On Mon, 19 Feb 2024 at 12:49, Mark Cave-Ayland > > wrote: > >> > >> On 19/02/2024 12:00, BALATON Zoltan wrote: > >>> For new people trying to contribute to QEMU QDev is overwhelming so > >>>

Re: [PATCH 19/21] hw/s390x/zpci-bus: Add QOM parentship relation with zPCI devices

2024-02-19 Thread Thomas Huth
On 16/02/2024 12.03, Philippe Mathieu-Daudé wrote: QDev objects created with qdev_*new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé --- hw/s390x/s390-pci-bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/s

Re: [PATCH 1/6] hw/arm: Inline sysbus_create_simple(PL110 / PL111)

2024-02-19 Thread BALATON Zoltan
On Mon, 19 Feb 2024, Philippe Mathieu-Daudé wrote: On 19/2/24 13:00, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Philippe Mathieu-Daudé wrote: On 19/2/24 12:27, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Philippe Mathieu-Daudé wrote: On 16/2/24 20:54, Philippe Mathieu-Daudé wrote: On 16/2/24

Re: [PATCH v2 5/6] tests/qtest: Reorganize common code in ivshmem-test

2024-02-19 Thread Thomas Huth
On 16/02/2024 15.44, Philippe Mathieu-Daudé wrote: From: Gustavo Romero This commit reorganizes the ivshmem-test qtest by moving common structs, functions, and code that can be utilized by other ivshmem qtests into two new files: ivshmem-utils.h and ivshmem-utils.c. Enum Reg, struct ServerThre

Re: [PATCH 1/6] hw/arm: Inline sysbus_create_simple(PL110 / PL111)

2024-02-19 Thread BALATON Zoltan
On Mon, 19 Feb 2024, Mark Cave-Ayland wrote: On 19/02/2024 12:00, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Philippe Mathieu-Daudé wrote: On 19/2/24 12:27, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Philippe Mathieu-Daudé wrote: On 16/2/24 20:54, Philippe Mathieu-Daudé wrote: On 16/2/24 18:

Re: [PATCH] tests/qtest: Don't run the dbus-display-test without CONFIG_VGA_PCI

2024-02-19 Thread Marc-André Lureau
Hi On Mon, Feb 19, 2024 at 4:39 PM Thomas Huth wrote: > > When compiling with "configure --without-default-devices", the > dbus-display-test fails since it implicitly assumes that the > machine comes with the standard VGA card. Thus add a check to > meson.build to disable the test if the VGA card

Re: [PATCH v2 6/6] tests/qtest: Add ivshmem-flat test

2024-02-19 Thread Thomas Huth
On 16/02/2024 15.44, Philippe Mathieu-Daudé wrote: From: Gustavo Romero Add qtest for the ivshmem-flat device. Signed-off-by: Gustavo Romero Message-ID: <20231127052024.435743-4-gustavo.rom...@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/ivshmem-flat-test.c | 320 +

Re: [PATCH 1/6] hw/arm: Inline sysbus_create_simple(PL110 / PL111)

2024-02-19 Thread BALATON Zoltan
On Mon, 19 Feb 2024, Mark Cave-Ayland wrote: On 19/02/2024 13:05, Peter Maydell wrote: On Mon, 19 Feb 2024 at 12:49, Mark Cave-Ayland wrote: On 19/02/2024 12:00, BALATON Zoltan wrote: For new people trying to contribute to QEMU QDev is overwhelming so having some way to need less of it to d

Sponsorship via Github

2024-02-19 Thread jakob.breu
Hallo qemu developers, my company, Mercedes-Benz, has a FOSS sponsorship program for which employees can suggest projects. As we are using qemu pretty widely I proposed to sponsor qemu. Unfortunately, our program is only supporting Github sponsors due to organizational restrictions. So I wonder

Trying to write data to i2c bus

2024-02-19 Thread Paz Offer
Hi, I am new to QEMU development, so please excuse if I my direction here is wrong: I am trying to implement an i2c slave device. My device should be able to read/write data from its i2c bus. I defined my device-state object like so: typedef struct {   I2CSlave i2c;   void

[PATCH] target/ppc: Add power10 pmu SPRs

2024-02-19 Thread Madhavan Srinivasan
Currently in tcg mode, when reading from power10 pmu spr like MMCR3, qemu logs this message (when starting qemu with -d guest_errors) Trying to read invalid spr 754 (0x2f2) at 30056bb0 This is becuase, no read/write call-backs are registered for these SPRs. Add support to register

Re: [PATCH] system/physmem: Fix migration dirty bitmap coherency with TCG memory access

2024-02-19 Thread Thomas Huth
On 19/02/2024 07.17, Nicholas Piggin wrote: The fastpath in cpu_physical_memory_sync_dirty_bitmap() to test large aligned ranges forgot to bring the TCG TLB up to date after clearing some of the dirty memory bitmap bits. This can result in stores though the TCG TLB not setting the dirty memory bi

Re: [PATCH v8 2/4] qmp: add dump machine type compatibility properties

2024-02-19 Thread Markus Armbruster
Maksim Davydov writes: > To control that creating new machine type doesn't affect the previous > types (their compat_props) and to check complex compat_props inheritance > we need qmp command to print machine type compatibility properties. > This patch adds the ability to get list of all the comp

Re: [PATCH v2 1/3] tests/migration-test: Stick with gicv3 in aarch64 test

2024-02-19 Thread Fabiano Rosas
Peter Maydell writes: > On Mon, 19 Feb 2024 at 11:54, Thomas Huth wrote: >> >> On 07/02/2024 01.54, pet...@redhat.com wrote: >> > From: Peter Xu >> > >> > Recently we introduced cross-binary migration test. It's always wanted >> > that migration-test uses stable guest ABI for both QEMU binarie

[PATCH 1/5] hw/acpi: Include missing 'qapi/qapi-types-acpi.h' generated header

2024-02-19 Thread Philippe Mathieu-Daudé
ACPIOSTInfo is a QAPI generated structure: $ git grep -w ACPIOSTInfo qapi/acpi.json:81:# @ACPIOSTInfo: qapi/acpi.json:99:{ 'struct': 'ACPIOSTInfo', qapi/acpi.json:109:# Return a list of ACPIOSTInfo for devices that support status Include the "qapi/qapi-types-acpi.h" header to avoid the f

[PATCH 2/5] hw/acpi/cpu: Use CPUState typedef

2024-02-19 Thread Philippe Mathieu-Daudé
QEMU coding style recommend using structure typedefs: https://www.qemu.org/docs/master/devel/style.html#typedefs Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Zhao Liu --- include/hw/acpi/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH 3/5] hw/acpi/ich9: Include missing headers

2024-02-19 Thread Philippe Mathieu-Daudé
The ICH9LPCPMRegs structure has MemoryRegion and Notifier fields, so requires the "qemu/notify.h" and "exec/memory.h" headers. However nothing from "hw/acpi/acpi_dev_interface.h" is required, so reduce its inclusion to hw/acpi/ich9.c source file where it is used. Signed-off-by: Philippe Mathieu-D

[PATCH 0/5] hw/acpi: Include missing headers

2024-02-19 Thread Philippe Mathieu-Daudé
Patches extracted from an ICH9 model rework. Explicitly include required headers instead of having them being randomply pulled. Philippe Mathieu-Daudé (5): hw/acpi: Include missing 'qapi/qapi-types-acpi.h' generated header hw/acpi/cpu: Use CPUState typedef hw/acpi/ich9: Include missing heade

[PATCH 5/5] hw/i386/q35: Include missing 'hw/acpi/acpi.h' header

2024-02-19 Thread Philippe Mathieu-Daudé
"hw/acpi/acpi.h" is implicitly included. Included it explicitly to avoid when refactoring headers: hw/i386/pc_q35.c:209:43: error: use of undeclared identifier 'ACPI_PM_PROP_ACPI_PCIHP_BRIDGE' ACPI_PM_PROP_ACPI_PCIHP_BRIDGE, ^ Signed-of

[PATCH 4/5] hw/acpi/ich9_tco: Include missing 'migration/vmstate.h' header

2024-02-19 Thread Philippe Mathieu-Daudé
We need the VMStateDescription structure definition from "migration/vmstate.h" in order to declare vmstate_tco_io_sts. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/acpi/ich9_tco.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/acpi/ich9_tco.h b/include/hw/acpi/ich9_tco.h

[PATCH v4 01/12] gdbstub: Support disablement in a multi-threaded process

2024-02-19 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support will require disabling gdbstub in the parent process, which may have multiple threads (which are represented as CPUs). Loop over all CPUs in order to remove breakpoints and disable single-step. Move the respective code into a separate function. Reviewed

[PATCH v4 05/12] {linux,bsd}-user: Pass pid to fork_end()

2024-02-19 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support requires knowing the child pid. Pass it down. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- bsd-user/freebsd/os-proc.h | 6 +++--- bsd-user/main.c | 4 +++- bsd-user/qemu.h | 2 +-

[PATCH v4 08/12] gdbstub: Introduce gdb_handle_query_supported_user()

2024-02-19 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support requires advertising the fork-events feature, which is user-specific. Introduce a user-specific hook for this. Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- gdbstub/gdbstub.c | 12 +--- gdbstub/internals.h | 1 + gdbstu

[PATCH v4 04/12] gdbstub: Introduce gdbserver_fork_start()

2024-02-19 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support requires knowing when fork() is about to happen in order to initialize its state. Add a hook for that. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich --- bsd-user/main.c| 1 + gdbstub/user.c | 4 include/gdbstub/user.h |

[PATCH v4 07/12] gdbstub: Call gdbserver_fork() both in parent and in child

2024-02-19 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support requires post-fork message exchange between the parent and the child. Prepare gdbserver_fork() for this purpose. Rename it to gdbserver_fork_end() to better reflect its purpose. Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- bsd-us

[PATCH v4 12/12] tests/tcg: Add two follow-fork-mode tests

2024-02-19 Thread Ilya Leoshkevich
Add follow-fork-mode child and and follow-fork-mode parent tests. Check for the obvious pitfalls, such as lingering breakpoints, catchpoints, and single-step mode. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/Makefile.target | 17 +- tests/tcg/multiarch/follow-fork-mode.

[PATCH v4 10/12] gdbstub: Introduce gdb_handle_detach_user()

2024-02-19 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support needs to perform certain actions when GDB detaches from the stopped parent or the stopped child. Introduce a user-specific hook for this. Signed-off-by: Ilya Leoshkevich --- gdbstub/gdbstub.c | 6 ++ gdbstub/internals.h | 1 + gdbstub/user.c

[PATCH v4 06/12] {linux,bsd}-user: Pass pid to gdbserver_fork()

2024-02-19 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support requires knowing the child pid. Pass it down. Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- bsd-user/main.c| 2 +- gdbstub/user.c | 2 +- include/gdbstub/user.h | 2 +- linux-user/main.c | 2 +- 4 files change

Re: [PATCH v3 01/11] gdbstub: Support disablement in a multi-threaded process

2024-02-19 Thread Ilya Leoshkevich
On Mon, 2024-02-19 at 14:05 +0100, Ilya Leoshkevich wrote: > On Sat, 2024-02-17 at 10:21 -1000, Richard Henderson wrote: > > On 2/16/24 03:05, Ilya Leoshkevich wrote: > > > The upcoming follow-fork-mode child support will require > > > disabling > > > gdbstub in the parent process, which may have m

[PATCH v4 09/12] gdbstub: Introduce gdb_handle_set_thread_user()

2024-02-19 Thread Ilya Leoshkevich
The upcoming follow-fork-mode child support needs to perform certain actions when GDB switches between the stopped parent and the stopped child. Introduce a user-specific hook for this. Signed-off-by: Ilya Leoshkevich --- gdbstub/gdbstub.c | 11 +-- gdbstub/internals.h | 1 + gdbstub/

Re: [PATCH v2 1/3] tests/migration-test: Stick with gicv3 in aarch64 test

2024-02-19 Thread Thomas Huth
On 19/02/2024 13.50, Peter Maydell wrote: On Mon, 19 Feb 2024 at 11:54, Thomas Huth wrote: On 07/02/2024 01.54, pet...@redhat.com wrote: From: Peter Xu Recently we introduced cross-binary migration test. It's always wanted that migration-test uses stable guest ABI for both QEMU binaries in

[PATCH v4 11/12] gdbstub: Implement follow-fork-mode child

2024-02-19 Thread Ilya Leoshkevich
Currently it's not possible to use gdbstub for debugging linux-user code that runs in a forked child, which is normally done using the `set follow-fork-mode child` GDB command. Purely on the protocol level, the missing piece is the fork-events feature. However, a deeper problem is supporting $Hg s

[PATCH v4 00/12] gdbstub: Implement follow-fork-mode child

2024-02-19 Thread Ilya Leoshkevich
v3: https://lists.gnu.org/archive/html/qemu-devel/2024-02/msg03142.html v3 -> v4: Address the review comments, add R-bs. Add the get_task_state() refactoring. Keep passing CPUState to gdbserver_fork_end() for tb_flush(). Patches that need review: 02/12, 09/12-12/12. v

[PATCH v4 02/12] {linux,bsd}-user: Introduce get_task_state()

2024-02-19 Thread Ilya Leoshkevich
A CPU's TaskState is stored in the CPUState's void *opaque field, accessing which is somewhat awkward due to having to use a cast. Introduce a wrapper and use it everywhere. Suggested-by: Alex Bennée Signed-off-by: Ilya Leoshkevich --- bsd-user/bsd-file.h | 2 +- bsd-user/qemu.h

[PATCH v4 03/12] {linux,bsd}-user: Update ts_tid after fork()

2024-02-19 Thread Ilya Leoshkevich
Currently ts_tid contains the parent tid after fork(), which is not correct. So far it has not affected anything, but the upcoming follow-fork-mode child support relies on the correct value, so fix it. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich --- bsd-user/main.c | 1 + linux-u

Re: [PATCH 1/6] hw/arm: Inline sysbus_create_simple(PL110 / PL111)

2024-02-19 Thread Philippe Mathieu-Daudé
On 19/2/24 14:33, Mark Cave-Ayland wrote: On 19/02/2024 13:05, Peter Maydell wrote: On Mon, 19 Feb 2024 at 12:49, Mark Cave-Ayland wrote: On 19/02/2024 12:00, BALATON Zoltan wrote: For new people trying to contribute to QEMU QDev is overwhelming so having some way to need less of it to do

Re: [PATCH v4 4/7] block: Support detached LUKS header creation using blockdev-create

2024-02-19 Thread Markus Armbruster
yong.hu...@smartx.com writes: > From: Hyman Huang > > Firstly, enable the ability to choose the block device containing > a detachable LUKS header by adding the 'header' parameter to > BlockdevCreateOptionsLUKS. > > Secondly, when formatting the LUKS volume with a detachable header, > truncate th

Re: [PATCH v4 5/7] block: Support detached LUKS header creation using qemu-img

2024-02-19 Thread Markus Armbruster
yong.hu...@smartx.com writes: > From: Hyman Huang > > Even though a LUKS header might be created with cryptsetup, > qemu-img should be enhanced to accommodate it as well. > > Add the 'detached-header' option to specify the creation of > a detached LUKS header. This is how it is used: > $ qemu-img

Re: [PATCH 1/6] hw/arm: Inline sysbus_create_simple(PL110 / PL111)

2024-02-19 Thread Philippe Mathieu-Daudé
On 19/2/24 14:57, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Mark Cave-Ayland wrote: On 19/02/2024 12:00, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Philippe Mathieu-Daudé wrote: On 19/2/24 12:27, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Philippe Mathieu-Daudé wrote: On 16/2/24 20:54, Phil

Re: [PATCH v4 02/12] {linux,bsd}-user: Introduce get_task_state()

2024-02-19 Thread Warner Losh
On Mon, Feb 19, 2024 at 7:21 AM Ilya Leoshkevich wrote: > A CPU's TaskState is stored in the CPUState's void *opaque field, > accessing which is somewhat awkward due to having to use a cast. > Introduce a wrapper and use it everywhere. > > Suggested-by: Alex Bennée > Signed-off-by: Ilya Leoshkev

Re: [PATCH v4 03/12] {linux,bsd}-user: Update ts_tid after fork()

2024-02-19 Thread Warner Losh
On Mon, Feb 19, 2024 at 7:22 AM Ilya Leoshkevich wrote: > Currently ts_tid contains the parent tid after fork(), which is not > correct. So far it has not affected anything, but the upcoming > follow-fork-mode child support relies on the correct value, so fix it. > > Reviewed-by: Alex Bennée > S

[PATCH v4 0/5] Virtio dmabuf improvements

2024-02-19 Thread Albert Esteve
v1: https://www.mail-archive.com/qemu-devel@nongnu.org/msg1005257.html v2: https://www.mail-archive.com/qemu-devel@nongnu.org/msg1014615.html v3: Virtio dmabuf improvements v3 -> v4 - Changed GMutex by QemuMutex in virtio-dmabuf - Made the value at VirtioSharedObject an union to make naming

[PATCH v4 1/5] hw/virtio: check owner for removing objects

2024-02-19 Thread Albert Esteve
Shared objects lack spoofing protection. For VHOST_USER_BACKEND_SHARED_OBJECT_REMOVE messages received by the vhost-user interface, any backend was allowed to remove entries from the shared table just by knowing the UUID. Only the owner of the entry shall be allowed to removed their resources from

[PATCH v4 5/5] hw/virtio: rename virtio dmabuf API

2024-02-19 Thread Albert Esteve
Functions in the virtio-dmabuf module start with 'virtio_*', which is too generic and may not correctly identify them as part of the virtio dmabuf API. Rename all functions to 'virtio_dmabuf_*' instead to avoid confusion. Signed-off-by: Albert Esteve Acked-by: Stefan Hajnoczi Reviewed-by: Phili

[PATCH v4 2/5] hw/virtio: document SharedObject structures

2024-02-19 Thread Albert Esteve
Change VirtioSharedObject value type from a generic pointer to a union storing the different supported underlying types, which makes naming less confusing. With the update, use the chance to add kdoc to both the SharedObjectType enum and VirtioSharedObject struct. Signed-off-by: Albert Esteve --

[PATCH v4 3/5] hw/virtio: change dmabuf mutex to QemuMutex

2024-02-19 Thread Albert Esteve
Change GMutex by QemuMutex to be able to use lock contexts with `WITH_QEMU_LOCK_GUARD`. As the lock needs to be initialised and there is no central point for initialisation, add an init public function and call it from virtio.c, each time a new backend structure is initialised. Signed-off-by: Alb

[PATCH v4 4/5] hw/virtio: cleanup shared resources

2024-02-19 Thread Albert Esteve
Ensure that we cleanup all virtio shared resources when the vhost devices is cleaned up (after a hot unplug, or a crash). To do so, we add a new function to the virtio_dmabuf API called `virtio_dmabuf_vhost_cleanup`, which loop through the table and removes all resources owned by the vhost device

Re: [PATCH 19/21] hw/s390x/zpci-bus: Add QOM parentship relation with zPCI devices

2024-02-19 Thread Philippe Mathieu-Daudé
On 19/2/24 14:38, Thomas Huth wrote: On 16/02/2024 12.03, Philippe Mathieu-Daudé wrote: QDev objects created with qdev_*new() need to manually add their parent relationship with object_property_add_child(). Signed-off-by: Philippe Mathieu-Daudé ---   hw/s390x/s390-pci-bus.c | 1 +   1 file chan

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Markus Armbruster
Sam Li writes: > Markus Armbruster 于2024年2月19日周一 13:05写道: >> >> One more thing... >> >> Markus Armbruster writes: >> >> > I apologize for the delayed review. > > No problems. Thanks for reviewing! > >> > >> > Sam Li writes: >> > >> >> To configure the zoned format feature on the qcow2 driver,

Re: [PATCH v4 50/66] i386/tdx: handle TDG.VP.VMCALL

2024-02-19 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Mon, Feb 19, 2024 at 01:50:12PM +0100, Markus Armbruster wrote: >> Xiaoyao Li writes: >> >> > From: Isaku Yamahata >> > >> > Add property "quote-generation-socket" to tdx-guest, which is a property >> > of type SocketAddress to specify Quote Generation Service(Q

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Sam Li
Markus Armbruster 于2024年2月19日周一 15:40写道: > > Sam Li writes: > > > Markus Armbruster 于2024年2月19日周一 13:05写道: > >> > >> One more thing... > >> > >> Markus Armbruster writes: > >> > >> > I apologize for the delayed review. > > > > No problems. Thanks for reviewing! > > > >> > > >> > Sam Li writes:

Re: [PULL 09/49] tests/avocado: Add FreeBSD distro boot tests for ppc

2024-02-19 Thread BALATON Zoltan
On Mon, 19 Feb 2024, Nicholas Piggin wrote: FreeBSD project provides qcow2 images that work well for testing QEMU. Add pseries tests for HPT and Radix, KVM and TCG. This uses a short term VM image, because FreeBSD has not set up long term builds for ppc64 at present. Other architectures could be

Re: [PATCH v4 4/7] block: Support detached LUKS header creation using blockdev-create

2024-02-19 Thread Markus Armbruster
One more thing... Markus Armbruster writes: > yong.hu...@smartx.com writes: > >> From: Hyman Huang >> >> Firstly, enable the ability to choose the block device containing >> a detachable LUKS header by adding the 'header' parameter to >> BlockdevCreateOptionsLUKS. >> >> Secondly, when formattin

Re: [PULL 22/49] hw/pci-host/raven.c: Mark raven_io_ops as implementing unaligned accesses

2024-02-19 Thread BALATON Zoltan
On Mon, 19 Feb 2024, Nicholas Piggin wrote: From: Peter Maydell The raven_io_ops MemoryRegionOps is the only one in the source tree which sets .valid.unaligned to indicate that it should support unaligned accesses and which does not also set .impl.unaligned to indicate that its read and write f

Re: [PULL 22/49] hw/pci-host/raven.c: Mark raven_io_ops as implementing unaligned accesses

2024-02-19 Thread Cédric Le Goater
On 2/19/24 15:49, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Nicholas Piggin wrote: From: Peter Maydell The raven_io_ops MemoryRegionOps is the only one in the source tree which sets .valid.unaligned to indicate that it should support unaligned accesses and which does not also set .impl.unalig

Re: [PULL 22/49] hw/pci-host/raven.c: Mark raven_io_ops as implementing unaligned accesses

2024-02-19 Thread Peter Maydell
On Mon, 19 Feb 2024 at 14:53, Cédric Le Goater wrote: > > On 2/19/24 15:49, BALATON Zoltan wrote: > > On Mon, 19 Feb 2024, Nicholas Piggin wrote: > >> From: Peter Maydell > >> > >> The raven_io_ops MemoryRegionOps is the only one in the source tree > >> which sets .valid.unaligned to indicate tha

Re: [PATCH v4 4/7] block: Support detached LUKS header creation using blockdev-create

2024-02-19 Thread Daniel P . Berrangé
On Mon, Feb 19, 2024 at 03:49:30PM +0100, Markus Armbruster wrote: > One more thing... > > Markus Armbruster writes: > > > yong.hu...@smartx.com writes: > > > >> From: Hyman Huang > >> > >> Firstly, enable the ability to choose the block device containing > >> a detachable LUKS header by adding

[PATCH v4 3/3] hw/cxl/cxl-mailbox-utils: Add device DDR5 ECS control feature

2024-02-19 Thread shiju . jose--- via
From: Shiju Jose CXL spec 3.1 section 8.2.9.9.11.2 describes the DDR5 Error Check Scrub (ECS) control feature. The Error Check Scrub (ECS) is a feature defined in JEDEC DDR5 SDRAM Specification (JESD79-5) and allows the DRAM to internally read, correct single-bit errors, and write back corrected

[PATCH v4 2/3] hw/cxl/cxl-mailbox-utils: Add device patrol scrub control feature

2024-02-19 Thread shiju . jose--- via
From: Shiju Jose CXL spec 3.1 section 8.2.9.9.11.1 describes the device patrol scrub control feature. The device patrol scrub proactively locates and makes corrections to errors in regular cycle. The patrol scrub control allows the request to configure patrol scrub input configurations. The patr

[PATCH v4 1/3] hw/cxl/cxl-mailbox-utils: Add support for feature commands (8.2.9.6)

2024-02-19 Thread shiju . jose--- via
From: Shiju Jose CXL spec 3.1 section 8.2.9.6 describes optional device specific features. CXL devices supports features with changeable attributes. Get Supported Features retrieves the list of supported device specific features. The settings of a feature can be retrieved using Get Feature and op

[PATCH v4 0/3] hw/cxl/cxl-mailbox-utils: Add feature commands, device patrol scrub control and DDR5 ECS control features

2024-02-19 Thread shiju . jose--- via
From: Shiju Jose Add support for the feature commands, device patrol scrub control and DDR5 ECS control features. CXL spec 3.1 section 8.2.9.6 describes optional device specific features. CXL spec 3.1 section 8.2.9.9.11.1 describes the device patrol scrub control feature. CXL spec 3.1 section 8.

Re: [PATCH v4 4/7] block: Support detached LUKS header creation using blockdev-create

2024-02-19 Thread Daniel P . Berrangé
On Mon, Feb 19, 2024 at 02:57:13PM +, Daniel P. Berrangé wrote: > On Mon, Feb 19, 2024 at 03:49:30PM +0100, Markus Armbruster wrote: > > One more thing... > > > > Markus Armbruster writes: > > > > > yong.hu...@smartx.com writes: > > > > > >> From: Hyman Huang > > >> > > >> Firstly, enable t

Re: [PULL 22/49] hw/pci-host/raven.c: Mark raven_io_ops as implementing unaligned accesses

2024-02-19 Thread Cédric Le Goater
On 2/19/24 15:55, Peter Maydell wrote: On Mon, 19 Feb 2024 at 14:53, Cédric Le Goater wrote: On 2/19/24 15:49, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Nicholas Piggin wrote: From: Peter Maydell The raven_io_ops MemoryRegionOps is the only one in the source tree which sets .valid.unalign

Re: [PATCH] iotests: adapt to output change for recently introduced 'detached header' field

2024-02-19 Thread Daniel P . Berrangé
On Fri, Feb 16, 2024 at 11:14:15AM +0100, Fiona Ebner wrote: > Failure was noticed when running the tests for the qcow2 image format. > > Fixes: 0bd779e27e ("crypto: Introduce 'detached-header' field in > QCryptoBlockInfoLUKS") > Signed-off-by: Fiona Ebner > --- > tests/qemu-iotests/198.out | 2

Re: [PATCH v3 1/3] qmp: Switch x-query-virtio-status back to numeric encoding

2024-02-19 Thread Markus Armbruster
Hyman Huang writes: > x-query-virtio-status returns several sets of virtio feature and > status flags. It goes back to v7.2.0. > > In the initial commit 90c066cd682 (qmp: add QMP command > x-query-virtio-status), we returned them as numbers, using virtio's > well-known binary encoding. > > The n

Re: [PATCH v3 1/3] qmp: Switch x-query-virtio-status back to numeric encoding

2024-02-19 Thread Markus Armbruster
Yong Huang writes: > On Tue, Feb 13, 2024 at 6:26 PM Michael S. Tsirkin wrote: > >> On Fri, Feb 02, 2024 at 10:32:15PM +0800, Hyman Huang wrote: >> > x-query-virtio-status returns several sets of virtio feature and >> > status flags. It goes back to v7.2.0. >> > >> > In the initial commit 90c06

Re: [PATCH v3 3/3] qapi: Define VhostDeviceProtocols and VirtioDeviceFeatures as plain C types

2024-02-19 Thread Markus Armbruster
Hyman Huang writes: > VhostDeviceProtocols and VirtioDeviceFeatures are only used in > virtio-hmp-cmds.c. So define them as plain C types there, and drop > them from the QAPI schema. > > Signed-off-by: Hyman Huang Reviewed-by: Markus Armbruster

Re: [PATCH rfcv2 04/18] vfio: Add host iommu device instance into VFIODevice

2024-02-19 Thread Eric Auger
Hi Zhenzhong, On 2/1/24 08:28, Zhenzhong Duan wrote: > Either IOMMULegacyDevice or IOMMUFDDevice into VFIODevice, neither > both. > > Signed-off-by: Zhenzhong Duan > --- > include/hw/vfio/vfio-common.h | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/include/hw/vfio/vfio-com

dropping 32-bit Windows host support

2024-02-19 Thread Peter Maydell
Our msys2 32-bit Windows host CI job has been failing recently because upstream MSYS2 are starting to phase out 32-bit windows host support and are steadily removing i686 versions of packages. The latest is dtc: https://gitlab.com/qemu-project/qemu/-/issues/2177 The writing is clearly on the wall

Re: [PATCH v3 2/3] virtio: Declare the decoding functions to static

2024-02-19 Thread Markus Armbruster
Hyman Huang writes: > qmp_decode_protocols(), qmp_decode_status(), and qmp_decode_features() > are now only used in virtio-hmp-cmds.c. So move them into there, > redeclare them to static, and replace the qmp_ prefix with hmp_. > > Signed-off-by: Hyman Huang > --- > hw/virtio/meson.build

Re: [PATCH v4 4/7] block: Support detached LUKS header creation using blockdev-create

2024-02-19 Thread Markus Armbruster
Daniel P. Berrangé writes: [...] > TL;DR: the @detached-header field needs to go, as that's supposed to > be internal only. The mgmt app should only care about 'header' in the > BlockdevCreateOptionsLUKS struct. > > FYI, this whole series is already merged last week. So this will need > a fixup.

Re: [PATCH rfcv2 04/18] vfio: Add host iommu device instance into VFIODevice

2024-02-19 Thread Eric Auger
On 2/1/24 08:28, Zhenzhong Duan wrote: > Either IOMMULegacyDevice or IOMMUFDDevice into VFIODevice, neither > both. > > Signed-off-by: Zhenzhong Duan > --- > include/hw/vfio/vfio-common.h | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/include/hw/vfio/vfio-common.h b/incl

Re: dropping 32-bit Windows host support

2024-02-19 Thread Daniel P . Berrangé
On Mon, Feb 19, 2024 at 03:37:31PM +, Peter Maydell wrote: > Our msys2 32-bit Windows host CI job has been failing recently > because upstream MSYS2 are starting to phase out 32-bit windows > host support and are steadily removing i686 versions of packages. > The latest is dtc: > https://gitlab

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Markus Armbruster
Sam Li writes: > Markus Armbruster 于2024年2月19日周一 15:40写道: >> >> Sam Li writes: >> >> > Markus Armbruster 于2024年2月19日周一 13:05写道: >> >> >> >> One more thing... >> >> >> >> Markus Armbruster writes: >> >> >> >> > I apologize for the delayed review. >> > >> > No problems. Thanks for reviewing! >>

[PATCH] docs/devel: Add introduction to LUKS volume with detached header

2024-02-19 Thread Hyman Huang
Signed-off-by: Hyman Huang --- MAINTAINERS | 1 + docs/devel/luks-detached-header.rst | 182 2 files changed, 183 insertions(+) create mode 100644 docs/devel/luks-detached-header.rst diff --git a/MAINTAINERS b/MAINTAINERS index a24c2b51b6..

[PATCH] target/riscv: fix ACPI MCFG table

2024-02-19 Thread X512 via
MCFG segments should point to PCI configuration range, not BAR MMIO. Signed-off-by: Ilya Chugin --- hw/riscv/virt-acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index fb8baf64f6..fe01b626ea 100644 ---

Re: [PATCH v7 2/4] qcow2: add configurations for zoned format extension

2024-02-19 Thread Sam Li
Markus Armbruster 于2024年2月19日周一 16:56写道: > > Sam Li writes: > > > Markus Armbruster 于2024年2月19日周一 15:40写道: > >> > >> Sam Li writes: > >> > >> > Markus Armbruster 于2024年2月19日周一 13:05写道: > >> >> > >> >> One more thing... > >> >> > >> >> Markus Armbruster writes: > >> >> > >> >> > I apologize fo

Re: [PATCH] configure: do not require gcc runtime library for firmwares

2024-02-19 Thread Michael Tokarev
16.02.2024 21:12, Marek Marczykowski-Górecki : probe_target_compiler() when checking for multilib support checks if -nostdlib works together with -lgcc. It isn't necessary for building various components in pc-bios/optionrom, as evidenced by looking at actually used link flags there. Alpine Linux

[RFC PATCH v2] arm/ptw: Handle atomic updates of page tables entries in MMIO during PTW.

2024-02-19 Thread Jonathan Cameron via
I'm far from confident this handling here is correct. Hence RFC. In particular not sure on what locks I should hold for this to be even moderately safe. The function already appears to be inconsistent in what it returns as the CONFIG_ATOMIC64 block returns the endian converted 'eventual' value of

Re: [PATCH v3 0/9] Enabling DCD emulation support in Qemu

2024-02-19 Thread Jonathan Cameron via
On Tue, 13 Feb 2024 10:18:15 -0800 fan wrote: > On Tue, Nov 07, 2023 at 10:07:04AM -0800, nifan@gmail.com wrote: > > From: Fan Ni > > > > > > The patch series are based on Jonathan's branch cxl-2023-09-26. > > > > The main changes include, > > 1. Update cxl_find_dc_region to detect the ca

Re: dropping 32-bit Windows host support

2024-02-19 Thread Thomas Huth
On 19/02/2024 16.53, Daniel P. Berrangé wrote: On Mon, Feb 19, 2024 at 03:37:31PM +, Peter Maydell wrote: Our msys2 32-bit Windows host CI job has been failing recently because upstream MSYS2 are starting to phase out 32-bit windows host support and are steadily removing i686 versions of pac

Re: Trying to write data to i2c bus

2024-02-19 Thread Corey Minyard
On Mon, Feb 19, 2024 at 01:49:44PM +, Paz Offer wrote: > Hi, > > I am new to QEMU development, so please excuse if I my direction here is > wrong: > > I am trying to implement an i2c slave device. > My device should be able to read/write data from its i2c bus. > > I defined my device-state

Re: [PATCH v4 1/3] hw/cxl/cxl-mailbox-utils: Add support for feature commands (8.2.9.6)

2024-02-19 Thread Jonathan Cameron via
On Mon, 19 Feb 2024 23:00:23 +0800 wrote: > From: Shiju Jose > > CXL spec 3.1 section 8.2.9.6 describes optional device specific features. > CXL devices supports features with changeable attributes. > Get Supported Features retrieves the list of supported device specific > features. The setting

[PATCH 01/14] MAINTAINERS: Add 'ICH9 South Bridge' section

2024-02-19 Thread Philippe Mathieu-Daudé
Extract 'ICH9 South Bridge' from the 'PC' section. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7d61fb9319..1b210c5cc1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1808

[PATCH 02/14] hw/i386/q35: Add local 'lpc_obj' variable

2024-02-19 Thread Philippe Mathieu-Daudé
Instead of casting OBJECT(lpc) multiple times, do it once in the new 'lpc_obj' variable. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_q35.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index a91f414922..621661a738 1006

[PATCH 05/14] hw/acpi/ich9_tco: Restrict ich9_generate_smi() declaration

2024-02-19 Thread Philippe Mathieu-Daudé
Only files including "hw/acpi/ich9_tco.h" require the ich9_generate_smi() declaration. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/acpi/ich9_tco.h| 1 + include/hw/southbridge/ich9.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/hw/acpi/ich9_tco.h b/i

[PATCH 04/14] hw/acpi/ich9_tco: Include 'ich9' in names

2024-02-19 Thread Philippe Mathieu-Daudé
Make it explicit the following are ICH9 specific: acpi_pm_tco_init() -> ich9_acpi_pm_tco_init() vmstate_tco_io_sts -> vmstate_ich9_sm_tco. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/acpi/ich9_tco.h | 5 ++--- hw/acpi/ich9.c | 4 ++-- hw/acpi/ich9_tco.c | 4 ++-

[PATCH 09/14] hw/southbridge/ich9: Add a AHCI function

2024-02-19 Thread Philippe Mathieu-Daudé
Instantiate TYPE_ICH9_AHCI in TYPE_ICH9_SOUTHBRIDGE. Since the PC machines can disable SATA (see the PC_MACHINE_SATA dynamic property), add the 'sata-enabled' property to disable it. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 ++ include/hw/southbridge/ich9.h |

[PATCH 06/14] hw/pci-bridge: Extract QOM ICH definitions to 'ich_dmi_pci.h'

2024-02-19 Thread Philippe Mathieu-Daudé
Expose TYPE_ICH_DMI_PCI_BRIDGE to the new "hw/pci-bridge/ich_dmi_pci.h" header. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + include/hw/pci-bridge/ich_dmi_pci.h | 20 include/hw/southbridge/ich9.h | 2 -- hw/pci-bridge/i82801b1

<    1   2   3   4   >