Hi Andrea:
On Thu, Dec 14, 2023 at 02:08:44PM +0800, xianglai li wrote:
Hello, Everyone:
This patch series adds libvirt support for loongarch.Although the bios
path and name has not been officially integrated into qemu and we think
there are still many shortcomings, we try to push a version of patch to
the community according to the opinions of the community, hoping to
listen to everyone's opinions.
Sharing your work earlier rather than later is definitely a good
approach when it comes to open source development, so I appreciate
you doing this :)
Thank you very much for your affirmation and encouragement!
loongarch's virtual machine bios is not yet available in qemu, so you can get it from the following link
https://github.com/loongson/Firmware/tree/main/LoongArchVirtMachine
Great to see that edk2 support has already been mainlined! An
excellent next step would be to get an edk2-loongarch64 package into
the various distros... Please consider working with the maintainers
for edk2 in Fedora to make that happen, as it would significantly
lower the barrier for interested people to get involved.
Yes, we will do that, currently the loongarch code is being moved from
the edk2-platform directory to the edk2 directory,
I think after this work is completed, we will have the edk2 installation
package.
(Note: You should clone the repository using git instead of downloading the file via wget or you'll get xml)
We named the bios edk2-loongarch64-code.fd, edk2-loongarch64-vars.fd is used to store pflash images of non-volatile
variables.After installing qemu-system-loongarch64, you need to manually copy these two files to the /user/share/qemu
directory.
As I have implicitly pointed out in the comment to one of the
patches, these paths are not correct.
The /usr/share/qemu/ directory is owned by the QEMU package, and
other components should not drop their files in there. The exception
is the /usr/share/qemu/firmware/ directory, which is specifically
designed for interoperation.
The edk2 files should be installed to /usr/share/edk2/loongarch64/,
following the convention established by existing architectures. Once
the directory name already contains architecture information, you can
use shorter and less unique names for the files themselves.
I think edk2-loongarch64-code.fd can be the loongarch bios that comes
with the qemu package,
and then its installation path is /usr/share/qemu which makes sense.
The future separately generated loongarch edk2 installation package
installation path according to your suggestion can be
/usr/share/edk2/loongarch64, named then QEMU_EFI. Fd.
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 \
--feature acpi=true \
This looks a bit out of place: virt-install should automatically
enable the ACPI feature if it's advertised as available by libvirt.
Please take a look at virQEMUCapsInitGuestFromBinary() and consider
updating it so that ACPI support for loongarch is advertised.
Ok, I'll fix that in the next version.
lixianglai (5):
Add loongarch cpu support
Add loongarch cpu model and vendor info
Config some capabilities for loongarch virt machine
Implement the method of getting host info for loongarch
Add bios path for loongarch
The information provided in the cover letter, including pointers to
the various not-yet-upstreamed changes and instructions on how to
test everything, is very much appreciated!
Ok, I will provide more detailed instructions on changes and testing in
the next version.
Unfortunately I didn't have enough time to take things for a spin, so
I've limited myself to a relatively quick review.
In addition to the comments that I've provided for the code that is
there, I need to point out what is *not* there: specifically, any
kind of test :)
Before this can be considered for inclusion, we need to have some
test coverage. It doesn't have to be incredibly exhaustive, but at
least the basics need to be addressed. If you look for files that
contain "riscv64" in their names in the tests/ directory you should
get a decent idea of what kind of coverage we will need.
Ok, I will refer to the "riscv64" file in the tests directory to add
loongarch64 related test cases.
That's all I have for now. I'll talk to you again in 2024 :)
Ok, thank you very much for taking time out of your busy schedule to
review these patches.
Wish you a merry Christmas in advance.
Thanks!
Xianglai.
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx