Re: [PATCH v5 05/13] hw/riscv: add riscv-iommu-pci reference device

2024-07-18 Thread Jason Chien
Hi Daniel, On 2024/7/9 上午 01:34, Daniel Henrique Barboza wrote: From: Tomasz Jeznach The RISC-V IOMMU can be modelled as a PCIe device following the guidelines of the RISC-V IOMMU spec, chapter 7.1, "Integrating an IOMMU as a PCIe device". Signed-off-by: Tomasz Jeznach Signed-off-by: Daniel

Re: [PATCH] MAINTAINERS: Cover guest-agent in QAPI schema

2024-07-18 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Wed, Jul 17, 2024 at 5:00 PM Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 7d9811458c..af4db698de 100644 > --- a/MAINTAINER

RE: [PATCH v4 11/12] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-18 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v4 11/12] vfio/migration: Don't block migration device >dirty tracking is unsupported > >On 17/07/2024 03:38, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Joao Martins >>> Subject: [PATCH v4 11/12] vfi

[PATCH v2] scripts/checkpatch: more checks on files imported from Linux

2024-07-18 Thread Stefano Garzarella
If a file imported from Linux is touched, emit a warning and suggest using scripts/update-linux-headers.sh. Also check that updating imported files from Linux are not mixed with other changes, in which case emit an error. Signed-off-by: Stefano Garzarella --- v2: - added an error when mixing imp

[PATCH] hw/loongarch: Remove unimplemented extioi INT_encode mode

2024-07-18 Thread Song Gao
Remove extioi INT_encode encode mode, because we don't emulate it. Signed-off-by: Song Gao --- hw/loongarch/virt.c| 6 -- include/hw/intc/loongarch_extioi.h | 1 - 2 files changed, 7 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index e592b1b6b7..2103a1

RE: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain creation

2024-07-18 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain >creation > >On 17/07/2024 11:05, Duan, Zhenzhong wrote: >>> -Original Message- >>> From: Joao Martins >>> Subject: Re: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain

Re: [PATCH ats_vtd v5 20/22] pci: add a pci-level API for ATS

2024-07-18 Thread CLEMENT MATHIEU--DRIF
On 18/07/2024 01:44, Minwoo Im wrote: Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe. On 24-07-11 19:00:58, CLEMENT MATHIEU--DRIF wrote: On 11/07/2024 10:04, Minwoo Im wrote: Caution: External

Re: [PATCH v2] scripts/checkpatch: more checks on files imported from Linux

2024-07-18 Thread Daniel P . Berrangé
On Thu, Jul 18, 2024 at 09:20:50AM +0200, Stefano Garzarella wrote: > If a file imported from Linux is touched, emit a warning and suggest > using scripts/update-linux-headers.sh. > > Also check that updating imported files from Linux are not mixed with > other changes, in which case emit an error

RE: [PATCH v4 00/12] hw/iommufd: IOMMUFD Dirty Tracking

2024-07-18 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v4 00/12] hw/iommufd: IOMMUFD Dirty Tracking > >On 16/07/2024 09:20, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Joao Martins >>> Subject: [PATCH v4 00/12] hw/iommufd: IOMMUFD Dirty Tracking >>> >>> T

Re: [PATCH v1 01/15] aspeed/adc: Add AST2700 support

2024-07-18 Thread Cédric Le Goater
On 7/18/24 08:49, Jamin Lin wrote: AST2700 and AST2600 ADC controllers are identical. Introduce ast2700 class and set 2 engines. Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/adc/aspeed_adc.c | 16 include/hw/adc/aspeed_adc.h | 1

Re: [PATCH v1 02/15] aspeed/soc: support ADC for AST2700

2024-07-18 Thread Cédric Le Goater
On 7/18/24 08:49, Jamin Lin wrote: Add ADC model for AST2700 ADC support. The ADC controller registers base address is start at 0x14C0_ and its address space is 0x1000. The ADC controller interrupt is connected to GICINT130_INTC group at bit 16. The GIC IRQ is 130. Signed-off-by: Jamin Lin

Re: [PATCH v1 03/15] hw/i2c/aspeed: support to set the different memory size

2024-07-18 Thread Cédric Le Goater
On 7/18/24 08:49, Jamin Lin wrote: According to the datasheet of ASPEED SOCs, an I2C controller owns 8KB of register space for AST2700, owns 4KB of register space for AST2600, AST2500 and AST2400, and owns 64KB of register space for AST1030. It set the memory region size 4KB by default and it do

Re: [PATCH v3 04/17] hw/intc/loongson_ipi: Extract loongson_ipi_common_realize()

2024-07-18 Thread Philippe Mathieu-Daudé
On 18/7/24 04:11, maobibo wrote: On 2024/7/18 上午5:46, Philippe Mathieu-Daudé wrote: From: Bibo Mao In preparation to extract common IPI code in few commits, extract loongson_ipi_common_realize(). Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Signed-o

Re: [PATCH 0/4] ui: fixes for dbus clipboard hanling

2024-07-18 Thread Philippe Mathieu-Daudé
On 17/7/24 19:15, marcandre.lur...@redhat.com wrote: Marc-André Lureau (4): ui: add more tracing for dbus ui/vdagent: improve vdagent_fe_open() trace ui/vdagent: notify clipboard peers of serial reset ui/vdagent: send caps on fe_open Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v1 05/15] hw/i2c/aspeed: rename the I2C class pool attribute to share_pool

2024-07-18 Thread Cédric Le Goater
On 7/18/24 08:49, Jamin Lin wrote: According to the datasheet of ASPEED SOCs, each I2C bus has their own pool buffer since AST2500. Only AST2400 utilized a pool buffer share to all I2C bus. And firmware required to set the offset of pool buffer by writing "Function Control Register(I2CD 00)" To

[PATCH v1 04/17] intel_iommu: Flush stage-2 cache in PADID-selective PASID-based iotlb invalidation

2024-07-18 Thread Zhenzhong Duan
Per spec 6.5.2.4, PADID-selective PASID-based iotlb invalidation will flush stage-2 iotlb entries with matching domain id and pasid. With scalable modern mode introduced, guest could send PASID-selective PASID-based iotlb invalidation to flush both stage-1 and stage-2 entries. Signed-off-by: Zhen

[PATCH v1 00/17] intel_iommu: Enable stage-1 translation for emulated device

2024-07-18 Thread Zhenzhong Duan
Hi, Per Jason Wang's suggestion, iommufd nesting series[1] is split into "Enable stage-1 translation for emulated device" series and "Enable stage-1 translation for passthrough device" series. This series enables stage-1 translation support for emulated device in intel iommu which we called "mode

[PATCH v1 01/17] intel_iommu: Use the latest fault reasons defined by spec

2024-07-18 Thread Zhenzhong Duan
From: Yu Zhang Spec revision 3.0 or above defines more detailed fault reasons for scalable mode. So introduce them into emulation code, see spec section 7.1.2 for details. Note spec revision has no relation with VERSION register, Guest kernel should not use that register to judge what features a

[PATCH v1 08/17] intel_iommu: Set accessed and dirty bits during first stage translation

2024-07-18 Thread Zhenzhong Duan
From: Clément Mathieu--Drif Signed-off-by: Clément Mathieu--Drif Signed-off-by: Zhenzhong Duan --- hw/i386/intel_iommu_internal.h | 3 +++ hw/i386/intel_iommu.c | 24 2 files changed, 27 insertions(+) diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/int

[PATCH v1 14/17] intel_iommu: piotlb invalidation should notify unmap

2024-07-18 Thread Zhenzhong Duan
This is used by some emulated devices which caches address translation result. When piotlb invalidation issued in guest, those caches should be refreshed. Signed-off-by: Yi Sun Signed-off-by: Zhenzhong Duan --- hw/i386/intel_iommu.c | 35 ++- 1 file changed, 34 i

[PATCH v1 12/17] intel_iommu: Add an internal API to find an address space with PASID

2024-07-18 Thread Zhenzhong Duan
From: Clément Mathieu--Drif This will be used to implement the device IOTLB invalidation Signed-off-by: Clément Mathieu--Drif Signed-off-by: Zhenzhong Duan --- hw/i386/intel_iommu.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/h

[PATCH v1 11/17] intel_iommu: Extract device IOTLB invalidation logic

2024-07-18 Thread Zhenzhong Duan
From: Clément Mathieu--Drif This piece of code can be shared by both IOTLB invalidation and PASID-based IOTLB invalidation No functional changes intended. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Clément Mathieu--Drif Signed-off-by: Zhenzhong Duan --- hw/i386/intel_iommu.c | 57 ++

[PATCH v1 03/17] intel_iommu: Add a placeholder variable for scalable modern mode

2024-07-18 Thread Zhenzhong Duan
Add an new element scalable_mode in IntelIOMMUState to mark scalable modern mode, this element will be exposed as an intel_iommu property finally. For now, it's only a placehholder and used for cap/ecap initialization, compatibility check and block host device passthrough until nesting is supporte

[PATCH v1 05/17] intel_iommu: Rename slpte to pte

2024-07-18 Thread Zhenzhong Duan
From: Yi Liu Because we will support both FST(a.k.a, FLT) and SST(a.k.a, SLT) translation, rename variable and functions from slpte to pte whenever possible. But some are SST only, they are renamed with sl_ prefix. Signed-off-by: Yi Liu Co-developed-by: Clément Mathieu--Drif Signed-off-by: Cl

Re: [PATCH] hw/loongarch: Remove unimplemented extioi INT_encode mode

2024-07-18 Thread maobibo
On 2024/7/18 下午3:25, Song Gao wrote: Remove extioi INT_encode encode mode, because we don't emulate it. Signed-off-by: Song Gao --- hw/loongarch/virt.c| 6 -- include/hw/intc/loongarch_extioi.h | 1 - 2 files changed, 7 deletions(-) diff --git a/hw/loongarch/virt.c b

