[PATCH v6 00/11] Support blob memory and venus on qemu

2023-12-18 Thread Huang Rui
Hi all, Sorry to late for V6, I was occupied by other stuff last two months, and right now resume the submission. Antonio Caggiano made the venus with QEMU on KVM platform last September[1]. This series are inherited from his original work to support the features of context init, hostmem,

[PATCH v6 11/11] virtio-gpu: make blob scanout use dmabuf fd

2023-12-18 Thread Huang Rui
From: Robert Beckett This relies on a virglrenderer change to include the dmabuf fd when returning resource info. Signed-off-by: Robert Beckett Signed-off-by: Huang Rui --- Changes in v6: - Add scanout_blob function for virtio-gpu-virgl. - Update for new virgl_gpu_resource.

[PATCH v6 10/11] virtio-gpu: Initialize Venus

2023-12-18 Thread Huang Rui
From: Antonio Caggiano Request Venus when initializing VirGL. Signed-off-by: Antonio Caggiano Signed-off-by: Huang Rui --- Changes in v6: - Remove the unstable API flags check because virglrenderer is already 1.0. - Squash the render server flag support into "Initialize Venus".

[PATCH v6 08/11] virtio-gpu: Resource UUID

2023-12-18 Thread Huang Rui
From: Antonio Caggiano Enable resource UUID feature and implement command resource assign UUID. This is done by introducing a hash table to map resource IDs to their UUIDs. Signed-off-by: Antonio Caggiano Signed-off-by: Huang Rui --- Changes in v6: - Set resource uuid as option. - Implement

[PATCH v6 06/11] softmmu/memory: enable automatic deallocation of memory regions

2023-12-18 Thread Huang Rui
From: Xenia Ragiadakou When the memory region has a different life-cycle from that of her parent, could be automatically released, once has been unparent and once all of her references have gone away, via the object's free callback. However, currently, the address space subsystem keeps

[PATCH v6 07/11] virtio-gpu: Handle resource blob commands

2023-12-18 Thread Huang Rui
From: Antonio Caggiano Support BLOB resources creation, mapping and unmapping by calling the new stable virglrenderer 0.10 interface. Only enabled when available and via the blob config. E.g. -device virtio-vga-gl,blob=true Signed-off-by: Antonio Caggiano Signed-off-by: Dmitry Osipenko

[PATCH v6 09/11] virtio-gpu: Support Venus capset

2023-12-18 Thread Huang Rui
From: Antonio Caggiano Add support for the Venus capset, which enables Vulkan support through the Venus Vulkan driver for virtio-gpu. Signed-off-by: Antonio Caggiano Signed-off-by: Huang Rui --- No change in v6. hw/display/virtio-gpu-virgl.c | 21 + 1 file changed, 17

[PATCH v6 04/11] virtio-gpu: Don't require udmabuf when blobs and virgl are enabled

2023-12-18 Thread Huang Rui
From: Dmitry Osipenko The udmabuf usage is mandatory when virgl is disabled and blobs feature enabled in the Qemu machine configuration. If virgl and blobs are enabled, then udmabuf requirement is optional. Since udmabuf isn't widely supported by a popular Linux distros today, let's relax the

[PATCH v6 05/11] virtio-gpu: Introduce virgl_gpu_resource structure

2023-12-18 Thread Huang Rui
Introduce a new virgl_gpu_resource data structure and helper functions for virgl. It's used to add new member which is specific for virgl in following patches of blob memory support. Signed-off-by: Huang Rui --- New patch: - Introduce new struct virgl_gpu_resource to store virgl specific

[PATCH v6 03/11] virtio-gpu: Support context init feature with virglrenderer

2023-12-18 Thread Huang Rui
Patch "virtio-gpu: CONTEXT_INIT feature" has added the context_init feature flags. We would like to enable the feature with virglrenderer, so add to create virgl renderer context with flags using context_id when valid. Originally-by: Antonio Caggiano Signed-off-by: Huang Rui --- Changes in v6:

[PATCH v6 02/11] virtio-gpu: Configure new feature flag context_create_with_flags for virglrenderer

2023-12-18 Thread Huang Rui
Configure a new feature flag (context_create_with_flags) for virglrenderer. Originally-by: Antonio Caggiano Signed-off-by: Huang Rui --- Changes in v6: - Move macros configurations under virgl.found() and rename HAVE_VIRGL_CONTEXT_CREATE_WITH_FLAGS. meson.build | 4 1 file changed, 4

[PATCH v6 01/11] linux-headers: Update to kernel headers to add venus capset

2023-12-18 Thread Huang Rui
Sync up kernel headers to update venus macro till they are merged into mainline. Signed-off-by: Huang Rui --- Changes in v6: - Venus capset is applied in kernel, so update it in qemu for future use. https://lore.kernel.org/lkml/b79dcf75-c9e8-490e-644f-3b97d95f7...@collabora.com/

Re: [PATCH v2 1/2] qdev: add IOThreadVirtQueueMappingList property type

2023-12-18 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Mon, Dec 11, 2023 at 04:32:06PM +0100, Markus Armbruster wrote: >> Kevin Wolf writes: >> >> > Am 18.09.2023 um 18:16 hat Stefan Hajnoczi geschrieben: >> >> virtio-blk and virtio-scsi devices will need a way to specify the >> >> mapping between IOThreads and

