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

2023-08-24 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 --- hw/arm/virt-acpi-build.c | 19 ++- hw/nvram/fw_cfg-acpi.c

[PATCH v2 03/12] hw/riscv: virt: Make few IMSIC macros and functions public

2023-08-24 Thread Sunil V L
Some macros and static function related to IMSIC are defined in virt.c. They are required in virt-acpi-build.c. So, make them public. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- hw/riscv/virt.c | 25 + include

[PATCH v2 02/12] hw/arm/virt-acpi-build.c: Migrate virtio creation to common location

2023-08-24 Thread Sunil V L
RISC-V also needs to create the virtio in DSDT in the same way as ARM. So, instead of duplicating the code, move this function to the device specific file which is common across architectures. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L --- hw/arm/virt-acpi-build.c| 29

[PATCH v2 04/12] hw/riscv/virt-acpi-build.c: Add AIA support in RINTC

2023-08-24 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 --- hw/riscv/virt-acpi-build.c | 66 +++--- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/hw/riscv/virt-acpi-build.c b/hw

[PATCH v2 00/12] RISC-V: ACPI: Enable AIA, PLIC and update RHCT

2023-08-24 Thread Sunil V L
riscv-to-apply.next and added RB tags as appropriate. Sunil V L (12): hw/arm/virt-acpi-build.c: Migrate fw_cfg creation to common location hw/arm/virt-acpi-build.c: Migrate virtio creation to common location hw/riscv: virt: Make few IMSIC macros and functions public hw/riscv

[PATCH v2 08/12] hw/riscv/virt-acpi-build.c: Add MMU node in RHCT

2023-08-24 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 --- hw/riscv/virt-acpi-build.c | 36 1 file changed, 36 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c b/hw

[PATCH v2 05/12] hw/riscv/virt-acpi-build.c: Add IMSIC in the MADT

2023-08-24 Thread Sunil V L
Add IMSIC structure in MADT when IMSIC is configured. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza --- hw/riscv/virt-acpi-build.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c

[PATCH v2 10/12] hw/riscv/virt: Update GPEX MMIO related properties

2023-08-24 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 --- hw/riscv/virt.c | 47 - include/hw/riscv/virt.h | 1 + 2 files changed, 33 insertions

[PATCH v2 07/12] hw/riscv/virt-acpi-build.c: Add CMO information in RHCT

2023-08-24 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 --- hw/riscv

[PATCH v2 09/12] hw/pci-host/gpex: Define properties for MMIO ranges

2023-08-24 Thread Sunil V L
initialize these properties with correct values for the platform. This basically allows DSDT generator code independent of the machine specific memory map accesses. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L --- hw/pci-host/gpex-acpi.c| 13 + hw/pci-host/gpex.c | 12

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

2023-08-24 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 --- hw/riscv/virt-acpi-build.c | 29 + 1 file changed, 29 insertions(+) diff --git a/hw/riscv

[PATCH v2 06/12] hw/riscv/virt-acpi-build.c: Add APLIC in the MADT

2023-08-24 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 --- hw/riscv/virt-acpi-build.c | 36 ++-- 1 file changed, 34

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

2023-08-24 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 --- hw/riscv/Kconfig | 1 + hw/riscv/virt-acpi-build.c | 76 -- 2 files changed, 73 insertions

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

2023-10-25 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 --- hw/riscv/virt-acpi-build.c | 36

[PATCH v4 02/13] hw/arm/virt-acpi-build.c: Migrate virtio creation to common location

2023-10-25 Thread Sunil V L
RISC-V also needs to create the virtio in DSDT in the same way as ARM. So, instead of duplicating the code, move this function to the device specific file which is common across architectures. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed

[PATCH v4 04/13] hw/riscv: virt: Make few IMSIC macros and functions public

2023-10-25 Thread Sunil V L
Some macros and static function related to IMSIC are defined in virt.c. They are required in virt-acpi-build.c. So, make them public. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Reviewed-by: Andrew Jones --- hw/riscv/virt.c | 25

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

2023-10-25 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 --- hw/i386/acpi-microvm.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/hw/i386/acpi

Re: [PATCH v3 02/12] hw/arm/virt-acpi-build.c: Migrate virtio creation to common location

2023-10-25 Thread Sunil V L
On Mon, Oct 23, 2023 at 02:28:22PM +0200, Andrew Jones wrote: > On Thu, Oct 19, 2023 at 06:56:38PM +0530, Sunil V L wrote: > > RISC-V also needs to create the virtio in DSDT in the same way as ARM. So, > > instead of duplicating the code, move this function to the device specific

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

