[PATCH 3/3] tests/data/acpi/riscv64: Update expected FADT and MADT

2025-07-16 Thread Sunil V L
001h]Revision : 07 +[009h 0009 001h]Checksum : B3 [00Ah 0010 006h] Oem ID : "BOCHS " [010h 0016 008h] Oem Table ID : "BXPC" [...] Signed-off-by: Sunil V L --- tests/data/acpi/riscv64/virt/AP

[PATCH 1/3] bios-tables-test-allowed-diff.h: Allow RISC-V FADT and MADT changes

2025-07-16 Thread Sunil V L
Signed-off-by: Sunil V L --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..0c3f7a6cac 100644 --- a/tests/qtest/bios-tables-test-allowed

[PATCH 0/3] RISC-V: ACPI: Update FADT and MADT versions

2025-07-16 Thread Sunil V L
Since RISC-V support is added only in ACPI 6.6, it should adhere to the expected FADT and MADT versions. Update them. Sunil V L (3): bios-tables-test-allowed-diff.h: Allow RISC-V FADT and MADT changes hw/riscv/virt-acpi-build.c: Update FADT and MADT versions tests/data/acpi/riscv64: Update

[PATCH 2/3] hw/riscv/virt-acpi-build.c: Update FADT and MADT versions

2025-07-16 Thread Sunil V L
. Signed-off-by: Sunil V L --- hw/riscv/virt-acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index ee1416d264..d7e57cbb1f 100644 --- a/hw/riscv/virt-acpi-build.c +++ b/hw/riscv/virt-acpi-build.c @@ -429,7 +429,7

Re: [PATCH v2] hw/riscv/virt: Add acpi ged and powerdown support

2025-06-20 Thread Sunil V L
ate the expected DSDT file so that CI tests succeed. Please refer to the comments in the file tests/qtest/bios-tables-test.c for detailed procedure. Thanks Sunil

Re: [PATCH] hw/riscv/virt: Add acpi ged and powerdown support

2025-06-19 Thread Sunil V L
; +{ > +RISCVVirtState *s; > + > +s = container_of(notifier, RISCVVirtState, powerdown_notifier); > +acpi_send_event(s->acpi_ged, ACPI_POWER_DOWN_STATUS); Check for s->acpi_ged here. > +} > + > static void virt_machine_done(Notifier *notifier, void *data) > { > RISCVVirtState *s = container_of(notifier, RISCVVirtState, > @@ -1703,6 +1729,9 @@ static void virt_machine_init(MachineState *machine) > > create_platform_bus(s, mmio_irqchip); > > +/* acpi ged */ > +s->acpi_ged = create_acpi_ged(s, mmio_irqchip); > + > I think we should create GED only if ACPI is enabled. Thanks! Sunil

Re: [PATCH V3 4/4] acpi/virt: suppress UART device & SPCR when guest has no serial hardware

2025-05-18 Thread Sunil V L
Return the Chardev for serial port i, or NULL if none */ > Chardev *serial_hd(int i); > > +bool serial_exist(void); > + > /* parallel ports */ > > #define MAX_PARALLEL_PORTS 3 > diff --git a/system/vl.c b/system/vl.c > index 520956f4a1..7e219df7bf 100644 > --- a/system/vl.c > +++ b/system/vl.c > @@ -1484,6 +1484,11 @@ Chardev *serial_hd(int i) > return NULL; > } > > +bool serial_exist(void) > +{ > +return serial_hd(0) ? true : false; > +} > + LGTM. Reviewed-by: Sunil V L

Re: [PATCH V3 1/4] acpi: Add machine option to disable SPCR table

2025-05-18 Thread Sunil V L
yption object to > use (default=none)\n" > "hmat=on|off controls ACPI HMAT support (default=off)\n" > +"spcr=on|off controls ACPI SPCR support (default=on)\n" > #ifdef CONFIG_POSIX > "aux-ram-share=on|off allocate auxiliary guest RAM as > shared (default: off)\n" > #endif > @@ -105,6 +106,10 @@ SRST > Enables or disables ACPI Heterogeneous Memory Attribute Table > (HMAT) support. The default is off. > > +``spcr=on|off`` > +Enables or disables ACPI Serial Port Console Redirection Table > +(SPCR) support. The default is on. > + Reviewed-by: Sunil V L Thanks! Sunil

Re: [PATCH V3 3/4] tests/qtest/bios-tables-test: Add test for disabling SPCR on RISC-V

2025-05-18 Thread Sunil V L
; +} > + > static void test_acpi_tcg_acpi_hmat(const char *machine, const char *arch) > { > test_data data = {}; > @@ -2612,6 +2632,8 @@ int main(int argc, char *argv[]) > qtest_add_func("acpi/virt", test_acpi_riscv64_virt_tcg); > qtest_add_func("acpi/virt/numamem", > test_acpi_riscv64_virt_tcg_numamem); > +qtest_add_func("acpi/virt/acpispcr", > + test_acpi_riscv_virt_tcg_acpi_spcr); > } Reviewed-by: Sunil V L

[PATCH v2 1/2] hw/riscv/virt: Add the BDF of IOMMU to RISCVVirtState structure

2025-04-04 Thread Sunil V L
. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza --- hw/riscv/virt.c | 1 + include/hw/riscv/virt.h | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index dae46f4733..ce256fb3b3 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1116,6

[PATCH v2 2/2] hw/riscv/virt-acpi-build: Add support for RIMT

2025-03-21 Thread Sunil V L
/v0.99/rimt-spec.pdf Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza --- hw/riscv/virt-acpi-build.c | 215 + 1 file changed, 215 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index 1ad6800508..1eef2fb4eb 100644

[PATCH v2 0/2] RISC-V: ACPI: Add support for RIMT

2025-03-21 Thread Sunil V L
/download/v0.99/rimt-spec.pdf Changes since v1: 1) Used g_autoptr as per Daniel's suggestion. 2) Added R-b tag from Daniel. Sunil V L (2): hw/riscv/virt: Add the BDF of IOMMU to RISCVVirtState structure hw/riscv/virt-acpi-build: Add support for RIMT hw/riscv/virt-acpi-bu

