Bug 2213731 - [RFE] 'virsh capabilities' support loongarch64
Summary: [RFE] 'virsh capabilities' support loongarch64
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 38
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-09 04:18 UTC by JianHong Yin
Modified: 2024-05-22 11:21 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-05-22 11:21:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description JianHong Yin 2023-06-09 04:18:56 UTC
'virsh capabilities' can Not  detect qemu-system-loongarch64

virsh capabilities | grep -e arch.name= -e /emulator

Reproducible: Always

Steps to Reproduce:
1. dnf install -y qemu-system-loongarch64
2. virsh capabilities | grep -e arch.name=loongarch64
Actual Results:  
'virsh capabilities' can Not detect qemu-system-loongarch64

Expected Results:  
'virsh capabilities' can detect qemu-system-loongarch64

virsh capabilities | grep -e arch.name=loongarch64
    <arch name='loongarch64'>

Comment 1 JianHong Yin 2023-06-09 04:24:27 UTC
qemu-system-ppc works fine:
'''
$ sudo dnf install -y qemu-system-ppc
$ virsh capabilities | grep -e arch.name=.ppc -e emulator.*ppc
    <arch name='ppc'>
      <emulator>/usr/bin/qemu-system-ppc</emulator>
    <arch name='ppc64'>
      <emulator>/usr/bin/qemu-system-ppc64</emulator>
    <arch name='ppc64le'>
      <emulator>/usr/bin/qemu-system-ppc64</emulator>
'''

but 'virsh capabilities' get nothing after install qemu-system-loongarch64

Comment 2 JianHong Yin 2023-06-09 10:13:51 UTC
Just found out that it need to change the C source code if want support a new $arch, which I didn't expect;

'''
libvirt]$ grep VIR_ARCH_RISCV -r src 
src/cpu/cpu_riscv64.c:static const virArch archs[] = { VIR_ARCH_RISCV64 };
src/qemu/qemu_capabilities.c:    "virt", /* VIR_ARCH_RISCV32 */
src/qemu/qemu_capabilities.c:    "virt", /* VIR_ARCH_RISCV64 */
src/qemu/qemu_domain.c:    case VIR_ARCH_RISCV32:
src/qemu/qemu_domain.c:    case VIR_ARCH_RISCV64:
src/util/virarch.h:    VIR_ARCH_RISCV32,      /* RISC-V      32 LE https://en.wikipedia.org/wiki/RISC-V */
src/util/virarch.h:    VIR_ARCH_RISCV64,      /* RISC-V      64 LE https://en.wikipedia.org/wiki/RISC-V */
src/util/virarch.h:#define ARCH_IS_RISCV(arch) ((arch) == VIR_ARCH_RISCV32 ||\
src/util/virarch.h:                             (arch) == VIR_ARCH_RISCV64)
'''

Comment 3 JianHong Yin 2023-06-09 10:23:08 UTC
and just get this:
 https://gitlab.com/libvirt/libvirt/-/issues/471   //waiting upstream patch

Comment 4 JianHong Yin 2024-01-19 03:58:41 UTC
upstream patches has been in review process:
 https://patchew.org/Libvirt/cover.1704369486.git.lixianglai@loongson.cn/

Comment 5 Andrea Bolognani 2024-03-21 14:56:30 UTC
Support for loongarch64 was merged just upstream:

e478a6d3f3 Add test script for loongarch
0038b155ec Implement the method of getting host info for loongarch
3243783c32 Support for loongarch64 in the QEMU driver
a4e3718981 Add loongarch cpu support

Will be included in the upcoming 10.2.0 release, which will eventually
make its way to Fedora (with Fedora 41, I think).

Comment 6 Aoife Moloney 2024-05-22 11:21:07 UTC
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.

Fedora Linux 38 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.