2023-10-25 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 --- hw/riscv/virt-acpi-build.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/hw

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

2023-10-25 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

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

2023-10-25 Thread Sunil V L
initialize these properties with correct values for the platform. This basically allows DSDT generator code independent of the machine specific memory map accesses. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L --- hw/pci-host/gpex-acpi.c| 13 + hw/pci-host/gpex.c | 12

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

2023-10-25 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 --- hw/riscv/Kconfig | 1 + hw/riscv/virt-acpi-build.c | 79 -- 2 files changed, 76 insertions

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

2023-10-25 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 --- hw/riscv/virt-acpi-build.c | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/hw/riscv/virt

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

2023-10-25 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 --- hw/riscv/virt-acpi-build.c | 29

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

2023-10-25 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 --- hw/riscv/virt-acpi-build.c | 66 +++--- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/hw

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

2023-10-25 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 --- hw/riscv/virt.c | 47 - include/hw/riscv/virt.h | 1 + 2 files changed, 33 insertions

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

2023-10-25 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

[PATCH v4 00/13] RISC-V: ACPI: Enable AIA, PLIC and update RHCT

2023-10-25 Thread Sunil V L
itself. This makes the code generic instead of machine specific. 3) Added PLIC patch from Haibo. 4) Rebased to latest riscv-to-apply.next and added RB tags as appropriate. Sunil V L (13): hw/arm/virt-acpi-build.c: Migrate fw_cfg creation to common location hw

Re: [PATCH v5 02/13] hw/arm/virt-acpi-build.c: Migrate virtio creation to common location

2023-11-02 Thread Sunil V L
On Thu, Nov 02, 2023 at 09:10:05AM -0300, Daniel Henrique Barboza wrote: > Alistair, Sunil, > > This patch is breaking riscv-to-apply.next build when using 'clang' and > --enable-debug: > > URCE=600 -DNCURSES_WIDECHAR=1 -DSTRUCT_IOVEC_DEFINED -MD -MQ > libcommon.fa.p/hw_virtio_virtio-acpi.c.o

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

2023-11-02 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 v6 03/13] hw/i386/acpi-microvm.c: Use common function to add virtio in DSDT

2023-11-02 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 v6 02/13] hw/arm/virt-acpi-build.c: Migrate virtio creation to common location

2023-11-02 Thread Sunil V L
RISC-V also needs to create the virtio in DSDT in the same way as ARM. So, instead of duplicating the code, move this function to the device specific file which is common across architectures. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed

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

2023-11-02 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 v6 00/13] RISC-V: ACPI: Enable AIA, PLIC and update RHCT

2023-11-02 Thread Sunil V L
as appropriate. Sunil V L (13): hw/arm/virt-acpi-build.c: Migrate fw_cfg creation to common location hw/arm/virt-acpi-build.c: Migrate virtio creation to common location hw/i386/acpi-microvm.c: Use common function to add virtio in DSDT hw/riscv: virt: Make few IMSIC macros and functions

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

2023-11-02 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 --- hw/riscv/virt

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

2023-11-02 Thread Sunil V L
initialize these properties with correct values for the platform. This basically allows DSDT generator code independent of the machine specific memory map accesses. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L Acked-by: Alistair Francis Acked-by: Michael S. Tsirkin Reviewed-by: Daniel Henrique

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

2023-11-02 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 v6 13/13] hw/riscv/virt-acpi-build.c: Add PLIC in MADT

2023-11-02 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 v6 08/13] hw/riscv/virt-acpi-build.c: Add CMO information in RHCT

2023-11-02 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

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

2023-11-02 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 v6 01/13] hw/arm/virt-acpi-build.c: Migrate fw_cfg creation to common location

2023-11-02 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

[PATCH v6 04/13] hw/riscv: virt: Make few IMSIC macros and functions public

2023-11-02 Thread Sunil V L
Some macros and static function related to IMSIC are defined in virt.c. They are required in virt-acpi-build.c. So, make them public. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Reviewed-by: Andrew Jones Acked-by: Michael S. Tsirkin --- hw

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

2023-11-02 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 v7 01/13] hw/arm/virt-acpi-build.c: Migrate fw_cfg creation to common location

2023-11-02 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

Re: [PATCH v6 00/13] RISC-V: ACPI: Enable AIA, PLIC and update RHCT

2023-11-02 Thread Sunil V L
On Thu, Nov 02, 2023 at 06:00:22PM -0300, Daniel Henrique Barboza wrote: > Sunil, > > > While doing unrelated work (running Gitlab on my series built on top of > current riscv-to-apply.next), I hit the following error: > > https://gitlab.com/danielhb/qemu/-/jobs/5448178994 > > == > >

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