[PATCH for-9.0 v2 05/10] vfio/container: Introduce a VFIOIOMMU legacy QOM interface

2023-12-18 Thread Cédric Le Goater
Convert the legacy VFIOIOMMUOps struct to the new VFIOIOMMU QOM interface. The set of of operations for this backend can be referenced with a literal typename instead of a C struct. This will simplify support of multiple backends. Reviewed-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater ---

[PATCH for-9.0 v2 00/10] vfio: Introduce a VFIOIOMMUClass

2023-12-18 Thread Cédric Le Goater
Hello, The VFIO object hierarchy has some constraints because each VFIO type has a dual nature: a VFIO nature for passthrough support and a bus nature (PCI, AP, CCW, Platform) for its initial presentation. It seemed the best approach made because multi-inheritance is not feasible with QOM and

[PATCH for-9.0 v2 07/10] vfio/spapr: Introduce a sPAPR VFIOIOMMU QOM interface

2023-12-18 Thread Cédric Le Goater
Move vfio_spapr_container_setup() to a VFIOIOMMUClass::setup handler and convert the sPAPR VFIOIOMMUOps struct to a QOM interface. The sPAPR QOM interface inherits from the legacy QOM interface because because both have the same basic needs. The sPAPR interface is then extended with the handlers

[PATCH for-9.0 v2 01/10] vfio/spapr: Extend VFIOIOMMUOps with a release handler

2023-12-18 Thread Cédric Le Goater
This allows to abstract a bit more the sPAPR IOMMU support in the legacy IOMMU backend. Reviewed-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-container-base.h | 1 + hw/vfio/container.c | 10 +++- hw/vfio/spapr.c | 35

[PATCH for-9.0 v2 02/10] vfio/container: Introduce vfio_legacy_setup() for further cleanups

2023-12-18 Thread Cédric Le Goater
This will help subsequent patches to unify the initialization of type1 and sPAPR IOMMU backends. Reviewed-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater --- hw/vfio/container.c | 63 + 1 file changed, 35 insertions(+), 28 deletions(-) diff --git

[PATCH for-9.0 v2 09/10] vfio/spapr: Only compile sPAPR IOMMU support when needed

2023-12-18 Thread Cédric Le Goater
sPAPR IOMMU support is only needed for pseries machines. Compile out support when CONFIG_PSERIES is not set. This saves ~7K of text. Reviewed-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater --- hw/vfio/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH for-9.0 v2 04/10] vfio/container: Introduce a VFIOIOMMU QOM interface

2023-12-18 Thread Cédric Le Goater
VFIOContainerBase was not introduced as an abstract QOM object because it felt unnecessary to expose all the IOMMU backends to the QEMU machine and human interface. However, we can still abstract the IOMMU backend handlers using a QOM interface class. This provides more flexibility when

[PATCH for-9.0 v2 10/10] vfio/iommufd: Remove CONFIG_IOMMUFD usage

2023-12-18 Thread Cédric Le Goater
Availability of the IOMMUFD backend can now be fully determined at runtime and the ifdef check was a build time protection (for PPC not supporting it mostly). Reviewed-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater --- hw/vfio/common.c | 3 --- 1 file changed, 3 deletions(-) diff --git

[PATCH for-9.0 v2 06/10] vfio/container: Intoduce a new VFIOIOMMUClass::setup handler

2023-12-18 Thread Cédric Le Goater
This will help in converting the sPAPR IOMMU backend to a QOM interface. Reviewed-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-container-base.h | 1 + hw/vfio/container.c | 1 + 2 files changed, 2 insertions(+) diff --git

[PATCH for-9.0 v2 08/10] vfio/iommufd: Introduce a VFIOIOMMU iommufd QOM interface

2023-12-18 Thread Cédric Le Goater
As previously done for the sPAPR and legacy IOMMU backends, convert the VFIOIOMMUOps struct to a QOM interface. The set of of operations for this backend can be referenced with a literal typename instead of a C struct. Reviewed-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater --- v2: -

[PATCH for-9.0 v2 03/10] vfio/container: Initialize VFIOIOMMUOps under vfio_init_container()

2023-12-18 Thread Cédric Le Goater
vfio_init_container() already defines the IOMMU type of the container. Do the same for the VFIOIOMMUOps struct. This prepares ground for the following patches that will deduce the associated VFIOIOMMUOps struct from the IOMMU type. Reviewed-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater ---

Re: [External] Re: [PATCH v2 07/20] util/dsa: Implement DSA device start and stop logic.

2023-12-18 Thread Hao Xiang
On Mon, Dec 11, 2023 at 1:28 PM Fabiano Rosas wrote: > > Hao Xiang writes: > > > * DSA device open and close. > > * DSA group contains multiple DSA devices. > > * DSA group configure/start/stop/clean. > > > > Signed-off-by: Hao Xiang > > Signed-off-by: Bryan Zhang > > --- > >

Re: [External] Re: [PATCH v2 09/20] util/dsa: Implement DSA task asynchronous completion thread model.

2023-12-18 Thread Hao Xiang
On Mon, Dec 18, 2023 at 5:34 PM Wang, Lei wrote: > > On 12/19/2023 2:57, Hao Xiang wrote:> On Sun, Dec 17, 2023 at 7:11 PM Wang, > Lei > wrote: > >> > >> On 11/14/2023 13:40, Hao Xiang wrote:> * Create a dedicated thread for DSA > >> task > >> completion. > >>> * DSA completion thread runs a

Re: [PATCH 0/2] support unaligned access for some xHCI registers

2023-12-18 Thread Tomoyuki Hirose
I would be grateful if you would any comments on my patch. ping, Tomoyuki HIROSE On Mon, Dec 11, 2023 at 4:12 PM Tomoyuki HIROSE wrote: > > According to xHCI spec rev 1.2, unaligned access to xHCI Host > Controller Capability Registers are not prohibited. But current > implementation does not

Re: [External] Re: [PATCH v2 09/20] util/dsa: Implement DSA task asynchronous completion thread model.

2023-12-18 Thread Wang, Lei
On 12/19/2023 2:57, Hao Xiang wrote:> On Sun, Dec 17, 2023 at 7:11 PM Wang, Lei wrote: >> >> On 11/14/2023 13:40, Hao Xiang wrote:> * Create a dedicated thread for DSA >> task >> completion. >>> * DSA completion thread runs a loop and poll for completed tasks. >>> * Start and stop DSA completion

Re: [PATCH v2 12/12] hw/isa/vt82c686: Implement relocation and toggling of SuperI/O functions

2023-12-18 Thread BALATON Zoltan
On Mon, 18 Dec 2023, Bernhard Beschow wrote: The VIA south bridges are able to relocate and toggle (enable or disable) their SuperI/O functions. So far this is hardcoded such that all functions are always enabled and are located at fixed addresses. Some PC BIOSes seem to probe for I/O occupancy

Re: [PATCH v2 11/12] hw/ppc/pegasos2: Let pegasos2 machine configure SuperI/O functions

2023-12-18 Thread BALATON Zoltan
On Mon, 18 Dec 2023, Bernhard Beschow wrote: This is a preparation for implementing relocation and toggling of SuperI/O functions in the VT8231 device model. Upon reset, all SuperI/O functions will be deactivated, so in case if no -bios is given, let the machine configure those functions the

Re: [PATCH v2 08/12] hw/block/fdc-isa: Implement relocation and toggling for TYPE_ISA_FDC

2023-12-18 Thread BALATON Zoltan
On Mon, 18 Dec 2023, Bernhard Beschow wrote: Implement isa_fdc_set_{enabled,iobase} in order to implement relocation and toggling of SuperI/O functions in the VIA south bridges without breaking encapsulation. You may want to revise these commit messages. What toggling means is only defined in

Re: [PATCH v2 06/12] exec/ioport: Add portio_list_set_address()

2023-12-18 Thread BALATON Zoltan
On Mon, 18 Dec 2023, Bernhard Beschow wrote: Some SuperI/O devices such as the VIA south bridges or the PC87312 controller are able to relocate their SuperI/O functions. Add a convenience function for implementing this in the VIA south bridges. This convenience function relies on previous

Re: [PATCH v2 04/12] hw/char/parallel: Free struct ParallelState from PortioList

2023-12-18 Thread BALATON Zoltan
On Mon, 18 Dec 2023, Bernhard Beschow wrote: ParallelState::portio_list isn't used inside ParallelState context but only inside ISAParallelState context, so more it there. Same comments as for patch 1 otherwise Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow ---

Re: [PATCH v2 03/12] hw/char/serial: Free struct SerialState from MemoryRegion

2023-12-18 Thread BALATON Zoltan
On Mon, 18 Dec 2023, Bernhard Beschow wrote: SerialState::io isn't used within TYPE_SERIAL directly. Push it to its users to make them the owner of the MemoryRegion. I'm not sure this patch is needed. The users already own the SerialState so can use its memory region so they don't need their

Re: [PATCH v2 02/12] hw/block/fdc-sysbus: Free struct FDCtrl from MemoryRegion

2023-12-18 Thread BALATON Zoltan
On Mon, 18 Dec 2023, Bernhard Beschow wrote: FDCtrl::iomem isn't used inside FDCtrl context but only inside FDCtrlSysBus context, so more it there. Same comments as for patch 1 otherwise Reviewed-by: BALATON Zoltan Signed-off-by: Bernhard Beschow --- hw/block/fdc-internal.h | 2 --

Re: [PATCH v2 01/12] hw/block/fdc-isa: Free struct FDCtrl from PortioList

2023-12-18 Thread BALATON Zoltan
On Mon, 18 Dec 2023, Bernhard Beschow wrote: FDCtrl::portio_list isn't used inside FDCtrl context but only inside FDCtrlISABus context, so more it there. "more" -> "move", you have the same typo in several other commit messages. Not sure I like the C++ism FDCtrl::portio_list and would write

Re: [PATCH 04/12] hw/block/fdc: Expose internal header

2023-12-18 Thread BALATON Zoltan
On Mon, 18 Dec 2023, Bernhard Beschow wrote: Am 18. Dezember 2023 10:54:56 UTC schrieb BALATON Zoltan : On Sun, 17 Dec 2023, Bernhard Beschow wrote: Am 17. Dezember 2023 15:47:33 UTC schrieb BALATON Zoltan : On Sun, 17 Dec 2023, Bernhard Beschow wrote: Exposing the internal header allows for

Re: [PATCH] target/riscv/kvm: do not use non-portable strerrorname_np()