[PATCH v1 10/17] intel_iommu: Process PASID-based iotlb invalidation

2024-07-18 Thread Zhenzhong Duan
PASID-based iotlb (piotlb) is used during walking Intel VT-d stage-1 page table. This emulates the stage-1 page table iotlb invalidation requested by a PASID-based IOTLB Invalidate Descriptor (P_IOTLB). Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan --- hw/i386/intel_iommu_internal.h | 3

[PATCH v1 09/17] intel_iommu: Flush stage-1 cache in iotlb invalidation

2024-07-18 Thread Zhenzhong Duan
According to spec, Page-Selective-within-Domain Invalidation (11b): 1. IOTLB entries caching second-stage mappings (PGTT=010b) or pass-through (PGTT=100b) mappings associated with the specified domain-id and the input-address range are invalidated. 2. IOTLB entries caching first-stage (PGTT=001b)

[PATCH v1 02/17] intel_iommu: Make pasid entry type check accurate

2024-07-18 Thread Zhenzhong Duan
When guest configures Nested Translation(011b) or First-stage Translation only (001b), type check passed unaccurately. Fails the type check in those cases as their simulation isn't supported yet. Fixes: fb43cf739e1 ("intel_iommu: scalable mode emulation") Suggested-by: Yi Liu Signed-off-by: Zhen

[PATCH v1 13/17] intel_iommu: Add support for PASID-based device IOTLB invalidation

2024-07-18 Thread Zhenzhong Duan
From: Clément Mathieu--Drif Signed-off-by: Clément Mathieu--Drif Signed-off-by: Zhenzhong Duan --- hw/i386/intel_iommu_internal.h | 11 hw/i386/intel_iommu.c | 50 ++ 2 files changed, 61 insertions(+) diff --git a/hw/i386/intel_iommu_internal.

[PATCH v1 15/17] intel_iommu: Set default aw_bits to 48 in scalable modren mode

2024-07-18 Thread Zhenzhong Duan
According to VTD spec, stage-1 page table could support 4-level and 5-level paging. However, 5-level paging translation emulation is unsupported yet. That means the only supported value for aw_bits is 48. So default aw_bits to 48 in scalable modern mode. In other cases, it is still default to 39

[PATCH v1 06/17] intel_iommu: Implement stage-1 translation

2024-07-18 Thread Zhenzhong Duan
From: Yi Liu This adds stage-1 page table walking to support stage-1 only transltion in scalable modern mode. Signed-off-by: Yi Liu Co-developed-by: Clément Mathieu--Drif Signed-off-by: Clément Mathieu--Drif Signed-off-by: Yi Sun Signed-off-by: Zhenzhong Duan --- hw/i386/intel_iommu_intern

[PATCH v1 07/17] intel_iommu: Check if the input address is canonical

2024-07-18 Thread Zhenzhong Duan
From: Clément Mathieu--Drif First stage translation must fail if the address to translate is not canonical. Signed-off-by: Clément Mathieu--Drif Signed-off-by: Zhenzhong Duan --- hw/i386/intel_iommu_internal.h | 2 ++ hw/i386/intel_iommu.c | 21 + 2 files changed

[PATCH v1 17/17] tests/qtest: Add intel-iommu test

2024-07-18 Thread Zhenzhong Duan
Add the framework to test the intel-iommu device. Currently only tested cap/ecap bits correctness in scalable modern mode. Also tested cap/ecap bits consistency before and after system reset. Signed-off-by: Zhenzhong Duan --- MAINTAINERS| 1 + include/hw/i386/intel_iommu.h

[PATCH v1 16/17] intel_iommu: Modify x-scalable-mode to be string option

2024-07-18 Thread Zhenzhong Duan
From: Yi Liu Intel VT-d 3.0 introduces scalable mode, and it has a bunch of capabilities related to scalable mode translation, thus there are multiple combinations. While this vIOMMU implementation wants to simplify it for user by providing typical combinations. User could config it by "x-scalabl

Re: [PATCH v5 3/3] qapi: introduce device-sync-config

2024-07-18 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add command to sync config from vhost-user backend to the device. It > may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not > triggered interrupt to the guest or just not available (not supported > by vhost-user server). > > Command result is

[PATCH v4 2/3] docs/interop/firmware.json: add new enum FirmwareArchitecture

2024-07-18 Thread Thomas Weißschuh
Only a small subset of all architectures supported by qemu make use of firmware files. Introduce and use a new enum to represent this. This also removes the dependency to machine.json from the global qapi definitions. Suggested-by: Daniel P. Berrangé Signed-off-by: Thomas Weißschuh --- docs/in

[PATCH v4 1/3] docs/interop/firmware.json: add new enum FirmwareFormat

2024-07-18 Thread Thomas Weißschuh
Only a small subset of all blockdev drivers make sense for firmware images. Introduce and use a new enum to represent this. This also reduces the dependency on firmware.json from the global qapi definitions. Suggested-by: Daniel P. Berrangé Signed-off-by: Thomas Weißschuh --- docs/interop/firm

