[PATCH v5 0/5] hw/loogarch: Fix UART ACPI properties and FDT

pillow posted 5 patches 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20261025135559.236356-1-waysorrypub@gmail.com
Maintainers: Song Gao <17746591750@163.com>, Bibo Mao <maobibo@loongson.cn>, Xianglai Li <lixianglai@loongson.cn>, Jiaxun Yang <jiaxun.yang@flygoat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <anisinha@redhat.com>
hw/loongarch/virt-acpi-build.c                |  11 -----------
hw/loongarch/virt-fdt-build.c                 |   2 +-
tests/data/acpi/loongarch64/virt/DSDT         | Bin 4603 -> 4351 bytes
tests/data/acpi/loongarch64/virt/DSDT.memhp   | Bin 5824 -> 5572 bytes
tests/data/acpi/loongarch64/virt/DSDT.numamem | Bin 4609 -> 4357 bytes
.../data/acpi/loongarch64/virt/DSDT.topology  | Bin 4905 -> 4653 bytes
6 files changed, 1 insertion(+), 12 deletions(-)
[PATCH v5 0/5] hw/loogarch: Fix UART ACPI properties and FDT
Posted by pillow 4 weeks ago
This series fixes the UART description for LoongArch virt.

The ACPI _DSD property built for the UART has three problems: the
property name is misspelled, the key and value order is reversed, and
it describes a 100 MHz clock that does not match the device model.
The property can be dropped directly because the UART model's input
clock matches the Linux 8250 PnP driver default of 1,843,200 Hz, so no
_DSD override is needed.

The _CCA property is also unnecessary.  _CCA describes a device's DMA
cache coherency attribute, and this UART does not support DMA, so there
is no reason to declare it.

The UART clock frequency in the FDT is corrected to 1,843,200 Hz, and
the expected ACPI tables are updated accordingly.

pillow (5):
  bios-tables-test-allowed-diff.h: Allow LoongArch DSDT.*
  hw/loongarch/virt-acpi-build: Drop invalid _DSD UART clock property
  hw/loongarch/virt-acpi-build: Drop UART _CCA declaration
  hw/loongarch/virt: Fix UART clock frequency in FDT
  tests/data/acpi/loongarch64: Update expected DSDT.*

 hw/loongarch/virt-acpi-build.c                |  11 -----------
 hw/loongarch/virt-fdt-build.c                 |   2 +-
 tests/data/acpi/loongarch64/virt/DSDT         | Bin 4603 -> 4351 bytes
 tests/data/acpi/loongarch64/virt/DSDT.memhp   | Bin 5824 -> 5572 bytes
 tests/data/acpi/loongarch64/virt/DSDT.numamem | Bin 4609 -> 4357 bytes
 .../data/acpi/loongarch64/virt/DSDT.topology  | Bin 4905 -> 4653 bytes
 6 files changed, 1 insertion(+), 12 deletions(-)

-- 
2.56.0
Re: [PATCH v5 0/5] hw/loogarch: Fix UART ACPI properties and FDT
Posted by Bibo Mao 3 weeks, 5 days ago

On 2026/10/25 下午9:55, pillow wrote:
> This series fixes the UART description for LoongArch virt.
> 
> The ACPI _DSD property built for the UART has three problems: the
> property name is misspelled, the key and value order is reversed, and
> it describes a 100 MHz clock that does not match the device model.
> The property can be dropped directly because the UART model's input
> clock matches the Linux 8250 PnP driver default of 1,843,200 Hz, so no
> _DSD override is needed.
> 
> The _CCA property is also unnecessary.  _CCA describes a device's DMA
> cache coherency attribute, and this UART does not support DMA, so there
> is no reason to declare it.
> 
> The UART clock frequency in the FDT is corrected to 1,843,200 Hz, and
> the expected ACPI tables are updated accordingly.
> 
> pillow (5):
>    bios-tables-test-allowed-diff.h: Allow LoongArch DSDT.*
>    hw/loongarch/virt-acpi-build: Drop invalid _DSD UART clock property
>    hw/loongarch/virt-acpi-build: Drop UART _CCA declaration
>    hw/loongarch/virt: Fix UART clock frequency in FDT
>    tests/data/acpi/loongarch64: Update expected DSDT.*
> 
>   hw/loongarch/virt-acpi-build.c                |  11 -----------
>   hw/loongarch/virt-fdt-build.c                 |   2 +-
>   tests/data/acpi/loongarch64/virt/DSDT         | Bin 4603 -> 4351 bytes
>   tests/data/acpi/loongarch64/virt/DSDT.memhp   | Bin 5824 -> 5572 bytes
>   tests/data/acpi/loongarch64/virt/DSDT.numamem | Bin 4609 -> 4357 bytes
>   .../data/acpi/loongarch64/virt/DSDT.topology  | Bin 4905 -> 4653 bytes
>   6 files changed, 1 insertion(+), 12 deletions(-)
> 

