[PATCH v1 3/3] aspeed/soc: Support Timer for AST2700

2024-12-15 Thread Jamin Lin via
Add Timer model for AST2700 Timer support. The Timer controller include 8 sets of 32-bit decrement counters. The base address of TIMER0 to TIMER7 as following. Base Address of Timer 0 = 0x12C1_ Base Address of Timer 1 = 0x12C1_0040 Base Address of Timer 2 = 0x12C1_0080 Base Address of Timer 3

[PATCH v1 0/3] Support timer for AST2700

2024-12-15 Thread Jamin Lin via
v1: - Support timer for AST2700 - Introduce new "aspeed_2700_timer_read" and "aspeed_2700_timer_write" callback functions and "aspeed_2700_timer_ops" memory region operation for AST2700. Introduce a new ast2700 class to support AST2700. Jamin Lin (3): hw/timer/aspeed: Support dif

[PATCH v1 1/3] hw/timer/aspeed: Support different memory region ops

2024-12-15 Thread Jamin Lin via
It set "aspeed_timer_ops" struct which containing read and write callbacks to be used when I/O is performed on the TIMER region. Besides, in the previous design of ASPEED SOCs, the timer registers address space are contiguous. ex: TMC00-TMC0C are used for TIMER0. ex: TMC10-TMC1C are used for TIME

[PATCH v1 2/3] hw/timer/aspeed: Add AST2700 Support

2024-12-15 Thread Jamin Lin via
The timer controller include 8 sets of 32-bit decrement counters, based on either PCLK or 1MHZ clock and the design of timer controller between AST2600 and AST2700 are almost the same. The different is that the register set have a significant change in AST2700. TIMER0 – TIMER7 has their own indivi

Re: [PATCH 2/2] s390x: Fix CSS migration

2024-12-15 Thread Thomas Huth
On 13/12/2024 17.01, Fabiano Rosas wrote: Commit a55ae46683 ("s390: move css_migration_enabled from machine to css.c") disabled CSS migration globally instead of doing it per-instance. CC: Paolo Bonzini CC: qemu-sta...@nongnu.org #9.1 Fixes: a55ae46683 ("s390: move css_migration_enabled from ma

Re: [PATCH v6 00/20] intel_iommu: Enable stage-1 translation for emulated device

2024-12-15 Thread CLEMENT MATHIEU--DRIF
On 13/12/2024 04:42, Jason Wang 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 Thu, Dec 12, 2024 at 5:50 PM CLEMENT MATHIEU--DRIF > wrote: >> Hi, >> >> Thanks for the new version

Re: [PATCH 29/71] hw/i386: Constify all Property

2024-12-15 Thread CLEMENT MATHIEU--DRIF
Hi Rihard. Good idea, LGTM. Just out of curiosity, what was the motivation for such a patch? It it simply about cleaning the code or is it intended to solve a deeper problem. Thanks, cmd On 13/12/2024 20:07, Richard Henderson wrote: > Caution: External email. Do not open attachments or click

Re: [PATCH v6 1/9] target/riscv: fix henvcfg potentially containing stale bits

2024-12-15 Thread Alistair Francis
On Fri, Nov 29, 2024 at 12:15 AM Clément Léger wrote: > > With the current implementation, if we had the following scenario: > - Set bit x in menvcfg > - Set bit x in henvcfg > - Clear bit x in menvcfg > then, the internal variable env->henvcfg would still contain bit x due > to both a wrong menvc

Re: [PATCH v2] riscv/gdb: add virt mode debug interface

2024-12-15 Thread Alistair Francis
On Thu, Dec 5, 2024 at 7:17 PM Yanfeng Liu wrote: > > On Thu, 2024-12-05 at 08:10 +, Alex Bennée wrote: > > Yanfeng Liu writes: > > > > > On Wed, 2024-12-04 at 17:03 +0100, Mario Fleischmann wrote: > > > > Hi everyone, > > > > > > > > I'd like to chime in here because we are sitting on a simi

Re: [PATCH v1] target/riscv: add support for RV64 Xiangshan Nanhu CPU

2024-12-15 Thread Alistair Francis
On Thu, Dec 5, 2024 at 5:38 PM MollyChen wrote: > > Add a CPU entry for the RV64 XiangShan NANHU CPU which > supports single-core and dual-core configurations. More > details can be found at > https://docs.xiangshan.cc/zh-cn/latest/integration/overview > > Signed-off-by: MollyChen Thanks! Appli

Re: [PATCH v1] target/riscv: add support for RV64 Xiangshan Nanhu CPU

2024-12-15 Thread Alistair Francis
On Thu, Dec 5, 2024 at 5:38 PM MollyChen wrote: > > Add a CPU entry for the RV64 XiangShan NANHU CPU which > supports single-core and dual-core configurations. More > details can be found at > https://docs.xiangshan.cc/zh-cn/latest/integration/overview > > Signed-off-by: MollyChen Acked-by: Alis

Re: [PATCH 03/24] target/ppc: Remove empty property list

2024-12-15 Thread Harsh Prateek Bora
On 12/16/24 09:20, Richard Henderson wrote: Signed-off-by: Richard Henderson Reviewed-by: Harsh Prateek Bora --- target/ppc/cpu_init.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 1253dbf622..5e95790def 100644 --- a/targe

Re: [PATCH 07/71] target/ppc: Remove empty property list

2024-12-15 Thread Harsh Prateek Bora
On 12/14/24 00:36, Richard Henderson wrote: Signed-off-by: Richard Henderson Reviewed-by: Harsh Prateek Bora --- target/ppc/cpu_init.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 1253dbf622..5e95790def 100644 --- a/targe

Re: [PATCH 1/3] target/riscv: add a trap-misaligned-access property

2024-12-15 Thread Alistair Francis
On Thu, Dec 12, 2024 at 7:21 AM Frederic Konrad wrote: > > On riscv target, misaligned accesses are either authorized and implemented in > hardware, or unimplemented and generate a trap to be implemented in software. > > At the moment misaligned accesses for rvi just succeed, the intention of this

[PATCH 24/24] Constify all opaque Property pointers

2024-12-15 Thread Richard Henderson
s/ Property [*]/ const Property */ Basically all of these only feed object_field_prop_ptr, which now takes a const pointer itself. Signed-off-by: Richard Henderson --- backends/tpm/tpm_util.c | 4 +- hw/block/xen-block.c | 4 +- hw/core/qdev-properties-system.c | 48 +

[PATCH 18/24] hw/core: Replace device_class_set_props with a macro

2024-12-15 Thread Richard Henderson
Use ARRAY_SIZE to implement as device_class_set_props_n. Remove any DEFINE_PROP_END_OF_LIST terminator from the count. Signed-off-by: Richard Henderson --- include/hw/qdev-core.h| 21 + hw/core/qdev-properties.c | 16 2 files changed, 13 insertions(+), 24

[PATCH 14/24] migration: Use device_class_set_props_n

2024-12-15 Thread Richard Henderson
Export the migration_properties array size from options.c; use that to feed device_class_set_props_n. We must remove DEFINE_PROP_END_OF_LIST so the count is correct. Signed-off-by: Richard Henderson --- migration/options.h | 1 + migration/migration.c | 3 ++- migration/options.c | 2 +- 3

[PATCH 15/24] hw/scsi/megasas: Use device_class_set_props_n

2024-12-15 Thread Richard Henderson
We must remove DEFINE_PROP_END_OF_LIST so the count is correct. Signed-off-by: Richard Henderson --- hw/scsi/megasas.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 8323cd18e3..7f012c218b 100644 --- a/hw/scsi/megasas.c +++

[PATCH 08/24] hw/s390x: Remove empty Property lists

2024-12-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- hw/s390x/3270-ccw.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/s390x/3270-ccw.c b/hw/s390x/3270-ccw.c index 69e6783ade..3a8930dfd1 100644 --- a/hw/s390x/3270-ccw.c +++ b/hw/s390x/3270-ccw.c @@ -150,15 +150,10 @@ out_err: g_free(sch); }

[PATCH 02/24] hw/ide: Constify sysbus_ahci_properties

2024-12-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- hw/ide/ahci-sysbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/ahci-sysbus.c b/hw/ide/ahci-sysbus.c index d43db0923f..2432039290 100644 --- a/hw/ide/ahci-sysbus.c +++ b/hw/ide/ahci-sysbus.c @@ -62,7 +62,7 @@ static void sysbus_

[PATCH 10/24] hw/sparc: Remove empty Property lists

2024-12-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- hw/sparc/sun4m.c | 5 - hw/sparc64/sun4u.c | 5 - 2 files changed, 10 deletions(-) diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index d52e6a7213..7ec346533e 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -732,15 +732,10 @@ static void p

[PATCH 22/24] hw/core/qdev-properties: Constify Property argument to object_field_prop_ptr

2024-12-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- include/hw/qdev-properties.h | 2 +- hw/core/qdev-properties.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index 3680cd239f..447767688b 100644 --- a/include/hw/qdev-prope