[PATCH 2/2] hw/riscv/virt-acpi-build: Add support for RIMT

2025-03-13 Thread Sunil V L
/v0.99/rimt-spec.pdf Signed-off-by: Sunil V L --- hw/riscv/virt-acpi-build.c | 215 + 1 file changed, 215 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index 1ad6800508..2b4f5b2cea 100644 --- a/hw/riscv/virt-acpi-build.c +++ b

[PATCH 0/2] RISC-V: ACPI: Add support for RIMT

2025-03-13 Thread Sunil V L
/download/v0.99/rimt-spec.pdf Sunil V L (2): hw/riscv/virt: Add the BDF of IOMMU to RISCVVirtState structure hw/riscv/virt-acpi-build: Add support for RIMT hw/riscv/virt-acpi-build.c | 215 + hw/riscv/virt.c| 1 + include/hw/riscv/virt.h

[PATCH 1/2] hw/riscv/virt: Add the BDF of IOMMU to RISCVVirtState structure

2025-03-13 Thread Sunil V L
. Signed-off-by: Sunil V L --- hw/riscv/virt.c | 1 + include/hw/riscv/virt.h | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index dae46f4733..ce256fb3b3 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1116,6 +1116,7 @@ static void create_fdt_iommu

[PATCH] qemu-ga: Fix a SIGSEGV on guest-set-time command

2024-10-18 Thread Sunil Nimmagadda
rial \ -device virtconsole,chardev=qga0,name=org.qemu.guest_agent.0 This patch rectifies the operator precedence while assigning the NUL terminator. Signed-off-by: Sunil Nimmagadda diff --git a/qga/commands-posix.c b/qga/commands-posix.c index c2bd0b4..bb41fa9 100644 --- a/qga/commands-p

Re: [PATCH v5 3/3] tests/qtest/bios-tables-test: Update virt SPCR golden reference for RISC-V

2024-08-30 Thread Sunil V L
the revision 4 format [2]. > > [1]: > https://learn.microsoft.com/en-us/windows-hardware/drivers/serports/serial-port-console-redirection-table > [2]: https://github.com/acpica/acpica/pull/931 > Reviewed-by: Sunil V L Thanks!

Re: [PATCH RESEND v4 0/3] Upgrade ACPI SPCR table to support SPCR table revision 4 format

2024-08-26 Thread Sunil V L
Hi Jee Heng, On Mon, Aug 26, 2024 at 07:04:11AM +, JeeHeng Sia wrote: > > > > -Original Message- > > From: Sunil V L > > Sent: Friday, August 23, 2024 10:29 PM > > To: JeeHeng Sia > > Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; qemu-ri

Re: [PATCH RESEND v4 0/3] Upgrade ACPI SPCR table to support SPCR table revision 4 format

2024-08-23 Thread Sunil V L
nux side as well? Does current linux code work fine with version 4 of SPCR table on RISC-V? Thanks, Sunil

Re: [PATCH RESEND v4 3/3] tests/qtest/bios-tables-test: Update virt SPCR golden reference for RISC-V

2024-08-23 Thread Sunil V L
2]PCI Vendor ID : > [044h 0068 1] PCI Bus : 00 > [045h 0069 1] PCI Device : 00 > [046h 0070 1] PCI Function : 00 > [047h 0071 4]PCI Flags : > [04Bh 0075 1]

Re: [PATCH RESEND v4 2/3] hw/acpi: Upgrade ACPI SPCR table to support SPCR table revision 4 format

2024-08-23 Thread Sunil V L
g[]; > } AcpiSpcrData; > > #define ACPI_FADT_ARM_PSCI_COMPLIANT (1 << 0) > diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h > index a3784155cb..68c0f2dbee 100644 > --- a/include/hw/acpi/aml-build.h > +++ b/include/hw/acpi/aml-build.h > @@ -500,5 +500,5 @@ void build_tpm2(GArray *table_data, BIOSLinker *linker, > GArray *tcpalog, > > void build_spcr(GArray *table_data, BIOSLinker *linker, > const AcpiSpcrData *f, const uint8_t rev, > -const char *oem_id, const char *oem_table_id); > +const char *oem_id, const char *oem_table_id, const char > *name); > #endif Otherwise, LGTM. Reviewed-by: Sunil V L

Re: [PATCH RESEND v4 1/3] qtest: allow SPCR acpi table changes

2024-08-23 Thread Sunil V L
s-test-allowed-diff.h > index dfb8523c8b..aae973048a 100644 > --- a/tests/qtest/bios-tables-test-allowed-diff.h > +++ b/tests/qtest/bios-tables-test-allowed-diff.h > @@ -1 +1,2 @@ > /* List of comma-separated changed AML files to ignore */ > +"tests/data/acpi/riscv64/virt/SPCR", Reviewed-by: Sunil V L

Re: [PATCH v3 2/3] hw/acpi: Upgrade ACPI SPCR table to support SPCR table version 4 format

2024-08-18 Thread Sunil V L
able_data, linker, &serial, 2, vms->oem_id, > vms->oem_table_id); > +build_spcr(table_data, linker, &serial, 4, vms->oem_id, > vms->oem_table_id, > + name); I request the same which I had asked earlier. Please keep SPCR for other architectures like ARM intact. The latest revision is primarily required for RISC-V. So, restrict the series only for RISC-V. The common build_spcr() should create SPCR based on the revision parameter. Thanks, Sunil

Re: [PATCH 3/3] tests/acpi: Add expected ACPI SRAT AML file for RISC-V

2024-08-08 Thread Sunil V L
iff.h > +++ b/tests/qtest/bios-tables-test-allowed-diff.h > @@ -1,2 +1 @@ > /* List of comma-separated changed AML files to ignore */ > -"tests/data/acpi/riscv64/virt/SRAT.numamem", Reviewed-by: Sunil V L Thanks, Sunil

Re: [PATCH 2/3] tests/qtest/bios-tables-test.c: Enable numamem testing for RISC-V

2024-08-08 Thread Sunil V L
; test_data data = { > @@ -2466,6 +2492,8 @@ int main(int argc, char *argv[]) > } else if (strcmp(arch, "riscv64") == 0) { > if (has_tcg && qtest_has_device("virtio-blk-pci")) { > qtest_add_func("acpi/virt", test_acpi_riscv64_virt_tcg); > +qtest_add_func("acpi/virt/numamem", > + test_acpi_riscv64_virt_tcg_numamem); Reviewed-by: Sunil V L Thanks, Sunil

Re: [PATCH 1/3] tests/acpi: Add empty ACPI SRAT data file for RISC-V

2024-08-08 Thread Sunil V L
+ b/tests/qtest/bios-tables-test-allowed-diff.h > @@ -1 +1,2 @@ > /* List of comma-separated changed AML files to ignore */ > +"tests/data/acpi/riscv64/virt/SRAT.numamem", Reviewed-by: Sunil V L Thanks, Sunil

[PATCH v4 4/9] acpi/gpex: Create PCI link devices outside PCI root bridge

2024-07-16 Thread Sunil V L
. So, this change will alter the DSDT for those systems. [1] - ACPI 5.1: 6.2.13.1 Example: Using _PRT to Describe PCI IRQ Routing Signed-off-by: Sunil V L Acked-by: Igor Mammedov --- hw/pci-host/gpex-acpi.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/pci

[PATCH v4 5/9] tests/acpi: update expected DSDT blob for aarch64 and microvm

2024-07-16 Thread Sunil V L
}) Method (_SRS, 1, NotSerialized) // _SRS: Set Resource Settings { } } } } Signed-off-by: Sunil V L --- tests/data/acpi/aarch64/virt/DSDT | Bin 5196 -> 5196 bytes .../data/acpi/aarch64/virt/DSDT.acpih

[PATCH v4 8/9] tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V

2024-07-16 Thread Sunil V L
Add basic ACPI table test case for RISC-V. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios

[PATCH v4 7/9] tests/acpi: Add empty ACPI data files for RISC-V

2024-07-16 Thread Sunil V L
As per process documented (steps 1-3) in bios-tables-test.c, add empty AML data files for RISC-V ACPI tables and add the entries in bios-tables-test-allowed-diff.h. Signed-off-by: Sunil V L Acked-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/data/acpi/riscv64/virt/APIC

[PATCH v4 9/9] tests/acpi: Add expected ACPI AML files for RISC-V

2024-07-16 Thread Sunil V L
added. Signed-off-by: Sunil V L Acked-by: Alistair Francis Acked-by: Igor Mammedov --- tests/data/acpi/riscv64/virt/APIC | Bin 0 -> 116 bytes tests/data/acpi/riscv64/virt/DSDT | Bin 0 -> 3576 bytes tests/data/acpi/riscv64/virt/FACP | Bin 0 -> 276 bytes t

[PATCH v4 1/9] hw/riscv/virt-acpi-build.c: Add namespace devices for PLIC and APLIC

2024-07-16 Thread Sunil V L
) Signed-off-by: Sunil V L Acked-by: Alistair Francis Acked-by: Igor Mammedov --- hw/riscv/virt-acpi-build.c | 32 1 file changed, 32 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index 0925528160..5f5082a35b 100644 --- a/hw/riscv

[PATCH v4 6/9] tests/qtest/bios-tables-test.c: Remove the fall back path

2024-07-16 Thread Sunil V L
The expected ACPI AML files are moved now under ${arch}/{machine} path. Hence, there is no need to search in old path which didn't have ${arch}. Remove the code which searches for the expected AML files under old path as well. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L Ack

[PATCH v4 3/9] tests/acpi: Allow DSDT acpi table changes for aarch64

2024-07-16 Thread Sunil V L
so that CI tests don't fail when those ACPI tables are updated in the next patch. This is as per the documentation in bios-tables-tests.c. Signed-off-by: Sunil V L Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCH v4 0/9] RISC-V: ACPI: Namespace updates

2024-07-16 Thread Sunil V L
e expected DSDT files for those machine so that CI tests don't fail. 2) Added patches to enable ACPI tables tests for RISC-V including a patch to remove the fallback path to search for expected AML files. 3) Rebased and added tags. Sunil V L

[PATCH v4 2/9] hw/riscv/virt-acpi-build.c: Update the HID of RISC-V UART

2024-07-16 Thread Sunil V L
The requirement ACPI_060 in the RISC-V BRS specification [1], requires NS16550 compatible UART to have the HID RSCV0003. So, update the HID for the UART. [1] - https://github.com/riscv-non-isa/riscv-brs/releases/download/v0.0.2/riscv-brs-spec.pdf (Chapter 6) Signed-off-by: Sunil V L

Re: [PATCH v2 0/9] RISC-V: ACPI: Namespace updates

2024-07-16 Thread Sunil V L
P. Berrangé wrote: > > > > > > > On Fri, Jul 12, 2024 at 02:43:19PM +0200, Igor Mammedov wrote: > > > > > On Mon, 8 Jul 2024 17:17:32 +0530 > > > > > Sunil V L wrote: > > > > > > > > > > > This series ad

Re: [PATCH v3 1/9] hw/riscv/virt-acpi-build.c: Add namespace devices for PLIC and APLIC

2024-07-16 Thread Sunil V L
On Tue, Jul 16, 2024 at 12:24:05PM +0200, Igor Mammedov wrote: > On Mon, 15 Jul 2024 22:41:21 +0530 > Sunil V L wrote: > > > As per the requirement ACPI_080 in the RISC-V Boot and Runtime Services > > (BRS) specification [1], PLIC and APLIC should be in namespace as well. &

[PATCH v3 8/9] tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V

2024-07-15 Thread Sunil V L
Add basic ACPI table test case for RISC-V. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios

[PATCH v3 2/9] hw/riscv/virt-acpi-build.c: Update the HID of RISC-V UART

2024-07-15 Thread Sunil V L
: Sunil V L Acked-by: Alistair Francis --- hw/riscv/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index 5f5082a35b..36d6a3a412 100644 --- a/hw/riscv/virt-acpi-build.c +++ b/hw/riscv/virt-acpi-build.c

[PATCH v3 3/9] tests/acpi: Allow DSDT acpi table changes for aarch64

2024-07-15 Thread Sunil V L
so that CI tests don't fail when those ACPI tables are updated in the next patch. This is as per the documentation in bios-tables-tests.c. Signed-off-by: Sunil V L Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCH v3 7/9] tests/acpi: Add empty ACPI data files for RISC-V

2024-07-15 Thread Sunil V L
As per process documented (steps 1-3) in bios-tables-test.c, add empty AML data files for RISC-V ACPI tables and add the entries in bios-tables-test-allowed-diff.h. Signed-off-by: Sunil V L Acked-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/data/acpi/riscv64/virt/APIC

[PATCH v3 4/9] acpi/gpex: Create PCI link devices outside PCI root bridge

2024-07-15 Thread Sunil V L
. So, this change will alter the DSDT for those systems. [1] - ACPI 5.1: 6.2.13.1 Example: Using _PRT to Describe PCI IRQ Routing Signed-off-by: Sunil V L --- hw/pci-host/gpex-acpi.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/pci-host/gpex-acpi.c b/hw/pci

[PATCH v3 0/9] RISC-V: ACPI: Namespace updates

2024-07-15 Thread Sunil V L
ding a patch to remove the fallback path to search for expected AML files. 3) Rebased and added tags. Sunil V L (9): hw/riscv/virt-acpi-build.c: Add namespace devices for PLIC and APLIC hw/riscv/virt-acpi-build.c: Update the HID of RISC-V UART tests/acpi: Allow DSDT acpi ta

[PATCH v3 5/9] tests/acpi: update expected DSDT blob for aarch64 and microvm

2024-07-15 Thread Sunil V L
}) Method (_SRS, 1, NotSerialized) // _SRS: Set Resource Settings { } } } } Signed-off-by: Sunil V L --- tests/data/acpi/aarch64/virt/DSDT | Bin 5196 -> 5196 bytes .../data/acpi/aarch64/virt/DSDT.acpih

[PATCH v3 1/9] hw/riscv/virt-acpi-build.c: Add namespace devices for PLIC and APLIC

2024-07-15 Thread Sunil V L
: 241575b3189c5d9e60b5e55e78cf0443092713bf) Signed-off-by: Sunil V L Acked-by: Alistair Francis --- hw/riscv/virt-acpi-build.c | 32 1 file changed, 32 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt-acpi-build.c index 0925528160..5f5082a35b 100644 --- a/hw/riscv/virt-acpi

[PATCH v3 6/9] tests/qtest/bios-tables-test.c: Remove the fall back path

2024-07-15 Thread Sunil V L
The expected ACPI AML files are moved now under ${arch}/{machine} path. Hence, there is no need to search in old path which didn't have ${arch}. Remove the code which searches for the expected AML files under old path as well. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L Ack

[PATCH v3 9/9] tests/acpi: Add expected ACPI AML files for RISC-V