Removing _STA works on some x86 windows and linux guest OSs by testing, 
with LoongArch it works well on Linux guest OS.

For this series:
Reviewed-by: Bibo Mao <maobibo@loongson.cn>


Re: [PATCH v5 0/5] hw/loogarch: Fix UART ACPI properties and FDT
Posted by Michael Tokarev 2 weeks, 2 days ago
On 10/25/26 16:55, pillow wrote:
> This series fixes the UART description for LoongArch virt.
> 
> The ACPI _DSD property built for the UART has three problems: the
> property name is misspelled, the key and value order is reversed, and
> it describes a 100 MHz clock that does not match the device model.
> The property can be dropped directly because the UART model's input
> clock matches the Linux 8250 PnP driver default of 1,843,200 Hz, so no
> _DSD override is needed.
> 
> The _CCA property is also unnecessary.  _CCA describes a device's DMA
> cache coherency attribute, and this UART does not support DMA, so there
> is no reason to declare it.
> 
> The UART clock frequency in the FDT is corrected to 1,843,200 Hz, and
> the expected ACPI tables are updated accordingly.
> 
> pillow (5):
>    bios-tables-test-allowed-diff.h: Allow LoongArch DSDT.*
>    hw/loongarch/virt-acpi-build: Drop invalid _DSD UART clock property
>    hw/loongarch/virt-acpi-build: Drop UART _CCA declaration
>    hw/loongarch/virt: Fix UART clock frequency in FDT
>    tests/data/acpi/loongarch64: Update expected DSDT.*
> 
>   hw/loongarch/virt-acpi-build.c                |  11 -----------
>   hw/loongarch/virt-fdt-build.c                 |   2 +-
>   tests/data/acpi/loongarch64/virt/DSDT         | Bin 4603 -> 4351 bytes
>   tests/data/acpi/loongarch64/virt/DSDT.memhp   | Bin 5824 -> 5572 bytes
>   tests/data/acpi/loongarch64/virt/DSDT.numamem | Bin 4609 -> 4357 bytes
>   .../data/acpi/loongarch64/virt/DSDT.topology  | Bin 4905 -> 4653 bytes
>   6 files changed, 1 insertion(+), 12 deletions(-)
> 

Hi!

Should this change be picked up fr current qemu stable releases?

Thanks,

/mjt
Re: [PATCH v5 0/5] hw/loogarch: Fix UART ACPI properties and FDT
Posted by Bibo Mao 2 weeks, 2 days ago

On 2026/11/6 下午4:55, Michael Tokarev wrote:
> On 10/25/26 16:55, pillow wrote:
>> This series fixes the UART description for LoongArch virt.
>>
>> The ACPI _DSD property built for the UART has three problems: the
>> property name is misspelled, the key and value order is reversed, and
>> it describes a 100 MHz clock that does not match the device model.
>> The property can be dropped directly because the UART model's input
>> clock matches the Linux 8250 PnP driver default of 1,843,200 Hz, so no
>> _DSD override is needed.
>>
>> The _CCA property is also unnecessary.  _CCA describes a device's DMA
>> cache coherency attribute, and this UART does not support DMA, so there
>> is no reason to declare it.
>>
>> The UART clock frequency in the FDT is corrected to 1,843,200 Hz, and
>> the expected ACPI tables are updated accordingly.
>>
>> pillow (5):
>>    bios-tables-test-allowed-diff.h: Allow LoongArch DSDT.*
>>    hw/loongarch/virt-acpi-build: Drop invalid _DSD UART clock property
>>    hw/loongarch/virt-acpi-build: Drop UART _CCA declaration
>>    hw/loongarch/virt: Fix UART clock frequency in FDT
>>    tests/data/acpi/loongarch64: Update expected DSDT.*
>>
>>   hw/loongarch/virt-acpi-build.c                |  11 -----------
>>   hw/loongarch/virt-fdt-build.c                 |   2 +-
>>   tests/data/acpi/loongarch64/virt/DSDT         | Bin 4603 -> 4351 bytes
>>   tests/data/acpi/loongarch64/virt/DSDT.memhp   | Bin 5824 -> 5572 bytes
>>   tests/data/acpi/loongarch64/virt/DSDT.numamem | Bin 4609 -> 4357 bytes
>>   .../data/acpi/loongarch64/virt/DSDT.topology  | Bin 4905 -> 4653 bytes
>>   6 files changed, 1 insertion(+), 12 deletions(-)
>>
> 
> Hi!
> 
> Should this change be picked up fr current qemu stable releases?
The _DSD property name of UART is misspelled, OS will use the default 
clock and continue to execute.

It is a problem however not urgent, so I think it is not necessary to 
pickup for qemu stable releases.

Regards
Bibo Mao
> 
> Thanks,
> 
> /mjt