2023-11-02 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 v7 10/13] hw/pci-host/gpex: Define properties for MMIO ranges

2023-11-02 Thread Sunil V L
initialize these properties with correct values for the platform. This basically allows DSDT generator code independent of the machine specific memory map accesses. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L Acked-by: Alistair Francis Acked-by: Michael S. Tsirkin Reviewed-by: Daniel Henrique

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

2023-11-02 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 v7 07/13] hw/riscv/virt-acpi-build.c: Add APLIC in the MADT

2023-11-02 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 --- hw/riscv/virt

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

2023-11-02 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 v7 00/13] RISC-V: ACPI: Enable AIA, PLIC and update RHCT

2023-11-02 Thread Sunil V L
from Haibo. 4) Rebased to latest riscv-to-apply.next and added RB tags as appropriate. Sunil V L (13): hw/arm/virt-acpi-build.c: Migrate fw_cfg creation to common location hw/arm/virt-acpi-build.c: Migrate virtio creation to common location hw/i386/acpi-microvm.c: Use

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

2023-11-02 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

[PATCH v7 04/13] hw/riscv: virt: Make few IMSIC macros and functions public

2023-11-02 Thread Sunil V L
Some macros and static function related to IMSIC are defined in virt.c. They are required in virt-acpi-build.c. So, make them public. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Reviewed-by: Andrew Jones Acked-by: Michael S. Tsirkin --- hw

[PATCH v7 02/13] hw/arm/virt-acpi-build.c: Migrate virtio creation to common location

2023-11-02 Thread Sunil V L
RISC-V also needs to create the virtio in DSDT in the same way as ARM. So, instead of duplicating the code, move this function to the device specific file which is common across architectures. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed

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

2023-11-02 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 v7 11/13] hw/riscv/virt: Update GPEX MMIO related properties

2023-11-02 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 v7 09/13] hw/riscv/virt-acpi-build.c: Add MMU node in RHCT

2023-11-02 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 v7 03/13] hw/i386/acpi-microvm.c: Use common function to add virtio in DSDT

2023-11-02 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

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

2023-10-26 Thread Sunil V L
On Thu, Oct 26, 2023 at 10:46:56AM +0200, Andrew Jones wrote: > On Thu, Oct 26, 2023 at 01:37:05AM +0530, Sunil V L wrote: > > Update the RINTC structure in MADT with AIA related fields. > > > > Signed-off-by: Sunil V L > > Reviewed-by: Daniel Henrique Barboza >

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

2023-10-26 Thread Sunil V L
On Thu, Oct 26, 2023 at 10:15:00AM +0200, Andrew Jones wrote: > On Thu, Oct 26, 2023 at 01:37:01AM +0530, Sunil V L wrote: > ... > > diff --git a/hw/nvram/fw_cfg-acpi.c b/hw/nvram/fw_cfg-acpi.c > > new file mode 100644 > > index 00..eddaffc09b > > --- /dev/

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

2023-10-26 Thread Sunil V L
On Thu, Oct 26, 2023 at 10:31:51AM +0200, Andrew Jones wrote: > On Thu, Oct 26, 2023 at 01:37:09AM +0530, Sunil V L wrote: > > MMU type information is available via MMU node in RHCT. Add this node in > > RHCT. > > > > Signed-off-by: Sunil V L > > Rev

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

2023-10-30 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 --- hw/i386/acpi-microvm.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions

[PATCH v5 00/13] RISC-V: ACPI: Enable AIA, PLIC and update RHCT

2023-10-30 Thread Sunil V L
generic instead of machine specific. 3) Added PLIC patch from Haibo. 4) Rebased to latest riscv-to-apply.next and added RB tags as appropriate. Sunil V L (13): hw/arm/virt-acpi-build.c: Migrate fw_cfg creation to common location hw/arm/virt-acpi-build.c

[PATCH v5 02/13] hw/arm/virt-acpi-build.c: Migrate virtio creation to common location

2023-10-30 Thread Sunil V L
RISC-V also needs to create the virtio in DSDT in the same way as ARM. So, instead of duplicating the code, move this function to the device specific file which is common across architectures. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed

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

2023-10-30 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 --- hw/riscv/virt-acpi-build.c | 34

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

2023-10-30 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 --- hw/riscv/virt.c | 47 - include/hw/riscv/virt.h | 1 + 2

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

2023-10-30 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

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

2023-10-30 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

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

2023-10-30 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 --- hw/riscv/virt-acpi-build.c | 36 +++- 1 file changed, 35 insertions(+), 1 deletion