[PATCH 16/24] hw/arm/armsse: Use device_class_set_props_n

2024-12-15 Thread Richard Henderson
We must remove DEFINE_PROP_END_OF_LIST so the count is correct. Signed-off-by: Richard Henderson --- hw/arm/armsse.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c index 1cd6b4a4b2..ffd732f806 100644 --- a/hw/arm/armsse.c +++ b/hw/a

[PATCH 21/24] include/hw/qdev-properties: Shrink struct Property

2024-12-15 Thread Richard Henderson
Before, via pahole: arm32, a 32-bit host which aligns uint64_t: struct Property { const char * name; /* 0 4 */ const PropertyInfo * info; /* 4 4 */ ptrdiff_t offset; /* 8

[PATCH 00/24] More Property cleanups

2024-12-15 Thread Richard Henderson
Based-on: 20241215190533.3222854-1-richard.hender...@linaro.org [PULL 00/67] Constify almost all Property - Missed constifying two arrays. - Eliminate all empty Property lists. - Detect both of these cases during the build. - Count the elements in the property list and eliminate DEFINE_PROP_END_

[PATCH 11/24] hw/virtio: Remove empty Property lists

2024-12-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- hw/virtio/vdpa-dev-pci.c | 5 - hw/virtio/vhost-user-snd-pci.c | 5 - 2 files changed, 10 deletions(-) diff --git a/hw/virtio/vdpa-dev-pci.c b/hw/virtio/vdpa-dev-pci.c index 5446e6b393..787926801a 100644 --- a/hw/virtio/vdpa-dev-pci.c +++ b/hw/v

[PATCH 06/24] hw/ppc: Only register spapr_nvdimm_properties if CONFIG_LIBPMEM

2024-12-15 Thread Richard Henderson
Do not register an empty set of properties. Signed-off-by: Richard Henderson --- hw/ppc/spapr_nvdimm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppc/spapr_nvdimm.c b/hw/ppc/spapr_nvdimm.c index 2ef6f29f3d..6f875d73b2 100644 --- a/hw/ppc/spapr_nvdimm.c +++

[PATCH 23/24] hw/core/qdev-properties: Constify Property argument to PropertyInfo.print

2024-12-15 Thread Richard Henderson
There is exactly one instance of this method: print_pci_devfn. Signed-off-by: Richard Henderson --- include/hw/qdev-properties.h | 2 +- hw/core/qdev-properties-system.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-prop

[PATCH 01/24] migration: Constify migration_properties

2024-12-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- migration/options.h | 2 +- migration/options.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/options.h b/migration/options.h index 79084eed0d..a360f93a44 100644 --- a/migration/options.h +++ b/migration/options.h @@ -20,7 +2

[PATCH 12/24] include/hw/qdev-core: Detect most empty Property lists at compile time

2024-12-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- include/hw/qdev-core.h| 8 hw/core/qdev-properties.c | 2 +- migration/migration.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 5be9844412..b2859d1e39 100644 ---

[PATCH 07/24] hw/tricore: Remove empty Property lists

2024-12-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- hw/tricore/tc27x_soc.c | 5 - hw/tricore/tricore_testdevice.c | 5 - 2 files changed, 10 deletions(-) diff --git a/hw/tricore/tc27x_soc.c b/hw/tricore/tc27x_soc.c index ecd92717b5..81bb16d89b 100644 --- a/hw/tricore/tc27x_soc.c +++ b/hw/trico

[PATCH 03/24] target/ppc: Remove empty property list

2024-12-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/ppc/cpu_init.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 1253dbf622..5e95790def 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7414,11 +7414,6 @@ static void ppc_disa

[PATCH 04/24] target/s390x: Use s390x_cpu_properties for system mode only

2024-12-15 Thread Richard Henderson
Avoid the empty property list for user-only mode. Signed-off-by: Richard Henderson --- target/s390x/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 4702761ca3..263f9e84ed 100644 --- a/target/s390x/cpu.c +++ b/target/s3

[PATCH 09/24] hw/xen: Remove empty Property lists

2024-12-15 Thread Richard Henderson
There is no point in registering no properties. Remove xen_sysdev_class_init entirely, as it did nothing else. Signed-off-by: Richard Henderson --- hw/xen/xen-legacy-backend.c | 17 - 1 file changed, 17 deletions(-) diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-ba

[PATCH 13/24] hw/core: Introduce device_class_set_props_n

2024-12-15 Thread Richard Henderson
Record the size of the array in DeviceClass.props_count_. Iterate with known count in qdev_prop_walk. Signed-off-by: Richard Henderson --- include/hw/qdev-core.h| 18 ++ hw/core/qdev-properties.c | 39 +-- hw/core/qdev.c| 1 +

[PATCH 17/24] rust/qemu-api: Use device_class_set_props_n

2024-12-15 Thread Richard Henderson
This means we can update declare_properties to drop the zero terminator at the end of the array as well. Cc: qemu-r...@nongnu.org Signed-off-by: Richard Henderson --- rust/qemu-api/src/device_class.rs | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/rust/qemu-api/s

[PATCH 05/24] hw/pci-host/astro: Remove empty Property list

2024-12-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- hw/pci-host/astro.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c index 379095b356..62e9c8acbf 100644 --- a/hw/pci-host/astro.c +++ b/hw/pci-host/astro.c @@ -461,10 +461,6 @@ static void elroy_pcihost_init(Ob

[PATCH 19/24] target/riscv: Do not abuse DEFINE_PROP_END_OF_LIST

2024-12-15 Thread Richard Henderson
These are not arrays of Property and had no business using DEFINE_PROP_END_OF_LIST. Use plain { } instead. Signed-off-by: Richard Henderson --- target/riscv/cpu.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 4329

Re: [PATCH 1/1] pc-bios: add missing riscv64 descriptor

2024-12-15 Thread Alistair Francis
On Thu, Dec 12, 2024 at 7:01 PM Heinrich Schuchardt wrote: > > Without descriptor libvirt cannot discover the EDK II binaries via > the qemu:///system connection. > > Signed-off-by: Heinrich Schuchardt Thanks! Applied to riscv-to-apply.next Alistair > --- > pc-bios/descriptors/60-edk2-riscv6

Re: [PATCH 1/1] pc-bios: add missing riscv64 descriptor

2024-12-15 Thread Alistair Francis
On Thu, Dec 12, 2024 at 7:01 PM Heinrich Schuchardt wrote: > > Without descriptor libvirt cannot discover the EDK II binaries via > the qemu:///system connection. > > Signed-off-by: Heinrich Schuchardt Reviewed-by: Alistair Francis Alistair > --- > pc-bios/descriptors/60-edk2-riscv64.json |

[PULL 17/18] hw/intc/loongarch_extioi: Add pre_save interface

2024-12-15 Thread Bibo Mao
Add vmstate pre_save interface, which can be used extioi kvm driver in future. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_extioi_common.c | 13 + include/hw/intc/loongarch_extioi_common.h | 1 + 2 files changed, 14 insertions(+) diff --git a/hw/int

[PULL 16/18] hw/intc/loongarch_extioi: Inherit from loongarch_extioi_common

2024-12-15 Thread Bibo Mao
Set TYPE_LOONGARCH_EXTIOI inherit from TYPE_LOONGARCH_EXTIOI_COMMON object, it shares vmsate and property of TYPE_LOONGARCH_EXTIOI_COMMON, and has its own realize() function. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_extioi.c| 37 ++---

[PULL 15/18] hw/intc/loongarch_extioi: Add common file loongarch_extioi_common

2024-12-15 Thread Bibo Mao
Add new common file loongarch_extioi_common.c, and move vmstate and property structure to common file. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_extioi.c| 59 + hw/intc/loongarch_extioi_common.c | 63 +++

[PULL 18/18] hw/intc/loongarch_extioi: Code cleanup about loongarch_extioi

2024-12-15 Thread Bibo Mao
Remove definition about LoongArchExtIOI and LOONGARCH_EXTIOI, and replace them with LoongArchExtIOICommonState and macro LOONGARCH_EXTIOI_COMMON separately. Also remove unnecessary header files. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_extioi.c | 31 ++

[PULL 12/18] hw/intc/loongarch_extioi: Rename LoongArchExtIOI with LoongArchExtIOICommonState

2024-12-15 Thread Bibo Mao
With some structure such as vmstate and property, rename LoongArchExtIOI with LoongArchExtIOICommonState, these common structure will be moved to common file. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_extioi.c | 41 +++--- 1 file changed

[PULL 00/18] loongarch-to-apply queue

2024-12-15 Thread Bibo Mao
The following changes since commit ca80a5d026a280762e0772615f1988db542b3ade: Merge tag 'hw-misc-20241214' of https://github.com/philmd/qemu into staging (2024-12-14 08:42:53 -0500) are available in the Git repository at: https://gitlab.com/bibo-mao/qemu.git tags/pull-loongarch-20241216 for

[PULL 01/18] include: Add loongarch_pic_common header file

2024-12-15 Thread Bibo Mao
Add common header file hw/intc/loongarch_pic_common.h, and move some macro definition from hw/intc/loongarch_pch_pic.h to the common header file. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- include/hw/intc/loongarch_pch_pic.h| 36 +++--- include/hw/intc/loongarch_pic_c

[PULL 06/18] hw/intc/loongarch_pch: Inherit from loongarch_pic_common

2024-12-15 Thread Bibo Mao
Set TYPE_LOONGARCH_PIC inherit from TYPE_LOONGARCH_PIC_COMMON object, it shares vmsate and property of TYPE_LOONGARCH_PIC_COMMON, and has its own realize() function. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_pch_pic.c| 38 -- hw/intc

[PULL 09/18] include: Add loongarch_extioi_common header file

2024-12-15 Thread Bibo Mao
Add common header file include/hw/intc/loongarch_extioi_common.h, and move some macro definition from include/hw/intc/loongarch_extioi.h to the common header file. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- include/hw/intc/loongarch_extioi.h| 50 +-- include/hw/in

[PULL 07/18] hw/intc/loongarch_pch: Add pre_save and post_load interfaces

2024-12-15 Thread Bibo Mao
Add vmstate pre_save and post_load interfaces, which can be used by pic kvm driver in future. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_pic_common.c | 26 ++ include/hw/intc/loongarch_pic_common.h | 2 ++ 2 files changed, 28 insertions(

[PULL 13/18] hw/intc/loongarch_extioi: Add common realize interface

2024-12-15 Thread Bibo Mao
Add common realize function, it is only to check validity of property. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_extioi.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/intc/loongarch_extioi.c b/hw/intc/loongarch_extioi.c index

[PULL 10/18] include: Move struct LoongArchExtIOI to header file loongarch_extioi_common

2024-12-15 Thread Bibo Mao
Move definiton of structure LoongArchExtIOI from header file loongarch_extioi.h to file loongarch_extioi_common.h. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- include/hw/intc/loongarch_extioi.h| 26 -- include/hw/intc/loongarch_extioi_common.h | 27

[PULL 11/18] include: Rename LoongArchExtIOI with LoongArchExtIOICommonState

2024-12-15 Thread Bibo Mao
Rename structure LoongArchExtIOI with LoongArchExtIOICommonState, since it is defined in file loongarch_extioi_common.h Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- include/hw/intc/loongarch_extioi.h| 1 + include/hw/intc/loongarch_extioi_common.h | 2 +- 2 files changed, 2 inserti

[PULL 14/18] hw/intc/loongarch_extioi: Add unrealize interface

2024-12-15 Thread Bibo Mao
For loongarch extioi emulation driver, add unrealize interface and remove instance_finalize interface and move the code to unrealize interface. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_extioi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/

[PULL 04/18] hw/intc/loongarch_pch: Rename LoongArchPCHPIC with LoongArchPICCommonState

2024-12-15 Thread Bibo Mao
With pic vmstate, rename structure name vmstate_loongarch_pch_pic with vmstate_loongarch_pic_common, and with pic property rename loongarch_pch_pic_properties with loongarch_pic_common_properties. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_pch_pic.c | 52 +++

[PULL 02/18] include: Move struct LoongArchPCHPIC to loongarch_pic_common header file

2024-12-15 Thread Bibo Mao
Move structure LoongArchPCHPIC from header file loongarch_pch_pic.h to file loongarch_pic_common.h, and rename structure name with LoongArchPICCommonState. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- include/hw/intc/loongarch_pch_pic.h| 27 + include/hw/intc/lo

[PULL 05/18] hw/intc/loongarch_pch: Move some functions to file loongarch_pic_common

2024-12-15 Thread Bibo Mao
Move some common functions to file loongarch_pic_common.c, the common functions include loongarch_pic_common_realize(), property structure loongarch_pic_common_properties and vmstate structure vmstate_loongarch_pic_common. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_pch_

[PULL 03/18] hw/intc/loongarch_pch: Merge instance_init() into realize()

2024-12-15 Thread Bibo Mao
Memory region is created in instance_init(), merge it into function realize(). There is no special class_init() for loongarch_pch object. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_pch_pic.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --

[PULL 08/18] hw/intc/loongarch_pch: Code cleanup about loongarch_pch_pic

2024-12-15 Thread Bibo Mao
Remove definition about LoongArchPCHPIC and LOONGARCH_PCH_PIC, and replace them with LoongArchPICCommonState and LOONGARCH_PIC_COMMON separately. Also remove unnecessary header files. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_pch_pic.c | 24 ++--

Re: [PULL 00/18] loongarch-to-apply queue

2024-12-15 Thread bibo mao
On 2024/12/14 下午9:39, Stefan Hajnoczi wrote: On Fri, 13 Dec 2024 at 04:42, Bibo Mao wrote: The following changes since commit a5ba0a7e4e150d1350a041f0d0ef9ca6c8d7c307: Merge tag 'pull-aspeed-20241211' of https://github.com/legoater/qemu into staging (2024-12-11 15:16:47 +) are ava

[RFC PATCH 2/6] hw/pci: Add an API to set the downstream memory region of a PCI bus

2024-12-15 Thread Jason Chien
pci_setup_iommu_downstream_mem() invokes PCIIOMMUOps.set_memory_region() to set the downstream memroy region of a PCI bus. Signed-off-by: Jason Chien --- hw/pci/pci.c | 6 ++ include/hw/pci/pci.h | 7 +++ 2 files changed, 13 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c

[RFC PATCH 5/6] hw/riscv/riscv-iommu: Acquire device IDs dynamically

2024-12-15 Thread Jason Chien
When all memory transactions from a PCIe host write to the same IOMMU memory region, we need to distinguish the source device dynamically. Signed-off-by: Jason Chien --- hw/riscv/riscv-iommu.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/hw/riscv/riscv-i

[RFC PATCH 6/6] include/hw/pci: Send PCI dma requests with memory attributes containing BDF

2024-12-15 Thread Jason Chien
In order to distinguish which PCIe device sends the request over the IOMMU, the requester_id must be set with the BDF of the device. Signed-off-by: Jason Chien --- include/hw/pci/pci_device.h | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/include/hw/pci/pci_

[RFC PATCH 3/6] hw/pci-host: Enable DW PCIe host to send memory transactions over specific mr

2024-12-15 Thread Jason Chien
Current Designware PCIe host cannot connect to an IOMMU, since it has registered PCIIOMMUOps.get_address_space() and an IOMMU cannot overwrite PCIIOMMUOps.get_address_space() without breaking the PCIe translation rules. This commit implements designware_pcie_host_set_mem(), which is used to regist

[RFC PATCH 4/6] hw/riscv/riscv-iommu: Allow PCI hosts with iommu_ops registered connecting to the IOMMU

2024-12-15 Thread Jason Chien
pci_setup_iommu_downstream_mem() is called to set the downstream memory region of the PCIe devices. Signed-off-by: Jason Chien --- hw/riscv/riscv-iommu.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c index e9a0775d6e..f5d53a36b2 10064

[RFC PATCH 0/6] Avoid contention for PCIIOMMUOps between IOMMU and PCIe host

2024-12-15 Thread Jason Chien
When PCIIOMMUOps.get_address_space() is already registered by the pci host, e.g. TYPE_DESIGNWARE_PCIE_HOST, IOMMU cannot overwrite this hook without breaking the PCIe translation rule, which means that IOMMU and the pci host cannot coexist. This RFC introduces a new callback, PCIIOMMUOps.set_memor

[RFC PATCH 1/6] include/hw/pci: Add a callback to set the downstream memory region of a pci bus

2024-12-15 Thread Jason Chien
PCIIOMMUOps.set_memory_region() is introduced to set the downstream memory region of a pci bus. When PCIIOMMUOps.get_address_space() is already registered by the pci host(e.g. TYPE_DESIGNWARE_PCIE_HOST), PCIIOMMUOps.set_memory_region() should be registered as well, so an IOMMU can designate the dow

[PATCH v4] riscv/gdbstub: add V bit to priv reg

2024-12-15 Thread Yanfeng Liu
This adds virtualization mode (V bit) as bit(2) of register `priv` per RiscV debug spec v1.0.0-rc4. Checked with gdb-multiarch v12.1. Note that GDB may display `INVALID` tag for `priv` reg when V bit is set, this doesn't affect actual access to the bit though. Signed-off-by: Yanfeng Liu --- tar

[PULL 34/67] hw/isa: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/isa/lpc_ich9.c | 2 +- hw/isa/pc87312.c | 2 +- hw/isa/piix.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index dabd121

[PULL 43/67] hw/nvram: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/nvram/ds1225y.c | 2 +- hw/nvram/eeprom_at24c.c| 2 +- hw/nvram/fw_cfg.c | 6 +++--- hw/nvram/mac_nvram.c | 2 +- hw/nvram/nrf51_nvm.c | 2 +- hw/n

[PULL 51/67] hw/rx: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/rx/rx62n.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c index 560f53a58a..dfa27bc94e 100644 --- a/hw/rx/rx62n.c +++ b/hw/rx/rx62n.c @@ -257,7 +257,7 @@ static void rx6

[PULL 61/67] hw/usb: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/usb/bus.c | 2 +- hw/usb/canokey.c | 2 +- hw/usb/ccid-card-emulated.c | 2 +- hw/usb/ccid-card-passthru.c | 2 +- hw/usb/dev-audio.c| 2 +- hw/usb/dev-hid.c | 6

[PULL 52/67] hw/s390x: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/s390x/ccw-device.c | 2 +- hw/s390x/css-bridge.c | 2 +- hw/s390x/ipl.c| 2 +- hw/s390x/s390-pci-bus.c | 2 +- hw/s390x/s390-skeys.c | 2 +- hw/s390x/s390-stattrib.c | 2

[PULL 50/67] hw/rtc: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/rtc/allwinner-rtc.c | 2 +- hw/rtc/goldfish_rtc.c | 2 +- hw/rtc/m48t59-isa.c| 2 +- hw/rtc/m48t59.c| 2 +- hw/rtc/mc146818rtc.c | 2 +- hw/rtc/pl031.c | 2 +- 6 files changed, 6 insertions(+), 6 d

[PULL 56/67] hw/sparc64: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/sparc64/sun4u.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 541c7f74fa..7088ac273e 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -37

[PULL 63/67] hw/virtio: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/virtio/vdpa-dev.c | 2 +- hw/virtio/vhost-scsi-pci.c | 2 +- hw/virtio/vhost-user-blk-pci.c | 2 +- hw/virtio/vhost-user-device.c| 2 +- hw/virtio/vhost-user-fs-pci.c| 2 +- hw/virtio/vhost-us

[PULL 46/67] hw/pci: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/pci/pci.c| 2 +- hw/pci/pci_bridge.c | 2 +- hw/pci/pci_host.c | 2 +- hw/pci/pcie_port.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index bf0a1840db..

[PULL 67/67] docs: Constify all Property in examples

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- docs/devel/migration/compatibility.rst | 4 ++-- docs/devel/virtio-backends.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/devel/migration/compatibility.rst b/docs/devel/migration/c

[PULL 64/67] hw/watchdog: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/watchdog/sbsa_gwdt.c | 2 +- hw/watchdog/wdt_aspeed.c | 2 +- hw/watchdog/wdt_imx2.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/w

[PULL 33/67] hw/ipmi: Constify all Property

2024-12-15 Thread Richard Henderson
Acked-by: Corey Minyard Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/ipmi/ipmi.c| 2 +- hw/ipmi/ipmi_bmc_extern.c | 2 +- hw/ipmi/ipmi_bmc_sim.c| 2 +- hw/ipmi/isa_ipmi_bt.c | 2 +- hw/ipmi/isa_ipmi_kcs.c| 2 +- 5 files changed, 5 insertion

[PULL 65/67] hw/xen: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Jason Andryuk Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/xen/xen-bus.c | 2 +- hw/xen/xen_pt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xen/xen-bus.c b/hw/xen/xen-bus.c index 95b207ac8b..0d7defb8cd 100644 --- a/hw/x

[PULL 53/67] hw/scsi: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/scsi/megasas.c | 6 +++--- hw/scsi/mptsas.c | 2 +- hw/scsi/scsi-bus.c| 2 +- hw/scsi/scsi-disk.c | 6 +++--- hw/scsi/scsi-generic.c| 2 +- hw/scsi/spapr_vscsi.c | 2 +- hw/scsi/vho

[PULL 57/67] hw/ssi: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/ssi/aspeed_smc.c | 4 ++-- hw/ssi/ibex_spi_host.c| 2 +- hw/ssi/npcm7xx_fiu.c | 2 +- hw/ssi/pnv_spi.c | 2 +- hw/ssi/sifive_spi.c | 2 +- hw/ssi/ssi.c

[PULL 20/67] hw/core: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/core/generic-loader.c | 2 +- hw/core/guest-loader.c | 2 +- hw/core/or-irq.c | 2 +- hw/core/platform-bus.c | 2 +- hw/core/split-irq.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --g

[PULL 55/67] hw/sparc: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/sparc/sun4m_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sparc/sun4m_iommu.c b/hw/sparc/sun4m_iommu.c index 6f765e97e4..3d6fcdf576 100644 --- a/hw/sparc/sun4m_iommu.c +++ b/hw/sparc/sun4

[PULL 40/67] hw/net: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/net/allwinner-sun8i-emac.c | 2 +- hw/net/allwinner_emac.c| 2 +- hw/net/cadence_gem.c | 2 +- hw/net/can/xlnx-versal-canfd.c | 2 +- hw/net/can/xlnx-zynqmp-can.c | 2 +

[PULL 21/67] hw/cpu: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/cpu/a15mpcore.c | 2 +- hw/cpu/a9mpcore.c| 2 +- hw/cpu/arm11mpcore.c | 2 +- hw/cpu/cluster.c | 2 +- hw/cpu/realview_mpcore.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --g

[PULL 41/67] hw/nubus: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/nubus/nubus-bridge.c | 2 +- hw/nubus/nubus-device.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/nubus/nubus-bridge.c b/hw/nubus/nubus-bridge.c index a42c86080f..83893e5a46 100644 --- a/hw/n

[PULL 01/67] target/arm: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.c | 26 +- target/arm/cpu64.c | 6 +++--- target/arm/tcg/cpu64.c | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.

[PULL 22/67] hw/cxl: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/cxl/switch-mailbox-cci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/cxl/switch-mailbox-cci.c b/hw/cxl/switch-mailbox-cci.c index 4f419443ab..3fde0f8aae 100644 --- a/hw/cxl/switch-mailbox-cci.c

[PULL 66/67] tests/unit: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tests/unit/test-qdev-global-props.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test-qdev-global-props.c b/tests/unit/test-qdev-global-props.c index c8862cac5f..1eb95d2429 100644 --- a/te

[PULL 47/67] hw/ppc: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/ppc/pnv.c | 2 +- hw/ppc/pnv_adu.c | 2 +- hw/ppc/pnv_chiptod.c | 2 +- hw/ppc/pnv_core.c| 4 ++-- hw/ppc/pnv_homer.c | 2 +- hw/ppc/pnv_i2c.c | 2 +- hw/ppc/pnv_lpc.c

[PULL 03/67] target/hexagon: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Brian Cain Signed-off-by: Richard Henderson --- target/hexagon/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index c9aa9408ec..a70007245e 100644 --- a/target/hexagon/cpu.c ++

[PULL 48/67] hw/remote: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Jagannathan Raman Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/remote/proxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/remote/proxy.c b/hw/remote/proxy.c index 302a0a4d4d..6f84fdd3fa 100644 --- a/hw/remote/proxy.c +++ b/h

[PULL 26/67] hw/hyperv: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/hyperv/hv-balloon.c | 2 +- hw/hyperv/syndbg.c | 2 +- hw/hyperv/vmbus.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/hyperv/hv-balloon.c b/hw/hyperv/hv-balloon.c index 3a9ef07691.

[PULL 45/67] hw/pci-host: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/pci-host/dino.c | 2 +- hw/pci-host/gpex.c | 2 +- hw/pci-host/grackle.c | 2 +- hw/pci-host/gt64120.c | 2 +- hw/pci-host/i440fx.c | 2 +- hw/pci-host/mv64361.c | 2 +- hw/pci-host/p

[PULL 28/67] hw/i386: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/i386/amd_iommu.c| 2 +- hw/i386/intel_iommu.c | 2 +- hw/i386/kvm/clock.c| 2 +- hw/i386/kvm/i8254.c| 2 +- hw/i386/kvm/ioapic.c | 2 +- hw/i386/sgx-epc.c | 2 +- hw/i386/vmmou

[PULL 19/67] hw/char: Constify all Property

2024-12-15 Thread Richard Henderson
Acked-by: Alberto Garcia Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/char/avr_usart.c | 2 +- hw/char/bcm2835_aux.c | 2 +- hw/char/cadence_uart.c | 2 +- hw/char/cmsdk-apb-uart.c| 2 +- hw/char/debugcon.c | 2 +- hw/char/digic-uar

[PULL 44/67] hw/pci-bridge: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/pci-bridge/cxl_downstream.c | 2 +- hw/pci-bridge/cxl_root_port.c | 2 +- hw/pci-bridge/cxl_upstream.c| 2 +- hw/pci-bridge/gen_pcie_root_port.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 2 +- hw/

[PULL 49/67] hw/riscv: Constify all Property

2024-12-15 Thread Richard Henderson
Reviewed-by: Daniel Henrique Barboza Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/riscv/opentitan.c | 2 +- hw/riscv/riscv-iommu-pci.c | 2 +- hw/riscv/riscv-iommu.c | 2 +- hw/riscv/riscv_hart.c | 2 +- hw/riscv/sifive_u.c| 2 +- 5 files ch

  1   2   >