[libvirt PATCH V4 0/4] add loongarch support for libvirt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, Everyone:
  This patch series adds libvirt support for loongarch.
After three times of code review and modification, our patch has come to the 4th version.
We would like to thank Andrea very much for his comments and help us improve patch.

You can get the full patch from the link below:
https://gitlab.com/lixianglai/libvirt
branch: loongarch

  Since the patch associated with loongarch has not yet been submitted to
the virt-manager community, we are providing a temporary patch with
loongarch for the time being patch's virt-manager, the open source work
of virt-manager adding loongarch will be followed up later or
synchronized with the open source libvirt.

  You can get the virt-manager code with loongarch patch from the link below:
https://github.com/lixianglai/virt-manager
branch: loongarch

  loongarch's virtual machine bios is not yet available in qemu,So you need to compile loongarch UEFI yourself,
you can refer to the following link to compile UEFI:
https://github.com/tianocore/edk2-platforms/blob/master/Platform/Loongson/LoongArchQemuPkg/Readme.md
Here we provide compiled UEFI for ease of testing,you can get it from the following link:
https://github.com/lixianglai/LoongarchVirtFirmware
(Note: You should clone the repository using git instead of downloading the file via wget or you'll get xml)
We named the bios QEMU_EFI.fd, QEMU_VARS.fd is used to store pflash images of non-volatile variables.
After installing qemu-system-loongarch64,You can install the loongarch bios by executing the script
install-loongarch-virt-firmware.sh 

  Since there is no fedora operating system that supports the loongarch
architecture, you can find an iso that supports loongarch at the link below for testing purposes:
  https://github.com/fedora-remix-loongarch/releases-info
The operating system provided above may have minor problems of one kind or another,
but you can also find out from the following link that openEuler's operating system supports loongarch:
https://muug.ca/mirror/openeuler/openEuler-22.03-LTS/ISO/loongarch64/

  Well, if you have completed the above steps I think you can now install loongarch virtual machine,
you can install it through the virt-manager graphical interface, or install it through vrit-install,
here is an example of installing it using virt-install:
virt-install  \
--virt-type=qemu \
--name  loongarch-test \
--memory 4096 \
--vcpus=4 \
--arch=loongarch64 \
--boot cdrom \
--disk device=cdrom,bus=scsi,path=/root/livecd-fedora-mate-4.loongarch64.iso \
--disk path=/var/lib/libvirt/images/debian12-loongarch64.qcow2,size=10,format=qcow2,bus=scsi \
--network network=default \
--osinfo archlinux   \
--video=virtio  \
--graphics=vnc,listen=0.0.0.0

CHANGES
V3->V4:
  1.Rebase according to the latest master code, making appropriate adjustments for relevant changes.
  2.Modify the default scsi controller model.
  3.Add firmware test cases.
  4.Remove unnecessary acpi functional flags from test cases.

V2->V3:
  1.Delete redundant header files in cpu_loongarch.c
  2.Fixed code formatting issues
  3.Modify the commit message of [PATCH 2/4]
  4.Remove useless test cases for loongarch,
Rebuild loongarch's test case based on the latest code.

V1->V2:
  1.Modify the link addresses of virtu-manager and firmeware in the cover
letter. Please obtain the code and firmware from the latest link
address.
  2.Rename the bios name. Delete the loongarch bios name from libvirt
and use the json file to obtain the bios path.
  3.Refer to riscv64 to simplify the implementation of loongarch cpu
driver.And fix some code style errors.
  4.Delete unnecessary or redundant device enablement.Such as USB NEC.
  5.Add some test cases for loongarch.

Xianglai Li (4):
  Add loongarch cpu support
  Support for loongarch64 in the QEMU driver
  Implement the method of getting host info for loongarch
  Add test script for loongarch

 src/conf/schemas/basictypes.rng               |     1 +
 src/cpu/cpu.c                                 |     2 +
 src/cpu/cpu_loongarch.c                       |    58 +
 src/cpu/cpu_loongarch.h                       |    25 +
 src/cpu/meson.build                           |     1 +
 src/qemu/qemu_capabilities.c                  |    16 +-
 src/qemu/qemu_command.c                       |     6 +-
 src/qemu/qemu_domain.c                        |    42 +-
 src/qemu/qemu_domain.h                        |     1 +
 src/qemu/qemu_validate.c                      |     1 +
 src/util/virarch.c                            |    13 +-
 src/util/virarch.h                            |    13 +-
 src/util/virhostcpu.c                         |     7 +-
 src/util/virsysinfo.c                         |     3 +-
 .../qemu_8.2.0-tcg-virt.loongarch64.xml       |   165 +
 .../qemu_8.2.0-virt.loongarch64.xml           |   169 +
 tests/domaincapstest.c                        |     4 +-
 .../caps_8.2.0_loongarch64.replies            | 30121 ++++++++++++++++
 .../caps_8.2.0_loongarch64.xml                |   177 +
 .../qemucaps2xmloutdata/caps.loongarch64.xml  |    28 +
 tests/qemufirmwaretest.c                      |     2 +-
 ...o-type-loongarch64.loongarch64-latest.args |    34 +
 ...eo-type-loongarch64.loongarch64-latest.xml |    45 +
 .../default-video-type-loongarch64.xml        |    18 +
 ...garch64.loongarch64-latest.abi-update.args |    35 +
 ...ngarch64.loongarch64-latest.abi-update.xml |    34 +
 ...to-efi-loongarch64.loongarch64-latest.args |    35 +
 ...uto-efi-loongarch64.loongarch64-latest.xml |    34 +
 .../firmware-auto-efi-loongarch64.xml         |    17 +
 ...-models.loongarch64-latest.abi-update.args |    43 +
 ...t-models.loongarch64-latest.abi-update.xml |    72 +
 ...irt-default-models.loongarch64-latest.args |    43 +
 ...virt-default-models.loongarch64-latest.xml |    72 +
 .../loongarch64-virt-default-models.xml       |    21 +
 ...ch64-virt-graphics.loongarch64-latest.args |    56 +
 ...rch64-virt-graphics.loongarch64-latest.xml |   116 +
 .../loongarch64-virt-graphics.xml             |    48 +
 ...ch64-virt-headless.loongarch64-latest.args |    52 +
 ...rch64-virt-headless.loongarch64-latest.xml |   102 +
 .../loongarch64-virt-headless.xml             |    42 +
 ...minimal.loongarch64-latest.abi-update.args |    31 +
 ...-minimal.loongarch64-latest.abi-update.xml |    23 +
 ...rch64-virt-minimal.loongarch64-latest.args |    31 +
 ...arch64-virt-minimal.loongarch64-latest.xml |    23 +
 .../loongarch64-virt-minimal.xml              |    12 +
 tests/qemuxmlconftest.c                       |     9 +
 tests/testutilshostcpus.h                     |    10 +
 47 files changed, 31885 insertions(+), 28 deletions(-)
 create mode 100644 src/cpu/cpu_loongarch.c
 create mode 100644 src/cpu/cpu_loongarch.h
 create mode 100644 tests/domaincapsdata/qemu_8.2.0-tcg-virt.loongarch64.xml
 create mode 100644 tests/domaincapsdata/qemu_8.2.0-virt.loongarch64.xml
 create mode 100644 tests/qemucapabilitiesdata/caps_8.2.0_loongarch64.replies
 create mode 100644 tests/qemucapabilitiesdata/caps_8.2.0_loongarch64.xml
 create mode 100644 tests/qemucaps2xmloutdata/caps.loongarch64.xml
 create mode 100644 tests/qemuxmlconfdata/default-video-type-loongarch64.loongarch64-latest.args
 create mode 100644 tests/qemuxmlconfdata/default-video-type-loongarch64.loongarch64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/default-video-type-loongarch64.xml
 create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-loongarch64.loongarch64-latest.abi-update.args
 create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-loongarch64.loongarch64-latest.abi-update.xml
 create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-loongarch64.loongarch64-latest.args
 create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-loongarch64.loongarch64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-loongarch64.xml
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-default-models.loongarch64-latest.abi-update.args
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-default-models.loongarch64-latest.abi-update.xml
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-default-models.loongarch64-latest.args
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-default-models.loongarch64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-default-models.xml
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-graphics.loongarch64-latest.args
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-graphics.loongarch64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-graphics.xml
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-headless.loongarch64-latest.args
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-headless.loongarch64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-headless.xml
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-minimal.loongarch64-latest.abi-update.args
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-minimal.loongarch64-latest.abi-update.xml
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-minimal.loongarch64-latest.args
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-minimal.loongarch64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/loongarch64-virt-minimal.xml

-- 
2.39.1
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux