[RISCV] [BUG] CPU topology issue on TH1520 on Kernel 5.10.113-th15020

Guillem Senabre guillemsenabre at gmail.com
Wed Oct 9 02:43:28 PDT 2024


Dear Linux kernel developers, `sysfs` shows unexpected values when
listing CPU topology for a TH1520 RISC-V CPU.

In particular, the following commands output always -1:

cat /sys/devices/system/cpu/cpu0/topology/{core_id,die_id,physical_package_id}
cat /sys/devices/system/cpu/cpu1/topology/{core_id,die_id,physical_package_id}
cat /sys/devices/system/cpu/cpu2/topology/{core_id,die_id,physical_package_id}
cat /sys/devices/system/cpu/cpu3/topology/{core_id,die_id,physical_package_id}

The expected outputs would be a positive integer, rather than the -1
currently obtained for all.

For more context: We are testing qemu on top of libvirt. This issue is
blocking us since libvirt aborts after calling "virHostCPUGetCore()",
which reads: /sys/devices/system/cpu/cpu0/topology/core_id and obtain
a "-1".

We have resources allocated to debug this issue, but we'd appreciate
guidance on where to focus our efforts.

Hardware:
- Board: Sipeed LicheePi4a
- Processor: TH1520
- Architecture: riscv64

Software:
- OS: Debian GNU/Linux trixie/sid
- Kernel: Linux 5.10.113-th15020
- libvirt: 10.6.0

Thank you for your time and assistance. Please let us know if you need
any additional information to help diagnose this issue.

Best regards,
Guillem



More information about the linux-riscv mailing list