[PATCH v5 04/13] hw/riscv: virt: Make few IMSIC macros and functions public

2023-10-30 Thread Sunil V L
Some macros and static function related to IMSIC are defined in virt.c. They are required in virt-acpi-build.c. So, make them public. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Reviewed-by: Andrew Jones --- hw/riscv/virt.c | 25

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

2023-10-30 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 --- hw/riscv/virt-acpi-build.c

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

2023-10-30 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 --- hw/riscv/Kconfig | 1 + hw/riscv/virt-acpi-build.c | 79 -- 2 files

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

2023-10-30 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 --- hw/riscv/virt-acpi-build.c | 43 ++ 1 file changed, 39 insertions(+), 4

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

2023-10-30 Thread Sunil V L
initialize these properties with correct values for the platform. This basically allows DSDT generator code independent of the machine specific memory map accesses. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L Acked-by: Alistair Francis --- hw/pci-host/gpex-acpi.c| 13 + hw/pci

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

2023-10-30 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 --- hw/riscv/virt-acpi-build.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/hw

Re: [PATCH v2 09/12] hw/pci-host/gpex: Define properties for MMIO ranges

2023-09-22 Thread Sunil V L
Hi Igor, On Thu, Aug 24, 2023 at 07:59:39PM +0530, Sunil V L wrote: > 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

[PATCH v3 00/12] RISC-V: ACPI: Enable AIA, PLIC and update RHCT

2023-10-19 Thread Sunil V L
and the DSDT generator can fetch the information from the host bus itself. This makes the code generic instead of machine specific. 3) Added PLIC patch from Haibo. 4) Rebased to latest riscv-to-apply.next and added RB tags as appropriate. Sunil V L (12): hw

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

2023-10-19 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: Alistair Francis --- hw/arm/virt-acpi-build.c | 19

[PATCH v3 05/12] hw/riscv/virt-acpi-build.c: Add IMSIC in the MADT

2023-10-19 Thread Sunil V L
Add IMSIC structure in MADT when IMSIC is configured. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza --- hw/riscv/virt-acpi-build.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c

[PATCH v3 07/12] hw/riscv/virt-acpi-build.c: Add CMO information in RHCT

2023-10-19 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 --- hw/riscv

[PATCH v3 08/12] hw/riscv/virt-acpi-build.c: Add MMU node in RHCT

2023-10-19 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 --- hw/riscv/virt-acpi-build.c | 36 1 file changed, 36 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c b/hw

[PATCH v3 06/12] hw/riscv/virt-acpi-build.c: Add APLIC in the MADT

2023-10-19 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 --- hw/riscv/virt-acpi-build.c | 36 ++-- 1 file changed, 34

[PATCH v3 04/12] hw/riscv/virt-acpi-build.c: Add AIA support in RINTC

2023-10-19 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 --- hw/riscv/virt-acpi-build.c | 66 +++--- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/hw/riscv/virt-acpi-build.c b/hw

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

2023-10-19 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 --- hw/riscv/virt-acpi-build.c | 29 + 1 file changed, 29 insertions(+) diff --git a/hw/riscv

[PATCH v3 02/12] hw/arm/virt-acpi-build.c: Migrate virtio creation to common location

2023-10-19 Thread Sunil V L
RISC-V also needs to create the virtio in DSDT in the same way as ARM. So, instead of duplicating the code, move this function to the device specific file which is common across architectures. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L Reviewed-by: Alistair Francis --- hw/arm/virt

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

2023-10-19 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 --- hw/riscv/Kconfig | 1 + hw/riscv/virt-acpi-build.c | 76 -- 2 files changed, 73 insertions

[PATCH v3 09/12] hw/pci-host/gpex: Define properties for MMIO ranges

2023-10-19 Thread Sunil V L
initialize these properties with correct values for the platform. This basically allows DSDT generator code independent of the machine specific memory map accesses. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L --- hw/pci-host/gpex-acpi.c| 13 + hw/pci-host/gpex.c | 12

[PATCH v3 10/12] hw/riscv/virt: Update GPEX MMIO related properties

2023-10-19 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 --- hw/riscv/virt.c | 47 - include/hw/riscv/virt.h | 1 + 2 files changed, 33 insertions

[PATCH v3 03/12] hw/riscv: virt: Make few IMSIC macros and functions public

2023-10-19 Thread Sunil V L
Some macros and static function related to IMSIC are defined in virt.c. They are required in virt-acpi-build.c. So, make them public. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- hw/riscv/virt.c | 25 + include

Re: [PATCH 01/10] hw/arm/virt-acpi-build.c: Move fw_cfg and virtio to common location