2023-12-18 Thread Daniel Henrique Barboza
On 12/18/23 18:35, Michael Tokarev wrote: 18.12.2023 20:20, Daniel Henrique Barboza wrote: On 12/18/23 13:22, Natanael Copa wrote: strerrorname_np is non-portable and breaks building with musl libc. Use strerror(errno) instead, like we do other places. Cc: qemu-sta...@nongnu.org Fixes:

Re: [PATCH 1/1] target/riscv/kvm.c: remove group setting of KVM AIA if the machine only has 1 socket

2023-12-18 Thread Daniel Henrique Barboza
On 12/18/23 06:05, Yong-Xuan Wang wrote: The emulated AIA within the Linux kernel restores the HART index of the IMSICs according to the configured AIA settings. During this process, the group setting is used only when the machine partitions harts into groups. It's unnecessary to set the

Re: [PATCH] target/riscv/kvm: do not use non-portable strerrorname_np()

2023-12-18 Thread Michael Tokarev
18.12.2023 20:20, Daniel Henrique Barboza wrote: On 12/18/23 13:22, Natanael Copa wrote: strerrorname_np is non-portable and breaks building with musl libc. Use strerror(errno) instead, like we do other places. Cc: qemu-sta...@nongnu.org Fixes: commit 082e9e4a58ba (target/riscv/kvm: improve

Re: [PATCH 1/1] hw/riscv/virt.c: fix the interrupts-extended property format of PLIC

2023-12-18 Thread Daniel Henrique Barboza
On 12/18/23 06:05, Yong-Xuan Wang wrote: The interrupts-extended property of PLIC only has 2 * hart number fields when KVM enabled, copy 4 * hart number fields to fdt will expose some uninitialized value. In this patch, I also refactor the code about the setting of interrupts-extended

Re: [PATCH] target/riscv/kvm: do not use non-portable strerrorname_np()

2023-12-18 Thread Daniel Henrique Barboza
On 12/18/23 13:22, Natanael Copa wrote: strerrorname_np is non-portable and breaks building with musl libc. Use strerror(errno) instead, like we do other places. Cc: qemu-sta...@nongnu.org Fixes: commit 082e9e4a58ba (target/riscv/kvm: improve 'init_multiext_cfg' error msg) Resolves:

[PATCH v2 1/4] linux-headers: Update to Linux v6.7-rc5

2023-12-18 Thread Daniel Henrique Barboza
We'll add a new RISC-V linux-header file, but first let's update all headers. Headers for 'asm-loongarch' were added in this update. Signed-off-by: Daniel Henrique Barboza Acked-by: Alistair Francis --- include/standard-headers/drm/drm_fourcc.h | 2 +

[PATCH v2 0/4] target/riscv: add RVV CSRs

2023-12-18 Thread Daniel Henrique Barboza
Hi, This version was rebased on top of Alistair's riscv-to-apply.next. A small tweak was needed in patch 4 due to changes in the branch. I took the chance to update linux-headers to 6.7-rc5, although the differences from the rc3 headers from v1 were minimal. All patches acked. Changes from v1:

[PATCH v2 2/4] linux-headers: riscv: add ptrace.h

2023-12-18 Thread Daniel Henrique Barboza
KVM vector support for RISC-V requires the linux-header ptrace.h. Signed-off-by: Daniel Henrique Barboza Acked-by: Alistair Francis --- linux-headers/asm-riscv/ptrace.h | 132 +++ scripts/update-linux-headers.sh | 3 + 2 files changed, 135 insertions(+) create

[PATCH v2 3/4] target/riscv/kvm: do PR_RISCV_V_SET_CONTROL during realize()

2023-12-18 Thread Daniel Henrique Barboza
Linux RISC-V vector documentation (Document/arch/riscv/vector.rst) mandates a prctl() in order to allow an userspace thread to use the Vector extension from the host. This is something to be done in realize() time, after init(), when we already decided whether we're using RVV or not. We don't

[PATCH v2 4/4] target/riscv/kvm: add RVV and Vector CSR regs

2023-12-18 Thread Daniel Henrique Barboza
Add support for RVV and Vector CSR KVM regs vstart, vl and vtype. Support for vregs[] requires KVM side changes and an extra reg (vlenb) and will be added later. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- target/riscv/kvm/kvm-cpu.c | 74

Re: [PATCH] hw/acpi: propagate vcpu hotplug after switch to modern interface

2023-12-18 Thread Aaron Young
Hi. I wanted to follow up with information to test/reproduce this BUG/issue. Steps to reproduce: 1. Use the following options with QEMU (configured with OVMF): -S -smp 2,maxcpus=260,sockets=2,cores=65,threads=2 2. Start QEMU and when QEMU reaches the paused state (due to -S), issue

Re: [External] Re: [PATCH v2 09/20] util/dsa: Implement DSA task asynchronous completion thread model.

2023-12-18 Thread Hao Xiang
On Sun, Dec 17, 2023 at 7:11 PM Wang, Lei wrote: > > On 11/14/2023 13:40, Hao Xiang wrote:> * Create a dedicated thread for DSA > task > completion. > > * DSA completion thread runs a loop and poll for completed tasks. > > * Start and stop DSA completion thread during DSA device start stop. > >

Re: [PATCH 04/12] hw/block/fdc: Expose internal header

2023-12-18 Thread Bernhard Beschow
Am 18. Dezember 2023 10:54:56 UTC schrieb BALATON Zoltan : >On Sun, 17 Dec 2023, Bernhard Beschow wrote: >> Am 17. Dezember 2023 15:47:33 UTC schrieb BALATON Zoltan >> : >>> On Sun, 17 Dec 2023, Bernhard Beschow wrote: Exposing the internal header allows for exposing struct FDCtrlISABus

[PATCH v2 10/12] hw/char/parallel-isa: Implement relocation and toggling for TYPE_ISA_PARALLEL

2023-12-18 Thread Bernhard Beschow
Implement isa_parallel_set_{enabled,iobase} in order to implement relocation and toggling of SuperI/O functions in the VIA south bridges without breaking encapsulation. Signed-off-by: Bernhard Beschow --- include/hw/char/parallel-isa.h | 3 +++ hw/char/parallel-isa.c | 14

[PATCH v2 09/12] hw/char/serial-isa: Implement relocation and toggling for TYPE_ISA_SERIAL

2023-12-18 Thread Bernhard Beschow
Implement isa_serial_set_{enabled,iobase} in order to implement relocation and toggling of SuperI/O functions in the VIA south bridges without breaking encapsulation. Signed-off-by: Bernhard Beschow --- include/hw/char/serial.h | 2 ++ hw/char/serial-isa.c | 14 ++ 2 files

[PATCH v2 03/12] hw/char/serial: Free struct SerialState from MemoryRegion

2023-12-18 Thread Bernhard Beschow
SerialState::io isn't used within TYPE_SERIAL directly. Push it to its users to make them the owner of the MemoryRegion. Signed-off-by: Bernhard Beschow --- include/hw/char/serial.h | 2 +- hw/char/serial-isa.c | 7 +-- hw/char/serial-pci-multi.c | 7 --- hw/char/serial-pci.c

[PATCH v2 07/12] exec/ioport: Add portio_list_set_enabled()

2023-12-18 Thread Bernhard Beschow
Some SuperI/O devices such as the VIA south bridges or the PC87312 controller allow to enable or disable their SuperI/O functions. Add a convenience function for implementing this in the VIA south bridges. The naming of the functions is inspired by its memory_region_set_enabled() pendant.

[PATCH v2 11/12] hw/ppc/pegasos2: Let pegasos2 machine configure SuperI/O functions

2023-12-18 Thread Bernhard Beschow
This is a preparation for implementing relocation and toggling of SuperI/O functions in the VT8231 device model. Upon reset, all SuperI/O functions will be deactivated, so in case if no -bios is given, let the machine configure those functions the same way pegasos2.rom would do. For now the

[PATCH v2 12/12] hw/isa/vt82c686: Implement relocation and toggling of SuperI/O functions

2023-12-18 Thread Bernhard Beschow
The VIA south bridges are able to relocate and toggle (enable or disable) their SuperI/O functions. So far this is hardcoded such that all functions are always enabled and are located at fixed addresses. Some PC BIOSes seem to probe for I/O occupancy before activating such a function and issue an

[PATCH v2 01/12] hw/block/fdc-isa: Free struct FDCtrl from PortioList

2023-12-18 Thread Bernhard Beschow
FDCtrl::portio_list isn't used inside FDCtrl context but only inside FDCtrlISABus context, so more it there. Signed-off-by: Bernhard Beschow --- hw/block/fdc-internal.h | 2 -- hw/block/fdc-isa.c | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v2 08/12] hw/block/fdc-isa: Implement relocation and toggling for TYPE_ISA_FDC

2023-12-18 Thread Bernhard Beschow
Implement isa_fdc_set_{enabled,iobase} in order to implement relocation and toggling of SuperI/O functions in the VIA south bridges without breaking encapsulation. Signed-off-by: Bernhard Beschow --- include/hw/block/fdc.h | 3 +++ hw/block/fdc-isa.c | 14 ++ 2 files changed,

[PATCH v2 02/12] hw/block/fdc-sysbus: Free struct FDCtrl from MemoryRegion

2023-12-18 Thread Bernhard Beschow
FDCtrl::iomem isn't used inside FDCtrl context but only inside FDCtrlSysBus context, so more it there. Signed-off-by: Bernhard Beschow --- hw/block/fdc-internal.h | 2 -- hw/block/fdc-sysbus.c | 6 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/block/fdc-internal.h

[PATCH v2 04/12] hw/char/parallel: Free struct ParallelState from PortioList

2023-12-18 Thread Bernhard Beschow
ParallelState::portio_list isn't used inside ParallelState context but only inside ISAParallelState context, so more it there. Signed-off-by: Bernhard Beschow --- include/hw/char/parallel-isa.h | 2 ++ include/hw/char/parallel.h | 2 -- hw/char/parallel.c | 2 +- 3 files

[PATCH v2 05/12] exec/ioport: Resolve redundant .base attribute in struct MemoryRegionPortio

2023-12-18 Thread Bernhard Beschow
portio_list_add_1() creates a MemoryRegionPortioList instance which holds a MemoryRegion `mr` and an array of MemoryRegionPortio elements named `ports`. Each element in the array gets assigned the same value for its .base attribute. The same value also ends up as the .addr attribute of `mr` due to

[PATCH v2 06/12] exec/ioport: Add portio_list_set_address()

2023-12-18 Thread Bernhard Beschow
Some SuperI/O devices such as the VIA south bridges or the PC87312 controller are able to relocate their SuperI/O functions. Add a convenience function for implementing this in the VIA south bridges. This convenience function relies on previous simplifications in exec/ioport which avoids some

[PATCH v2 00/12] hw/isa/vt82c686: Implement relocation and toggling of SuperI/O functions

2023-12-18 Thread Bernhard Beschow
This series implements relocation of the SuperI/O functions of the VIA south bridges which resolves some FIXME's. It is part of my via-apollo-pro-133t branch [1] which is an extension of bringing the VIA south bridges to the PC machine [2]. This branch is able to run some real-world X86 BIOSes in

Re: [External] Re: [PATCH v2 12/20] migration/multifd: Add new migration option for multifd DSA offloading.

2023-12-18 Thread Hao Xiang
On Mon, Dec 11, 2023 at 11:44 AM Fabiano Rosas wrote: > > Hao Xiang writes: > > > Intel DSA offloading is an optional feature that turns on if > > proper hardware and software stack is available. To turn on > > DSA offloading in multifd live migration: > > > > multifd-dsa-accel="[dsa_dev_path1]

Re: [PATCH] target/riscv/kvm: do not use non-portable strerrorname_np()

2023-12-18 Thread Daniel Henrique Barboza
On 12/18/23 14:53, Peter Maydell wrote: On Mon, 18 Dec 2023 at 17:22, Daniel Henrique Barboza wrote: On 12/18/23 13:22, Natanael Copa wrote: strerrorname_np is non-portable and breaks building with musl libc. Use strerror(errno) instead, like we do other places. Cc:

Re: [PATCH] target/riscv/kvm: do not use non-portable strerrorname_np()

2023-12-18 Thread Peter Maydell
On Mon, 18 Dec 2023 at 17:22, Daniel Henrique Barboza wrote: > > > > On 12/18/23 13:22, Natanael Copa wrote: > > strerrorname_np is non-portable and breaks building with musl libc. > > > > Use strerror(errno) instead, like we do other places. > > > > Cc: qemu-sta...@nongnu.org > > Fixes: commit

Re: [PATCH] target/riscv/kvm: do not use non-portable strerrorname_np()

2023-12-18 Thread Daniel Henrique Barboza
On 12/18/23 13:22, Natanael Copa wrote: strerrorname_np is non-portable and breaks building with musl libc. Use strerror(errno) instead, like we do other places. Cc: qemu-sta...@nongnu.org Fixes: commit 082e9e4a58ba (target/riscv/kvm: improve 'init_multiext_cfg' error msg) Resolves:

Re: [RFC PATCH v2 1/6] target/riscv: Remove obsolete pointer masking extension code.

2023-12-18 Thread Alexey Baturo
Hi Alistair, Thanks for the lightning fast reply! Could you please tell who should bump those numbers and to what values? Do you think I could submit this patch series for the review? Thanks пн, 18 дек. 2023 г. в 06:11, Alistair Francis : > On Sat, Dec 16, 2023 at 11:52 PM Alexey Baturo >

Re: [PATCH v3 11/45] Introduce Raspberry PI 4 machine

2023-12-18 Thread Peter Maydell
On Mon, 4 Dec 2023 at 00:27, Sergey Kambalin wrote: > > Signed-off-by: Sergey Kambalin > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v4 10/45] Add BCM2838 checkpoint support