2024-07-15 Thread Sunil V L
added. Signed-off-by: Sunil V L Acked-by: Alistair Francis Acked-by: Igor Mammedov --- tests/data/acpi/riscv64/virt/APIC | Bin 0 -> 116 bytes tests/data/acpi/riscv64/virt/DSDT | Bin 0 -> 3576 bytes tests/data/acpi/riscv64/virt/FACP | Bin 0 -> 276 bytes t

Re: [PATCH v2 2/9] hw/riscv/virt-acpi-build.c: Update the HID of RISC-V UART

2024-07-11 Thread Sunil V L
On Thu, Jul 11, 2024 at 10:41:35AM -0400, Michael S. Tsirkin wrote: > On Thu, Jul 11, 2024 at 03:25:12PM +0200, Igor Mammedov wrote: > > On Mon, 8 Jul 2024 17:17:34 +0530 > > Sunil V L wrote: > > > > > The RISC-V BRS specification [1] requires NS16550 compati

[PATCH v2 3/9] tests/acpi: Allow DSDT acpi table changes for aarch64

2024-07-08 Thread Sunil V L
so that CI tests don't fail when those ACPI tables are updated in the next patch. This is as per the documentation in bios-tables-tests.c. Signed-off-by: Sunil V L --- tests/qtest/bios-tables-test-allowed-diff.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qtest/bios-t

[PATCH v2 2/9] hw/riscv/virt-acpi-build.c: Update the HID of RISC-V UART

2024-07-08 Thread Sunil V L
The RISC-V BRS specification [1] requires NS16550 compatible UART to have the HID RSCV0003. So, update the HID for the UART. [1] - https://github.com/riscv-non-isa/riscv-brs Signed-off-by: Sunil V L Acked-by: Alistair Francis --- hw/riscv/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion

[PATCH v2 4/9] acpi/gpex: Create PCI link devices outside PCI root bridge

2024-07-08 Thread Sunil V L
. So, this change will alter the DSDT for those systems. [1] - ACPI 5.1: 6.2.13.1 Example: Using _PRT to Describe PCI IRQ Routing Signed-off-by: Sunil V L --- hw/pci-host/gpex-acpi.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/pci-host/gpex-acpi.c b/hw/pci

[PATCH v2 1/9] hw/riscv/virt-acpi-build.c: Add namespace devices for PLIC and APLIC

2024-07-08 Thread Sunil V L
PLIC and APLIC should be in namespace as well. So, add them using the defined HID. Signed-off-by: Sunil V L Acked-by: Alistair Francis --- hw/riscv/virt-acpi-build.c | 47 ++ 1 file changed, 47 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c b/hw

[PATCH v2 6/9] tests/qtest/bios-tables-test.c: Remove the fall back path

2024-07-08 Thread Sunil V L
The expected ACPI AML files are moved now under ${arch}/{machine} path. Hence, there is no need to search in old path which didn't have ${arch}. Remove the code which searches for the expected AML files under old path as well. Suggested-by: Igor Mammedov Signed-off-by: Sunil V L ---

[PATCH v2 5/9] tests/acpi: update expected DSDT blob for aarch64 and microvm

2024-07-08 Thread Sunil V L
}) Method (_SRS, 1, NotSerialized) // _SRS: Set Resource Settings { } } } } Signed-off-by: Sunil V L --- tests/data/acpi/aarch64/virt/DSDT | Bin 5196 -> 5196 bytes .../data/acpi/aarch64/virt/DSDT.acpih

[PATCH v2 8/9] tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V

2024-07-08 Thread Sunil V L
Add basic ACPI table test case for RISC-V. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios

[PATCH v2 9/9] tests/acpi: Add expected ACPI AML files for RISC-V

2024-07-08 Thread Sunil V L
added. Signed-off-by: Sunil V L Acked-by: Alistair Francis Acked-by: Igor Mammedov --- tests/data/acpi/riscv64/virt/APIC | Bin 0 -> 116 bytes tests/data/acpi/riscv64/virt/DSDT | Bin 0 -> 3576 bytes tests/data/acpi/riscv64/virt/FACP | Bin 0 -> 276 bytes t

[PATCH v2 0/9] RISC-V: ACPI: Namespace updates

2024-07-08 Thread Sunil V L
that CI tests don't fail. 2) Added patches to enable ACPI tables tests for RISC-V including a patch to remove the fallback path to search for expected AML files. 3) Rebased and added tags. Sunil V L (9): hw/riscv/virt-acpi-build.c: Add namespace device

[PATCH v2 7/9] tests/acpi: Add empty ACPI data files for RISC-V

2024-07-08 Thread Sunil V L
As per process documented (steps 1-3) in bios-tables-test.c, add empty AML data files for RISC-V ACPI tables and add the entries in bios-tables-test-allowed-diff.h. Signed-off-by: Sunil V L Acked-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/data/acpi/riscv64/virt/APIC

Re: [PATCH v4 16/16] tests/qtest/bios-tables-test: Add expected ACPI data files for RISC-V

2024-07-07 Thread Sunil V L
On Mon, Jul 08, 2024 at 01:16:49PM +1000, Alistair Francis wrote: > On Thu, Jul 4, 2024 at 12:57 AM Sunil V L wrote: > > > > On Wed, Jul 03, 2024 at 03:53:08PM +0530, Sunil V L wrote: > > > On Tue, Jul 02, 2024 at 03:02:36PM +0100, Jonathan Cameron wrote: > > > &g

Re: [PATCH v4 16/16] tests/qtest/bios-tables-test: Add expected ACPI data files for RISC-V

2024-07-03 Thread Sunil V L
On Wed, Jul 03, 2024 at 03:53:08PM +0530, Sunil V L wrote: > On Tue, Jul 02, 2024 at 03:02:36PM +0100, Jonathan Cameron wrote: > > On Mon, 1 Jul 2024 17:03:43 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Thu, Jun 27, 2024 at 02:18:03PM +0200, Igo

Re: [PATCH v4 16/16] tests/qtest/bios-tables-test: Add expected ACPI data files for RISC-V

2024-07-03 Thread Sunil V L
On Tue, Jul 02, 2024 at 03:02:36PM +0100, Jonathan Cameron wrote: > On Mon, 1 Jul 2024 17:03:43 -0400 > "Michael S. Tsirkin" wrote: > > > On Thu, Jun 27, 2024 at 02:18:03PM +0200, Igor Mammedov wrote: > > > On Tue, 25 Jun 2024 20:38:39 +0530 > > > Su

Re: [PATCH v4 06/16] tests/qtest/bios-tables-test.c: Add support for arch in path

2024-07-02 Thread Sunil V L
On Tue, Jul 02, 2024 at 10:30:02AM +0200, Igor Mammedov wrote: > On Tue, 25 Jun 2024 20:38:29 +0530 > Sunil V L wrote: > > > Since machine name can be common for multiple architectures (ex: virt), > > add "arch" in the path to search for expected AML files. Si

[PATCH v4 05/16] qtest: bios-tables-test: Rename aarch64 tests with aarch64 in them

2024-06-25 Thread Sunil V L
Existing AARCH64 virt test functions do not have AARCH64 in their name. To add RISC-V virt related test cases, better to rename existing functions to indicate they are ARM only. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables

[PATCH v4 04/16] tests/data/uefi-boot-images: Add RISC-V ISO image

2024-06-25 Thread Sunil V L
To test ACPI tables, edk2 needs to be booted with a disk image having EFI partition. This image is created using UefiTestToolsPkg. The image is generated using tests/uefi-test-tools source. Signed-off-by: Sunil V L --- .../bios-tables-test.riscv64.iso.qcow2 | Bin 0 -> 16896 by

[PATCH v4 08/16] tests/qtest/bios-tables-test.c: Set "arch" for x86 tests

2024-06-25 Thread Sunil V L
To search for expected AML files under ${arch}/${machine} path, set this field for X86 related test cases. Signed-off-by: Sunil V L Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 77 -- 1 file changed, 64 insertions(+), 13 deletions(-) diff

[PATCH v4 03/16] uefi-test-tools: Add support for python based build script

2024-06-25 Thread Sunil V L
edk2-funcs.sh which is used in this Makefile, was removed in the commit c28a2891f3 ("edk2: update build script"). It is replaced with a python based script. So, update the Makefile and add the configuration file as required to support the python based build script. Signed-off-by: Sunil

[PATCH v4 16/16] tests/qtest/bios-tables-test: Add expected ACPI data files for RISC-V

2024-06-25 Thread Sunil V L
added. Signed-off-by: Sunil V L Acked-by: Alistair Francis Acked-by: Igor Mammedov --- tests/data/acpi/riscv64/virt/APIC | Bin 0 -> 116 bytes tests/data/acpi/riscv64/virt/DSDT | Bin 0 -> 3518 bytes tests/data/acpi/riscv64/virt/FACP | Bin 0 -> 276 bytes t

[PATCH v4 02/16] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support

2024-06-25 Thread Sunil V L
Enable building the test application for RISC-V with appropriate dependencies updated. Signed-off-by: Sunil V L Acked-by: Gerd Hoffmann Acked-by: Alistair Francis Acked-by: Igor Mammedov --- tests/uefi-test-tools/UefiTestToolsPkg/UefiTestToolsPkg.dsc | 6 +- 1 file changed, 5 insertions

[PATCH v4 00/16] Add support for RISC-V ACPI tests

2024-06-25 Thread Sunil V L
vel/2024-06/msg03683.html Sunil V L (16): hw/riscv/virt.c: Make block devices default to virtio uefi-test-tools/UefiTestToolsPkg: Add RISC-V support uefi-test-tools: Add support for python based build script tests/data/uefi-boot-images: Add RISC-V ISO image qtest: bios-tables-test: Rename

[PATCH v4 01/16] hw/riscv/virt.c: Make block devices default to virtio

2024-06-25 Thread Sunil V L
ing a default cdrom device. Signed-off-by: Sunil V L Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- hw/riscv/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 5676d66d12..e578c6dba7 100644 --- a/hw/riscv/virt.c +++ b/hw/

[PATCH v4 10/16] tests/data/acpi/virt: Move ARM64 ACPI tables under aarch64/${machine} path