2023-08-16 Thread Sunil V L
On Wed, Aug 16, 2023 at 03:51:58PM -0300, Daniel Henrique Barboza wrote: > > > On 7/26/23 05:25, Igor Mammedov wrote: > > On Tue, 25 Jul 2023 22:20:36 +0530 > > Sunil V L wrote: > > > > > On Mon, Jul 24, 2023 at 05:18:59PM +0200, Igor Mammedov wrote: > &

Re: [PATCH v11 4/6] hw/riscv: virt: Add PMU DT node to the device tree

2022-07-27 Thread Sunil V L
Hi Atish, On Tue, Jul 26, 2022 at 11:49:11PM -0700, Atish Patra wrote: > Qemu virt machine can support few cache events and cycle/instret counters. > It also supports counter overflow for these events. > > Add a DT node so that OpenSBI/Linux kernel is aware of the virt machine > capabilities.

[PATCH V2 0/3] hw/riscv: virt: Enable booting S-mode firmware from pflash

2022-09-05 Thread Sunil V L
to support the use case when both -kernel and -pflash are configured. 2) Refactor patches added to help (1) above. 3) Cover letter added with test instructions. Sunil V L (3): hw/arm,loongarch: Move load_image_to_fw_cfg() to common location hw/riscv: virt: Move create_fw_cfg() prior

[PATCH V2 2/3] hw/riscv: virt: Move create_fw_cfg() prior to loading kernel

2022-09-05 Thread Sunil V L
To enable both -kernel and -pflash options, the fw_cfg needs to be created prior to loading the kernel. Signed-off-by: Sunil V L --- hw/riscv/virt.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index ff8c0df5cd..b6bbf03f61

[PATCH V2 3/3] hw/riscv: virt: Enable booting S-mode firmware from pflash

2022-09-05 Thread Sunil V L
-mode firmware. Signed-off-by: Sunil V L --- hw/riscv/boot.c | 28 hw/riscv/virt.c | 17 - include/hw/riscv/boot.h | 1 + 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/hw/riscv/boot.c b/hw/riscv/boot.c index 1ae7596873

[PATCH V2 1/3] hw/arm, loongarch: Move load_image_to_fw_cfg() to common location

2022-09-05 Thread Sunil V L
load_image_to_fw_cfg() is duplicated by both arm and loongarch. The same function will be required by riscv too. So, it's time to refactor and move this function to a common path. Signed-off-by: Sunil V L --- hw/arm/boot.c | 49 --- hw/loongarch

[PATCH V3 3/3] hw/riscv: virt: Enable booting S-mode firmware from pflash

2022-09-05 Thread Sunil V L
-mode firmware. Signed-off-by: Sunil V L --- hw/riscv/boot.c | 28 hw/riscv/virt.c | 17 - include/hw/riscv/boot.h | 1 + 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/hw/riscv/boot.c b/hw/riscv/boot.c index 1ae7596873

Re: [PATCH V2 1/3] hw/arm,loongarch: Move load_image_to_fw_cfg() to common location

2022-09-05 Thread Sunil V L
On Mon, Sep 05, 2022 at 10:20:40PM +0100, Peter Maydell wrote: > On Mon, 5 Sept 2022 at 19:23, Sunil V L wrote: > > > > load_image_to_fw_cfg() is duplicated by both arm and loongarch. The same > > function will be required by riscv too. So, it's time to refactor and &

[PATCH V3 2/3] hw/riscv: virt: Move create_fw_cfg() prior to loading kernel

2022-09-05 Thread Sunil V L
To enable both -kernel and -pflash options, the fw_cfg needs to be created prior to loading the kernel. Signed-off-by: Sunil V L --- hw/riscv/virt.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index ff8c0df5cd..b6bbf03f61

[PATCH V3 1/3] hw/arm, loongarch: Move load_image_to_fw_cfg() to common location

2022-09-05 Thread Sunil V L
load_image_to_fw_cfg() is duplicated by both arm and loongarch. The same function will be required by riscv too. So, it's time to refactor and move this function to a common path. Signed-off-by: Sunil V L --- hw/arm/boot.c | 49 --- hw/loongarch

[PATCH V3 0/3] hw/riscv: virt: Enable booting S-mode firmware from pflash

2022-09-05 Thread Sunil V L
comment to .h file Changes since V1: 1) Modified code to support the use case when both -kernel and -pflash are configured. 2) Refactor patches added to help (1) above. 3) Cover letter added with test instructions. Sunil V L (3): hw/arm,loongarch: Move load_image_to_fw_cfg

  1   2   3   >