2023-12-18 Thread Peter Maydell
On Fri, 8 Dec 2023 at 02:33, Sergey Kambalin wrote: > > Signed-off-by: Sergey Kambalin > --- > hw/arm/bcm2838_peripherals.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/arm/bcm2838_peripherals.c b/hw/arm/bcm2838_peripherals.c > index c147b6e453..196fb890a2 100644

Re: [PATCH v4 09/45] Add GPIO and SD to BCM2838 periph

2023-12-18 Thread Peter Maydell
On Fri, 8 Dec 2023 at 02:37, Sergey Kambalin wrote: > > Signed-off-by: Sergey Kambalin > --- > hw/arm/bcm2838_peripherals.c | 140 +++ > include/hw/arm/bcm2838_peripherals.h | 9 ++ > 2 files changed, 149 insertions(+) > @@ -42,6 +73,115 @@ static void

Re: [PATCH v4 08/45] Connect SD controller to BCM2838 GPIO

2023-12-18 Thread Peter Maydell
On Fri, 8 Dec 2023 at 02:33, Sergey Kambalin wrote: > > Signed-off-by: Sergey Kambalin > --- > hw/gpio/bcm2838_gpio.c | 59 +++--- > include/hw/gpio/bcm2838_gpio.h | 5 +++ > 2 files changed, 60 insertions(+), 4 deletions(-) > > diff --git