2024-06-25 Thread Sunil V L
Same machine name can be used by different architectures. Hence, create aarch64 folder and move all aarch64 related AML files for virt machine inside. Signed-off-by: Sunil V L Reviewed-by: Igor Mammedov --- tests/data/acpi/{ => aarch64}/virt/APIC | Bin .../data/acpi/{ => a

[PATCH v4 12/16] pc-bios/meson.build: Add support for RISC-V in unpack_edk2_blobs

2024-06-25 Thread Sunil V L
Update list of images supported in unpack_edk2_blobs to enable RISC-V ACPI table testing. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed-by: Igor Mammedov --- pc-bios/meson.build | 2 ++ tests/qtest/meson.build | 3 +++ 2 files changed, 5 insertions(+) diff --git a/pc

[PATCH v4 09/16] tests/data/acpi: Move x86 ACPI tables under x86/${machine} path

2024-06-25 Thread Sunil V L
To support multiple architectures using same machine name, create x86 folder and move all x86 related AML files for each machine type inside. Signed-off-by: Sunil V L Reviewed-by: Igor Mammedov --- tests/data/acpi/{ => x86}/microvm/APIC | Bin tests/data/acpi/{ => x86}/m

[PATCH v4 07/16] tests/qtest/bios-tables-test.c: Set "arch" for aarch64 tests

2024-06-25 Thread Sunil V L
To search for expected AML files under ${arch}/${machine} path, set this field for AARCH64 related test cases. Signed-off-by: Sunil V L Acked-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 8 1 file changed, 8 insertions(+) diff --git a/tests

[PATCH v4 15/16] tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V

2024-06-25 Thread Sunil V L
Add basic ACPI table test case for RISC-V. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios

[PATCH v4 06/16] tests/qtest/bios-tables-test.c: Add support for arch in path

2024-06-25 Thread Sunil V L
Since machine name can be common for multiple architectures (ex: virt), add "arch" in the path to search for expected AML files. Since the AML files are still under old path, add support for searching with and without arch in the path. Signed-off-by: Sunil V L Acked-by: Alista

[PATCH v4 13/16] tests/data/acpi/rebuild-expected-aml.sh: Add RISC-V

2024-06-25 Thread Sunil V L
Update the list of supported architectures to include RISC-V. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/data/acpi/rebuild-expected-aml.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/data/acpi/rebuild-expected

[PATCH v4 14/16] tests/qtest/bios-tables-test: Add empty ACPI data files for RISC-V

2024-06-25 Thread Sunil V L
As per process documented (steps 1-3) in bios-tables-test.c, add empty AML data files for RISC-V ACPI tables and add the entries in bios-tables-test-allowed-diff.h. Signed-off-by: Sunil V L Acked-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/data/acpi/riscv64/virt/APIC

[PATCH v4 11/16] meson.build: Add RISC-V to the edk2-target list

2024-06-25 Thread Sunil V L
so that ACPI table test can be supported. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed-by: Igor Mammedov --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 97e00d6f59..b54b0463a4 100644 --- a/meson.build +++ b

Re: [PATCH v3 14/15] tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V

2024-06-25 Thread Sunil V L
On Tue, Jun 25, 2024 at 04:06:58PM +0200, Igor Mammedov wrote: > On Tue, 25 Jun 2024 17:59:33 +0530 > Sunil V L wrote: > > > On Tue, Jun 25, 2024 at 02:05:58PM +0200, Igor Mammedov wrote: > > > On Tue, 25 Jun 2024 13:19:59 +0200 > > > Igor Mammedov wrote: > &

Re: [PATCH v3 14/15] tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V

2024-06-25 Thread Sunil V L
On Tue, Jun 25, 2024 at 02:05:58PM +0200, Igor Mammedov wrote: > On Tue, 25 Jun 2024 13:19:59 +0200 > Igor Mammedov wrote: > > > On Fri, 21 Jun 2024 17:29:05 +0530 > > Sunil V L wrote: > > > > > Add basic ACPI table test case for RISC-V. > > > >

[PATCH v3 03/15] tests/data/uefi-boot-images: Add RISC-V ISO image

2024-06-21 Thread Sunil V L
To test ACPI tables, edk2 needs to be booted with a disk image having EFI partition. This image is created using UefiTestToolsPkg. The image is generated using tests/uefi-test-tools source. Signed-off-by: Sunil V L --- .../bios-tables-test.riscv64.iso.qcow2 | Bin 0 -> 16896 by

[PATCH v3 05/15] tests/qtest/bios-tables-test.c: Add support for arch in path

2024-06-21 Thread Sunil V L
Since machine name can be common for multiple architectures (ex: virt), add "arch" in the path to search for expected AML files. Since the AML files are still under old path, add support for searching with and without arch in the path. Signed-off-by: Sunil V L --- tests/qtest/bios-tab

[PATCH v3 12/15] tests/data/acpi/rebuild-expected-aml.sh: Add RISC-V

2024-06-21 Thread Sunil V L
Update the list of supported architectures to include RISC-V. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/data/acpi/rebuild-expected-aml.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/data/acpi/rebuild-expected

[PATCH v3 04/15] qtest: bios-tables-test: Rename aarch64 tests with aarch64 in them

2024-06-21 Thread Sunil V L
Existing AARCH64 virt test functions do not have AARCH64 in their name. To add RISC-V virt related test cases, better to rename existing functions to indicate they are ARM only. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables

[PATCH v3 06/15] tests/qtest/bios-tables-test.c: Set "arch" for aarch64 tests

2024-06-21 Thread Sunil V L
To search for expected AML files under ${arch}/${machine} path, set this field for AARCH64 related test cases. Signed-off-by: Sunil V L --- tests/qtest/bios-tables-test.c | 8 1 file changed, 8 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c

[PATCH v3 13/15] tests/qtest/bios-tables-test: Add empty ACPI data files for RISC-V

2024-06-21 Thread Sunil V L
As per process documented (steps 1-3) in bios-tables-test.c, add empty AML data files for RISC-V ACPI tables and add the entries in bios-tables-test-allowed-diff.h. Signed-off-by: Sunil V L Acked-by: Alistair Francis Reviewed-by: Igor Mammedov --- tests/data/acpi/riscv64/virt/APIC

[PATCH v3 15/15] tests/qtest/bios-tables-test: Add expected ACPI data files for RISC-V

2024-06-21 Thread Sunil V L
added. Signed-off-by: Sunil V L Acked-by: Alistair Francis Acked-by: Igor Mammedov --- tests/data/acpi/riscv64/virt/APIC | Bin 0 -> 116 bytes tests/data/acpi/riscv64/virt/DSDT | Bin 0 -> 3518 bytes tests/data/acpi/riscv64/virt/FACP | Bin 0 -> 276 bytes t

[PATCH v3 11/15] pc-bios/meson.build: Add support for RISC-V in unpack_edk2_blobs

2024-06-21 Thread Sunil V L
Update list of images supported in unpack_edk2_blobs to enable RISC-V ACPI table testing. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed-by: Igor Mammedov --- pc-bios/meson.build | 2 ++ tests/qtest/meson.build | 3 +++ 2 files changed, 5 insertions(+) diff --git a/pc

[PATCH v3 02/15] uefi-test-tools: Add support for python based build script

2024-06-21 Thread Sunil V L
edk2-funcs.sh which is used in this Makefile, was removed in the commit c28a2891f3 ("edk2: update build script"). It is replaced with a python based script. So, update the Makefile and add the configuration file as required to support the python based build script. Signed-off-by:

[PATCH v3 01/15] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support

2024-06-21 Thread Sunil V L
Enable building the test application for RISC-V with appropriate dependencies updated. Signed-off-by: Sunil V L Acked-by: Gerd Hoffmann Acked-by: Alistair Francis --- tests/uefi-test-tools/UefiTestToolsPkg/UefiTestToolsPkg.dsc | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[PATCH v3 14/15] tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V

2024-06-21 Thread Sunil V L
Add basic ACPI table test case for RISC-V. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis --- tests/qtest/bios-tables-test.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index f4c4704bab

[PATCH v3 10/15] meson.build: Add RISC-V to the edk2-target list

2024-06-21 Thread Sunil V L
so that ACPI table test can be supported. Signed-off-by: Sunil V L Reviewed-by: Alistair Francis Reviewed-by: Igor Mammedov --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 97e00d6f59..b54b0463a4 100644 --- a/meson.build +++ b

[PATCH v3 07/15] tests/qtest/bios-tables-test.c: Set "arch" for x86 tests

2024-06-21 Thread Sunil V L
To search for expected AML files under ${arch}/${machine} path, set this field for X86 related test cases. Signed-off-by: Sunil V L --- tests/qtest/bios-tables-test.c | 77 -- 1 file changed, 64 insertions(+), 13 deletions(-) diff --git a/tests/qtest/bios-tables

[PATCH v3 08/15] tests/data/acpi: Move x86 ACPI tables under x86/${machine} path

2024-06-21 Thread Sunil V L
To support multiple architectures using same machine name, create x86 folder and move all x86 related AML files for each machine type inside. Signed-off-by: Sunil V L --- tests/data/acpi/{ => x86}/microvm/APIC | Bin tests/data/acpi/{ => x86}/microvm/APIC.ioapic2 | Bin

[PATCH v3 09/15] tests/data/acpi/virt: Move ARM64 ACPI tables under aarch64/${machine} path

2024-06-21 Thread Sunil V L
Same machine name can be used by different architectures. Hence, create aarch64 folder and move all aarch64 related AML files for virt machine inside. Signed-off-by: Sunil V L --- tests/data/acpi/{ => aarch64}/virt/APIC | Bin .../data/acpi/{ => aarch64}/virt/APIC.acpihm

[PATCH v3 00/15] Add support for RISC-V ACPI tests

2024-06-21 Thread Sunil V L
ted tags. Changes since v1: 1) Addressed feedback from Gerd and Alistair 2) Rebased and added tags received [1]: https://mail.gnu.org/archive/html/qemu-devel/2024-06/msg03683.html Sunil V L (15): uefi-test-tools/UefiTestToolsPkg: Add RISC-V support uefi-test-tools: Add support fo

[PATCH] hw/riscv/virt.c: Make block devices default to virtio

2024-06-19 Thread Sunil V L
ing a default cdrom device. Signed-off-by: Sunil V L --- hw/riscv/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 8675c3a7d1..b0871b7f81 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1764,6 +1764,8 @@ static void virt_machine_class

Re: [PATCH v2 11/12] tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V

2024-06-19 Thread Sunil V L
On Wed, Jun 19, 2024 at 12:12:50PM +0200, Igor Mammedov wrote: > On Fri, 24 May 2024 11:44:10 +0530 > Sunil V L wrote: > > > Add basic ACPI table test case for RISC-V. > > > > Signed-off-by: Sunil V L > > --- > > tests/qtest/bios-tables-test.c | 27

  1   2   3   4   5   >