Re: [PATCH v3] hw/arm/virt-acpi-build: Fix id_count in build_iort_id_mapping

2024-06-19 Thread Nicolin Chen
On Wed, Jun 19, 2024 at 04:15:35PM +0200, Eric Auger wrote: > > @@ -209,12 +209,20 @@ static void acpi_dsdt_add_tpm(Aml *scope, > > VirtMachineState *vms) > > #define ROOT_COMPLEX_ENTRY_SIZE 36 > > #define IORT_NODE_OFFSET 48 > > > > +/* > > + * Input Output Remapping Table (IORT) -- Table 4 ID

Re: [PATCH v3] hw/arm/virt-acpi-build: Fix id_count in build_iort_id_mapping

2024-06-19 Thread Eric Auger
Hi Nicolin, On 6/18/24 23:11, Nicolin Chen wrote: > It's observed that Linux kernel booting with the VM reports a "conflicting > mapping for input ID" FW_BUG. > > The IORT doc defines "Number of IDs" to be "the number of IDs in the range > minus one", while virt-acpi-build.c simply stores the num

Re: [PATCH v3] hw/arm/virt-acpi-build: Fix id_count in build_iort_id_mapping

2024-06-18 Thread Michael S. Tsirkin
On Tue, Jun 18, 2024 at 02:51:41PM -0700, Nicolin Chen wrote: > On Tue, Jun 18, 2024 at 05:34:21PM -0400, Michael S. Tsirkin wrote: > > On Tue, Jun 18, 2024 at 02:19:25PM -0700, Nicolin Chen wrote: > > > On Tue, Jun 18, 2024 at 05:14:32PM -0400, Michael S. Tsirkin wrote: > > > > > @@ -306,8 +314,8

Re: [PATCH v3] hw/arm/virt-acpi-build: Fix id_count in build_iort_id_mapping

2024-06-18 Thread Nicolin Chen
On Tue, Jun 18, 2024 at 05:34:21PM -0400, Michael S. Tsirkin wrote: > On Tue, Jun 18, 2024 at 02:19:25PM -0700, Nicolin Chen wrote: > > On Tue, Jun 18, 2024 at 05:14:32PM -0400, Michael S. Tsirkin wrote: > > > > @@ -306,8 +314,8 @@ build_iort(GArray *table_data, BIOSLinker *linker, > > > > VirtMac

Re: [PATCH v3] hw/arm/virt-acpi-build: Fix id_count in build_iort_id_mapping

2024-06-18 Thread Michael S. Tsirkin
On Tue, Jun 18, 2024 at 02:19:25PM -0700, Nicolin Chen wrote: > On Tue, Jun 18, 2024 at 05:14:32PM -0400, Michael S. Tsirkin wrote: > > > @@ -306,8 +314,8 @@ build_iort(GArray *table_data, BIOSLinker *linker, > > > VirtMachineState *vms) > > > } > > > > > > /* Append the last RC

Re: [PATCH v3] hw/arm/virt-acpi-build: Fix id_count in build_iort_id_mapping

2024-06-18 Thread Nicolin Chen
On Tue, Jun 18, 2024 at 05:14:32PM -0400, Michael S. Tsirkin wrote: > > @@ -306,8 +314,8 @@ build_iort(GArray *table_data, BIOSLinker *linker, > > VirtMachineState *vms) > > } > > > > /* Append the last RC -> ITS ID mapping */ > > -if (next_range.input_base < 0x) { >

Re: [PATCH v3] hw/arm/virt-acpi-build: Fix id_count in build_iort_id_mapping

2024-06-18 Thread Michael S. Tsirkin
On Tue, Jun 18, 2024 at 02:11:10PM -0700, Nicolin Chen wrote: > It's observed that Linux kernel booting with the VM reports a "conflicting > mapping for input ID" FW_BUG. > > The IORT doc defines "Number of IDs" to be "the number of IDs in the range > minus one", while virt-acpi-build.c simply sto

[PATCH v3] hw/arm/virt-acpi-build: Fix id_count in build_iort_id_mapping

2024-06-18 Thread Nicolin Chen
It's observed that Linux kernel booting with the VM reports a "conflicting mapping for input ID" FW_BUG. The IORT doc defines "Number of IDs" to be "the number of IDs in the range minus one", while virt-acpi-build.c simply stores the number of IDs in the id_count without the "minus one". Meanwhile