Re: [PATCH v4 07/45] Implement BCM2838 GPIO functionality

2023-12-18 Thread Peter Maydell
On Fri, 8 Dec 2023 at 02:33, Sergey Kambalin wrote: > > Signed-off-by: Sergey Kambalin > --- > hw/gpio/bcm2838_gpio.c | 192 - > 1 file changed, 189 insertions(+), 3 deletions(-) > static uint64_t bcm2838_gpio_read(void *opaque, hwaddr offset, unsigned

Re: [PATCH v4 06/45] Add BCM2838 GPIO stub

2023-12-18 Thread Peter Maydell
On Fri, 8 Dec 2023 at 02:39, Sergey Kambalin wrote: > > Signed-off-by: Sergey Kambalin > --- > hw/arm/bcm2838.c | 4 +- > hw/gpio/bcm2838_gpio.c | 152 +++ > hw/gpio/meson.build | 5 +- >

[PATCH] target/riscv/kvm: do not use non-portable strerrorname_np()

2023-12-18 Thread Natanael Copa
strerrorname_np is non-portable and breaks building with musl libc. Use strerror(errno) instead, like we do other places. Cc: qemu-sta...@nongnu.org Fixes: commit 082e9e4a58ba (target/riscv/kvm: improve 'init_multiext_cfg' error msg) Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2041

Re: [PATCH v4 05/45] Add GIC-400 to BCM2838 SoC

2023-12-18 Thread Peter Maydell
On Fri, 8 Dec 2023 at 02:32, Sergey Kambalin wrote: > > Signed-off-by: Sergey Kambalin > --- > hw/arm/bcm2838.c | 167 +++ > hw/arm/trace-events | 2 + > include/hw/arm/bcm2838.h | 2 + >

Re: [PATCH v4 04/45] Introduce BCM2838 SoC

2023-12-18 Thread Peter Maydell
On Fri, 8 Dec 2023 at 02:33, Sergey Kambalin wrote: > > Signed-off-by: Sergey Kambalin > --- > hw/arm/bcm2838.c | 100 +++ > hw/arm/bcm2838_peripherals.c | 72 +++ > hw/arm/meson.build | 2 + >

Re: [PATCH v4 03/45] Split out raspi machine common part

2023-12-18 Thread Peter Maydell
On Fri, 8 Dec 2023 at 02:36, Sergey Kambalin wrote: > > Pre-setup for raspberry pi 4 introduction > > Signed-off-by: Sergey Kambalin Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v4 01/45] Split out common part of BCM283X classes