[PATCH v4 0/3] docs/interop/firmware.json: scripts/qapi-gen.py compatibility

2024-07-18 Thread Thomas Weißschuh
docs/interop/firmware.json is currently not usable with qapi-gen.py due to various non-functional issues. Fix those issue to provide compatibility. In v3 there was an open question about @file vs. @raw, but given that the existing descriptors in pc-bios/descriptors/ are already using @raw it seems

[PATCH v4 3/3] docs: add test for firmware.json QAPI

2024-07-18 Thread Thomas Weißschuh
To make sure that the QAPI description stays valid add a testcase. Suggested-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/qemu-devel/d9ce0234-4beb-4b90-b14c-76810d3b8...@linaro.org/ Signed-off-by: Thomas Weißschuh --- docs/meson.build | 5 + 1 file changed, 5 insertions(+) dif

Re: [PATCH v4 1/3] docs/interop/firmware.json: add new enum FirmwareFormat

2024-07-18 Thread Daniel P . Berrangé
On Thu, Jul 18, 2024 at 10:27:38AM +0200, Thomas Weißschuh wrote: > Only a small subset of all blockdev drivers make sense for firmware > images. Introduce and use a new enum to represent this. > > This also reduces the dependency on firmware.json from the global qapi > definitions. > > Suggested

Re: [PATCH v5 1/3] qdev-monitor: add option to report GenericError from find_device_state

2024-07-18 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Here we just prepare for the following patch, making possible to report > GenericError as recommended. > > This patch doesn't aim to prevent further use of DeviceNotFound by > future interfaces: > > - find_device_state() is used in blk_by_qdev_id() and qmp_

Re: [PATCH v5 0/3] vhost-user-blk: live resize additional APIs

2024-07-18 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > ping. Markus, Eric, could someone give an ACC for QAPI part? I apologize for the delay. It was pretty bad.

[PATCH v2] vhsot-user: Do not wait for replay for not sent VHOST_USER_SET_LOG_BASE

2024-07-18 Thread BillXiang
From: BillXiang We have added VHOST_USER_SET_LOG_BASE to vhost_user_per_device_request in https://lists.nongnu.org/archive/html/qemu-devel/2024-06/msg02559.html and will send this message only for vq 0. Signed-off-by: BillXiang --- V1[1] -> V2: - Refrain from appending flags to messages that c

Re: [PATCH v4 2/3] docs/interop/firmware.json: add new enum FirmwareArchitecture

2024-07-18 Thread Daniel P . Berrangé
On Thu, Jul 18, 2024 at 10:27:39AM +0200, Thomas Weißschuh wrote: > Only a small subset of all architectures supported by qemu make use of > firmware files. Introduce and use a new enum to represent this. > > This also removes the dependency to machine.json from the global qapi > definitions. > >

Re: [PATCH v4 3/3] docs: add test for firmware.json QAPI

2024-07-18 Thread Daniel P . Berrangé
On Thu, Jul 18, 2024 at 10:27:40AM +0200, Thomas Weißschuh wrote: > To make sure that the QAPI description stays valid add a testcase. > > Suggested-by: Philippe Mathieu-Daudé > Link: > https://lore.kernel.org/qemu-devel/d9ce0234-4beb-4b90-b14c-76810d3b8...@linaro.org/ > Signed-off-by: Thomas We

[PATCH v4 01/18] hw/intc/loongson_ipi: Declare QOM types using DEFINE_TYPES() macro

2024-07-18 Thread Philippe Mathieu-Daudé
When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. Replace the type_init() / type_register_static() combination. Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/loongson_ipi.c | 21 + 1 file changed, 9 insertions(+),

[PATCH v4 04/18] hw/intc/loongson_ipi: Extract loongson_ipi_common_finalize()

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao In preparation to extract common IPI code in few commits, extract loongson_ipi_common_finalize(). Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bib

[PATCH v4 03/18] hw/intc/loongson_ipi: Rename LoongsonIPI -> LoongsonIPIState

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao We'll have to add LoongsonIPIClass in few commits, so rename LoongsonIPI as LoongsonIPIState for clarity. Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed

[PATCH v4 05/18] hw/intc/loongson_ipi: Extract loongson_ipi_common_realize()

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao In preparation to extract common IPI code in few commits, extract loongson_ipi_common_realize(). Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bibo

[PATCH v4 02/18] hw/intc/loongson_ipi: Access memory in little endian

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao Loongson IPI is only available in little-endian, so use that to access the guest memory (in case we run on a big-endian host). Signed-off-by: Bibo Mao Fixes: f6783e3438 ("hw/loongarch: Add LoongArch ipi interrupt support") [PMD: Extracted from bigger commit, added commit descript

[PATCH v4 00/18] Reconstruct loongson ipi driver

2024-07-18 Thread Philippe Mathieu-Daudé
Since v3: - Use DEFINE_TYPES() macro (unreviewed patch #1) - Update MAINTAINERS - Added Bibo's tags Song, since Bibo reviewed/tested, if you provide your Acked-by I can queue that to my next hw-misc PR (pending Jiaxun testing). Thanks, Phil. Bibo Mao (16): hw/intc/loongson_ipi: Access memory

[PATCH v4 06/18] hw/intc/loongson_ipi: Add TYPE_LOONGSON_IPI_COMMON stub

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao Introduce LOONGSON_IPI_COMMON stubs, QDev parent of LOONGSON_IPI. Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bibo Mao Tested-by: Bibo Mao ---

[PATCH v4 09/18] hw/intc/loongson_ipi: Move IPICore structure to loongson_ipi_common.h

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao Move the IPICore structure and corresponding common fields of LoongsonIPICommonState to "hw/intc/loongson_ipi_common.h". Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-

[PATCH v4 08/18] hw/intc/loongson_ipi: Move IPICore::mmio_mem to LoongsonIPIState

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao It is easier to manage one array of MMIO MR rather than one per vCPU. Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bibo Mao Tested-by: Bibo Mao

[PATCH v4 11/18] hw/intc/loongson_ipi: Add LoongsonIPICommonClass::get_iocsr_as handler

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao Allow Loongson IPI implementations to have their own get_iocsr_as() handler. Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bibo Mao Tested-by: Bib

[PATCH v4 12/18] hw/intc/loongson_ipi: Add LoongsonIPICommonClass::cpu_by_arch_id handler

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao Allow Loongson IPI implementations to have their own cpu_by_arch_id() handler. Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bibo Mao Tested-by: B

[PATCH v4 07/18] hw/intc/loongson_ipi: Move common definitions to loongson_ipi_common.h

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bibo Mao Tested-by: Bibo Mao --- include/hw/intc/loongson_ipi.h| 18 -- inc

[PATCH v4 13/18] hw/intc/loongson_ipi: Expose loongson_ipi_core_read/write helpers

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao In order to access loongson_ipi_core_read/write helpers from loongson_ipi_common.c in the next commit, make their prototype declaration public. Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Daudé Signed-of

Re: [PATCH v1 06/15] hw/i2c/aspeed: introduce a new bus pool buffer attribute in AspeedI2Cbus

2024-07-18 Thread Cédric Le Goater
On 7/18/24 08:49, Jamin Lin wrote: According to the datasheet of ASPEED SOCs, each I2C bus has their own pool buffer since AST2500. Only AST2400 utilized a pool buffer share to all I2C bus. Besides, using a share pool buffer only support pool buffer memory regions are continuous for all I2C bus.

[PATCH v4 18/18] hw/intc/loongson_ipi: Remove unused headers

2024-07-18 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bibo Mao Tested-by: Bibo Mao --- hw/intc/loongson_ipi.c | 9 - 1 file changed, 9 deletions(-) diff --git a/hw/intc/loongson_ipi.c b/hw/intc/loongson_ipi.c index 051e910586..aa1b0a474c 100644 --- a/hw/intc/loongson_ipi.c +++ b/hw/intc/l

[PATCH v4 16/18] hw/loongarch/virt: Replace loongson IPI with loongarch IPI

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao Loongarch IPI inherits from class LoongsonIPICommonClass, and it only contains Loongarch 3A5000 virt machine specific interfaces, rather than mix different machine implementations together. Signed-off-by: Bibo Mao [PMD: Rebased] Co-Developed-by: Philippe Mathieu-Daudé Signed-off

[PATCH v4 10/18] hw/intc/loongson_ipi: Pass LoongsonIPICommonState to send_ipi_data()

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao In order to get LoongsonIPICommonClass in send_ipi_data() in the next commit, propagate LoongsonIPICommonState. Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Re

[PATCH v4 17/18] hw/intc/loongson_ipi: Restrict to MIPS

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao Now than LoongArch target can use the TYPE_LOONGARCH_IPI model, restrict TYPE_LOONGSON_IPI to MIPS. Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: B

[PATCH v4 14/18] hw/intc/loongson_ipi: Move common code to loongson_ipi_common.c

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao Move the common code from loongson_ipi.c to loongson_ipi_common.c, call parent_realize() instead of loongson_ipi_common_realize() in loongson_ipi_realize(). Signed-off-by: Bibo Mao [PMD: Extracted from bigger commit, added commit description] Co-Developed-by: Philippe Mathieu-Dau

[PATCH v4 15/18] hw/intc/loongarch_ipi: Add loongarch IPI support

2024-07-18 Thread Philippe Mathieu-Daudé
From: Bibo Mao Loongarch IPI is added here, it inherits from class TYPE_LOONGSON_IPI_COMMON, and two interfaces get_iocsr_as() and cpu_by_arch_id() are added for Loongarch 3A5000 machine. It can be used when ipi is emulated in userspace with KVM mode. Signed-off-by: Bibo Mao [PMD: Rebased and s

Re: [PATCH v1 04/15] hw/i2c/aspeed: support discontinuous register memory region of I2C bus

2024-07-18 Thread Cédric Le Goater
On 7/18/24 08:49, Jamin Lin wrote: It only support continuous register memory region for all I2C bus. However, the register address of all I2c bus are discontinuous for AST2700. Ex: the register address of I2C bus for ast2700 as following. 0x100 - 0x17F: Device 0 0x200 - 0x27F: Device 1 0x300 -

Re: [PATCH v1 07/15] hw/i2c/aspeed: support discontinuous poll buffer memory region of I2C bus

2024-07-18 Thread Cédric Le Goater
On 7/18/24 08:49, Jamin Lin wrote: It only support continuous pool buffer memory region for all I2C bus. However, the pool buffer address of all I2c bus are discontinuous for AST2700. Ex: the pool buffer address of I2C bus for ast2700 as following. 0x1A0 - 0x1BF: Device 0 buffer 0x2A0 - 0x2BF: D

[PATCH v2] hw/loongarch: Remove unimplemented extioi INT_encode mode

2024-07-18 Thread Song Gao
Remove extioi INT_encode encode mode, because we don't emulate it. Signed-off-by: Song Gao --- include/hw/intc/loongarch_extioi.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/intc/loongarch_extioi.h b/include/hw/intc/loongarch_extioi.h index eccc2e0d18..626a37dfa1 100644 --- a/

Re: [PATCH v1 09/15] hw/i2c/aspeed: Add AST2700 support

2024-07-18 Thread Cédric Le Goater
On 7/18/24 08:49, Jamin Lin wrote: Introduce a new ast2700 class to support AST2700. The I2C bus register memory regions and I2C bus pool buffer memory regions are discontinuous and they do not back compatible AST2600. Add a new ast2700 i2c class init function to match the address of I2C bus reg

Re: [PATCH v1 14/15] aspeed: fix coding style

2024-07-18 Thread Cédric Le Goater
On 7/18/24 08:49, Jamin Lin wrote: Fix coding style issues from checkpatch.pl Test command: ./scripts/checkpatch.pl --no-tree -f hw/arm/aspeed.c Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/arm/aspeed.c | 21 ++--- 1 file changed, 14 inse

Re: [PATCH v1 15/15] aspeed: add tmp105 in i2c bus 0 for AST2700

2024-07-18 Thread Cédric Le Goater
On 7/18/24 08:49, Jamin Lin wrote: ASPEED SDK add lm75 in i2c bus 0 for AST2700. LM75 is compatible with TMP105 driver. Introduce a new i2c init function and add tmp105 device model in i2c bus 0. Signed-off-by: Jamin Lin As a followup, you could modify test_aarch64_ast2700_evb_sdk_v09_02 to

Re: [PATCH v1 03/17] intel_iommu: Add a placeholder variable for scalable modern mode

2024-07-18 Thread CLEMENT MATHIEU--DRIF
On 18/07/2024 10:16, Zhenzhong Duan wrote: > Caution: External email. Do not open attachments or click links, unless this > email comes from a known sender and you know the content is safe. > > > Add an new element scalable_mode in IntelIOMMUState to mark scalable > modern mode, this element wil

Re: [PATCH v4 11/12] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-18 Thread Joao Martins
On 18/07/2024 08:20, Duan, Zhenzhong wrote: > > >> -Original Message- >> From: Joao Martins >> Subject: Re: [PATCH v4 11/12] vfio/migration: Don't block migration device >> dirty tracking is unsupported >> >> On 17/07/2024 03:38, Duan, Zhenzhong wrote: >>> >>> -Original Message-

Re: [PATCH v1 02/17] intel_iommu: Make pasid entry type check accurate

2024-07-18 Thread CLEMENT MATHIEU--DRIF
Reviewed-by: Clément Mathieu--Drif On 18/07/2024 10:16, Zhenzhong Duan wrote: > Caution: External email. Do not open attachments or click links, unless this > email comes from a known sender and you know the content is safe. > > > When guest configures Nested Translation(011b) or First-stage Tra

[PATCH] mem/cxl_type3: Fix overlapping region validation error

2024-07-18 Thread Yao Xingtao via
When injecting a new poisoned region through qmp_cxl_inject_poison(), the newly injected region should not overlap with existing poisoned regions. The current validation method does not consider the following overlapping region: ┌───┬───┬───┐ │a │ b(a) │a │ └───┴───┴───┘ (a is a newly a

Re: [PATCH v1 15/17] intel_iommu: Set default aw_bits to 48 in scalable modren mode

2024-07-18 Thread CLEMENT MATHIEU--DRIF
Reviewed-by: Clément Mathieu--Drif On 18/07/2024 10:16, Zhenzhong Duan wrote: > Caution: External email. Do not open attachments or click links, unless this > email comes from a known sender and you know the content is safe. > > > According to VTD spec, stage-1 page table could support 4-level

Re: [PATCH v4 05/12] vfio/iommufd: Introduce auto domain creation

2024-07-18 Thread Joao Martins
On 18/07/2024 08:44, Duan, Zhenzhong wrote: > If existing hwpt doesn't support dirty tracking. > Another device supporting dirty tracking attaches to that hwpt, what >> will happen? > Hmm, It succeeds as there's no incompatbility. At the very least I plan on blocking

Re: [PATCH] docs: fix the html docs search function

2024-07-18 Thread Peter Maydell
On Wed, 17 Jul 2024 at 21:11, Volker Rümelin wrote: > > Fix the search function in Sphinx generated html docs when built > with Sphinx >= 6.0.0. > > Quote from the Sphinx blog at > https://blog.readthedocs.com/sphinx6-upgrade > > Sphinx 6 is out and has important breaking changes > > Bundled jQuer

Re: [PATCH v3] chardev: add path option for pty backend

2024-07-18 Thread Peter Maydell
On Thu, 18 Jul 2024 at 07:15, Markus Armbruster wrote: > > Looks like this one fell through the cracks. > > Octavian Purdila writes: > > > Add path option to the pty char backend which will create a symbolic > > link to the given path that points to the allocated PTY. > > > > This avoids having t

Re: [PATCH v1 16/17] intel_iommu: Modify x-scalable-mode to be string option

2024-07-18 Thread CLEMENT MATHIEU--DRIF
On 18/07/2024 10:16, Zhenzhong Duan wrote: > Caution: External email. Do not open attachments or click links, unless this > email comes from a known sender and you know the content is safe. > > > From: Yi Liu > > Intel VT-d 3.0 introduces scalable mode, and it has a bunch of capabilities > rela

RE: [PATCH v1 15/15] aspeed: add tmp105 in i2c bus 0 for AST2700

2024-07-18 Thread Jamin Lin
Hi Cedric, > Subject: Re: [PATCH v1 15/15] aspeed: add tmp105 in i2c bus 0 for AST2700 > > On 7/18/24 08:49, Jamin Lin wrote: > > ASPEED SDK add lm75 in i2c bus 0 for AST2700. > > LM75 is compatible with TMP105 driver. > > > > Introduce a new i2c init function and > > add tmp105 device model in i2

Re: [PATCH v3] chardev: add path option for pty backend

2024-07-18 Thread Daniel P . Berrangé
On Thu, Jul 18, 2024 at 08:15:01AM +0200, Markus Armbruster wrote: > Looks like this one fell through the cracks. > > Octavian Purdila writes: > > > Add path option to the pty char backend which will create a symbolic > > link to the given path that points to the allocated PTY. > > > > This avoi

RE: [PATCH v1 09/15] hw/i2c/aspeed: Add AST2700 support

2024-07-18 Thread Jamin Lin
Hi Cedric, > Subject: Re: [PATCH v1 09/15] hw/i2c/aspeed: Add AST2700 support > > On 7/18/24 08:49, Jamin Lin wrote: > > Introduce a new ast2700 class to support AST2700. > > The I2C bus register memory regions and I2C bus pool buffer memory > > regions are discontinuous and they do not back compa

[PATCH 1/2] ci: add gtk-vnc to the deps

2024-07-18 Thread Daniel P . Berrangé
The gtk-vnc package is used by the vnc-display-test qtest program. Technically only gvnc is needed, but since we already pull in the gtk3 dep, it is harmless to depend on gtk-vnc. Signed-off-by: Daniel P. Berrangé --- tests/lcitool/projects/qemu.yml | 1 + 1 file changed, 1 insertion(+) diff --

[PATCH 2/2] ci: refresh package lists with lcitool

2024-07-18 Thread Daniel P . Berrangé
Refresh with the newly added gtk-vnc package Signed-off-by: Daniel P. Berrangé --- .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- .gitlab-ci.d/cirrus/macos-13.vars | 2 +- .gitlab-ci.d/cirrus/macos-14.vars | 2 +- scripts/ci/setup/ubuntu/ubu

[PATCH 0/2] ci: fix running of vnc-display-test

2024-07-18 Thread Daniel P . Berrangé
The vnc-display-test is skipped in CI due to missing gvnc RPMs, fix that. Daniel P. Berrangé (2): ci: add gtk-vnc to the deps ci: refresh package lists with lcitool .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- .gitlab-ci.d/cirrus/macos-13.vars | 2 +- .gi

Re: [PATCH v5 00/18] SMMUv3 nested translation support

2024-07-18 Thread Julien Grall
Hi Eric, On 17/07/2024 18:43, Eric Auger wrote: Hi Peter, Richard, On 7/17/24 17:09, Jean-Philippe Brucker wrote: On Mon, Jul 15, 2024 at 08:45:00AM +, Mostafa Saleh wrote: Currently, QEMU supports emulating either stage-1 or stage-2 SMMUs but not nested instances. This patch series adds

RE: [PATCH v1 03/15] hw/i2c/aspeed: support to set the different memory size

2024-07-18 Thread Jamin Lin
Hi Cedric, > Subject: Re: [PATCH v1 03/15] hw/i2c/aspeed: support to set the different > memory size > > On 7/18/24 08:49, Jamin Lin wrote: > > According to the datasheet of ASPEED SOCs, an I2C controller owns 8KB > > of register space for AST2700, owns 4KB of register space for AST2600, > > AST25

RE: [PATCH v1 04/15] hw/i2c/aspeed: support discontinuous register memory region of I2C bus

2024-07-18 Thread Jamin Lin
Hi Cedric, > Subject: Re: [PATCH v1 04/15] hw/i2c/aspeed: support discontinuous register > memory region of I2C bus > > On 7/18/24 08:49, Jamin Lin wrote: > > It only support continuous register memory region for all I2C bus. > > However, the register address of all I2c bus are discontinuous for >

[PATCH 02/15] tests/avocado: Remove non-working sparc leon3 test

2024-07-18 Thread Alex Bennée
From: Thomas Huth The test has been marked as broken more than 4 years ago, and so far nobody ever cared to fix it. Thus let's simply remove it now ... if somebody ever needs it again, they can restore the file from an older version of QEMU. Signed-off-by: Thomas Huth Reviewed-by: Clément Chigo

[PATCH 03/15] gdbstub: Re-factor gdb command extensions

2024-07-18 Thread Alex Bennée
Coverity reported a memory leak (CID 1549757) in this code and its admittedly rather clumsy handling of extending the command table. Instead of handing over a full array of the commands lets use the lighter weight GPtrArray and simply test for the presence of each entry as we go. This avoids compli

[PATCH 01/15] testing: bump to latest libvirt-ci

2024-07-18 Thread Alex Bennée
This brings in the latest python mappings for the BSD updates. Signed-off-by: Alex Bennée --- .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- tests/lcitool/libvirt-ci| 2 +- tests/vm/generated/freebsd.json | 14 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff

[PATCH 10/15] target/mips: Add semihosting stub

2024-07-18 Thread Alex Bennée
From: Philippe Mathieu-Daudé Since the SEMIHOSTING feature is optional, we need a stub to link when it is disabled. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240717105723.58965-4-phi...@linaro.org> Signed-off-by: Alex Bennée --- target/mips/tcg/sysemu/semihosting-stub.c | 15 ++

[PATCH 00/15] Final bits for 9.1-rc0 (docker, plugins, gdbstub, semihosting)

2024-07-18 Thread Alex Bennée
I'm just flushing my various maintainer queues for the up-coming 9.1 soft freeze. Mostly this is a collection of fixes and tweaks although there is a new plugin in contrib. We've also bumped the libvirt-ci for the BSD python updates. The following still need review: tests/plugins: use qemu_plug

[PATCH 05/15] plugins: fix mem callback array size

2024-07-18 Thread Alex Bennée
From: Pierrick Bouvier data was correctly copied, but size of array was not set (g_array_sized_new only reserves memory, but does not set size). As a result, callbacks were not called for code path relying on plugin_register_vcpu_mem_cb(). Found when trying to trigger mem access callbacks for a

[PATCH 14/15] target/xtensa: Restrict semihosting to TCG

2024-07-18 Thread Alex Bennée
From: Philippe Mathieu-Daudé The semihosting feature depends on TCG (due to the probe_access API access). Although TCG is the single accelerator currently available for the xtensa target, use the Kconfig "imply" directive which is more correct (if we were to support a different accel). Reported-

[PATCH 07/15] plugins/execlog.c: correct dump of registers values

2024-07-18 Thread Alex Bennée
From: Frédéric Pétrot Register values are dumped as 'sz' chunks of two nibbles in the execlog plugin, sz was 1 too big. Signed-off-by: Frédéric Pétrot Reviewed-by: Pierrick Bouvier Message-Id: <20240620083805.73603-1-frederic.pet...@univ-grenoble-alpes.fr> Signed-off-by: Alex Bennée --- cont

[PATCH 09/15] target/m68k: Add semihosting stub

2024-07-18 Thread Alex Bennée
From: Philippe Mathieu-Daudé Since the SEMIHOSTING feature is optional, we need a stub to link when it is disabled. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240717105723.58965-3-phi...@linaro.org> Signed-off-by: Alex Bennée --- target/m68k/semihosting-

[PATCH 04/15] plugins/stoptrigger: TCG plugin to stop execution under conditions

2024-07-18 Thread Alex Bennée
From: Simon Hamelin This new plugin allows to stop emulation using conditions on the emulation state. By setting this plugin arguments, it is possible to set an instruction count limit and/or trigger address(es) to stop at. The code returned at emulation exit can be customized. This plugin demon

[PATCH 11/15] target/m68k: Restrict semihosting to TCG

2024-07-18 Thread Alex Bennée
From: Philippe Mathieu-Daudé The semihosting feature depends on TCG (due to the probe_access API access). Although TCG is the single accelerator currently available for the m68k target, use the Kconfig "imply" directive which is more correct (if we were to support a different accel). Reported-by

  1   2   3   4   >