2023-12-18 Thread Peter Maydell
On Fri, 8 Dec 2023 at 02:32, Sergey Kambalin wrote: > > Pre setup for BCM2838 introduction > > Signed-off-by: Sergey Kambalin > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v4 02/45] Split out common part of peripherals

2023-12-18 Thread Peter Maydell
On Fri, 8 Dec 2023 at 02:40, Sergey Kambalin wrote: > > Pre-setup for BCM2838 introduction > > Signed-off-by: Sergey Kambalin Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v3 01/45] Split out common part of BCM283X classes

2023-12-18 Thread Peter Maydell
On Mon, 4 Dec 2023 at 00:28, Sergey Kambalin wrote: > > Pre setup for BCM2838 introduction > > Signed-off-by: Sergey Kambalin > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v3 01/45] Split out common part of BCM283X classes

2023-12-18 Thread Peter Maydell
On Mon, 18 Dec 2023 at 15:57, Peter Maydell wrote: > > On Mon, 4 Dec 2023 at 00:28, Sergey Kambalin wrote: > > > > Pre setup for BCM2838 introduction > > > > Signed-off-by: Sergey Kambalin > > --- > > Reviewed-by: Peter Maydell Whoops, I meant to send this as a reply to the v4 patch. -- PMM

Re: [PATCH v2 10/14] aio: remove aio_context_acquire()/aio_context_release() API

2023-12-18 Thread Kevin Wolf
Am 05.12.2023 um 19:20 hat Stefan Hajnoczi geschrieben: > Delete these functions because nothing calls these functions anymore. > > I introduced these APIs in commit 98563fc3ec44 ("aio: add > aio_context_acquire() and aio_context_release()") in 2014. It's with a > sigh of relief that I delete

Re: [PATCH v2 08/14] scsi: remove AioContext locking

2023-12-18 Thread Kevin Wolf
Am 05.12.2023 um 19:20 hat Stefan Hajnoczi geschrieben: > The AioContext lock no longer has any effect. Remove it. > > Signed-off-by: Stefan Hajnoczi > Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf

Re: [PATCH v2 09/14] aio-wait: draw equivalence between AIO_WAIT_WHILE() and AIO_WAIT_WHILE_UNLOCKED()

2023-12-18 Thread Kevin Wolf
Am 05.12.2023 um 19:20 hat Stefan Hajnoczi geschrieben: > Now that the AioContext lock no longer exists, AIO_WAIT_WHILE() and > AIO_WAIT_WHILE_UNLOCKED() are equivalent. > > A future patch will get rid of AIO_WAIT_WHILE_UNLOCKED(). > > Signed-off-by: Stefan Hajnoczi > Reviewed-by: Eric Blake

Re: [PATCH v2 07/14] block: remove bdrv_co_lock()

2023-12-18 Thread Kevin Wolf
Am 05.12.2023 um 19:20 hat Stefan Hajnoczi geschrieben: > The bdrv_co_lock() and bdrv_co_unlock() functions are already no-ops. > Remove them. > > Signed-off-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf

Re: [PATCH v2 02/14] scsi: assert that callbacks run in the correct AioContext

2023-12-18 Thread Kevin Wolf
Am 05.12.2023 um 19:19 hat Stefan Hajnoczi geschrieben: > Since the removal of AioContext locking, the correctness of the code > relies on running requests from a single AioContext at any given time. > > Add assertions that verify that callbacks are invoked in the correct > AioContext. > >

Re: [PATCH v5] fsl-imx: add simple RTC emulation for i.MX6 and i.MX7 boards

2023-12-18 Thread Peter Maydell
On Sat, 16 Dec 2023 at 13:34, Nikita Ostrenkov wrote: > > Signed-off-by: Nikita Ostrenkov > --- > hw/misc/imx7_snvs.c | 93 ++--- > hw/misc/trace-events| 4 +- > include/hw/misc/imx7_snvs.h | 7 ++- > 3 files changed, 94 insertions(+), 10

Re: [PATCH] target/arm/helper: Propagate MDCR_EL2.HPMN into PMCR_EL0.N

2023-12-18 Thread Peter Maydell
On Fri, 15 Dec 2023 at 15:16, Jean-Philippe Brucker wrote: > > MDCR_EL2.HPMN allows an hypervisor to limit the number of PMU counters > available to EL1 and EL0 (to keep the others to itself). QEMU already > implements this split correctly, except for PMCR_EL0.N reads: the number > of counters

[PATCH v8 13/13] hw/riscv/virt-acpi-build.c: Add PLIC in MADT

2023-12-18 Thread Sunil V L
Add PLIC structures for each socket in the MADT when system is configured with PLIC as the external interrupt controller. Signed-off-by: Haibo Xu Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Reviewed-by: Andrew Jones Acked-by: Alistair Francis Acked-by: Michael S. Tsirkin

[PATCH v8 05/13] hw/riscv/virt-acpi-build.c: Add AIA support in RINTC

2023-12-18 Thread Sunil V L
Update the RINTC structure in MADT with AIA related fields. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Acked-by: Alistair Francis Reviewed-by: Andrew Jones Acked-by: Michael S. Tsirkin --- hw/riscv/virt-acpi-build.c | 43 ++ 1 file

[PATCH v8 07/13] hw/riscv/virt-acpi-build.c: Add APLIC in the MADT

2023-12-18 Thread Sunil V L
Add APLIC structures for each socket in the MADT when system is configured with APLIC as the external wired interrupt controller. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Reviewed-by: Andrew Jones Acked-by: Alistair Francis Acked-by: Michael S. Tsirkin ---

[PATCH v8 09/13] hw/riscv/virt-acpi-build.c: Add MMU node in RHCT

2023-12-18 Thread Sunil V L
MMU type information is available via MMU node in RHCT. Add this node in RHCT. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Reviewed-by: Andrew Jones Acked-by: Alistair Francis Acked-by: Michael S. Tsirkin --- hw/riscv/virt-acpi-build.c | 36

[PATCH v8 12/13] hw/riscv/virt-acpi-build.c: Add IO controllers and devices

2023-12-18 Thread Sunil V L
Add basic IO controllers and devices like PCI, VirtIO and UART in the ACPI namespace. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Acked-by: Alistair Francis Acked-by: Michael S. Tsirkin --- hw/riscv/Kconfig | 1 + hw/riscv/virt-acpi-build.c | 79

[PATCH v8 11/13] hw/riscv/virt: Update GPEX MMIO related properties

2023-12-18 Thread Sunil V L
Update the GPEX host bridge properties related to MMIO ranges with values set for the virt machine. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Acked-by: Michael S. Tsirkin --- hw/riscv/virt.c | 47 -

[PATCH v8 03/13] hw/i386/acpi-microvm.c: Use common function to add virtio in DSDT

2023-12-18 Thread Sunil V L
With common function to add virtio in DSDT created now, update microvm code also to use it instead of duplicate code. Suggested-by: Andrew Jones Signed-off-by: Sunil V L Acked-by: Alistair Francis Acked-by: Michael S. Tsirkin --- hw/i386/acpi-microvm.c | 15 ++- 1 file changed, 2

[PATCH v8 10/13] hw/pci-host/gpex: Define properties for MMIO ranges

2023-12-18 Thread Sunil V L
ACPI DSDT generator needs information like ECAM range, PIO range, 32-bit and 64-bit PCI MMIO range etc related to the PCI host bridge. Instead of making these values machine specific, create properties for the GPEX host bridge with default value 0. During initialization, the firmware can

[PATCH v8 06/13] hw/riscv/virt-acpi-build.c: Add IMSIC in the MADT

2023-12-18 Thread Sunil V L
Add IMSIC structure in MADT when IMSIC is configured. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Reviewed-by: Andrew Jones Acked-by: Alistair Francis Acked-by: Michael S. Tsirkin --- hw/riscv/virt-acpi-build.c | 35 +++ 1 file changed, 35

[PATCH v8 01/13] hw/arm/virt-acpi-build.c: Migrate fw_cfg creation to common location

2023-12-18 Thread Sunil V L
RISC-V also needs to use the same code to create fw_cfg in DSDT. So, avoid code duplication by moving the code in arm and riscv to a device specific file. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Reviewed-by:

[PATCH v8 08/13] hw/riscv/virt-acpi-build.c: Add CMO information in RHCT

2023-12-18 Thread Sunil V L
When CMO related extensions like Zicboz, Zicbom and Zicbop are enabled, the block size for those extensions need to be communicated via CMO node in RHCT. Add CMO node in RHCT if any of those CMO extensions are detected. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Reviewed-by:

  1   2   3   >