Source: libvirt
Version: 10.10.0-4
Severity: normal
Tags: patch
User: [email protected]
Usertags: loong64
Dear maintainers,
We need to Cherry-pick upstream patch to run loongarch64 VMs when
AppArmor is enabled.
The commit from upstream is
https://lists.libvirt.org/archives/list/[email protected]/thread/IU7KHMVCORZP4E525RQI7A6BZARXN5CB/.
You can also consider the patch we attached.
And the libvirt 10.10.0-4+loong64 source package was compiled
successfully on my local ENV.
```
......
dpkg-deb: building package 'libvirt-common' in
'../libvirt-common_10.10.0-4+loong64_loong64.deb'.
dpkg-deb: building package 'libvirt-l10n' in
'../libvirt-l10n_10.10.0-4+loong64_all.deb'.
dpkg-deb: building package 'libvirt-doc' in
'../libvirt-doc_10.10.0-4+loong64_all.deb'.
dpkg-deb: building package 'libvirt-dev' in
'../libvirt-dev_10.10.0-4+loong64_loong64.deb'.
dpkg-deb: building package 'libvirt-sanlock' in
'../libvirt-sanlock_10.10.0-4+loong64_loong64.deb'.
dpkg-genbuildinfo -O../libvirt_10.10.0-4+loong64_loong64.buildinfo
dpkg-genchanges -O../libvirt_10.10.0-4+loong64_loong64.changes
```
Would it be possible to include the attached patch in the next upload?
You opinions are welcome.
Best regards,
Dandan Zhang
Description: Cherry-pick loongarch64 patch from upstream when AppArmor is enabled.
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.
.
libvirt (10.10.0-4+loong64) unstable; urgency=medium
.
* Cherry-pick loongarch64 support from upstream.
- Allows to load firmware in the qemu-efi-loongarch64 directory
- Allows the binary qemu-system-loongarch64 to be run
Author: Dandan Zhang <[email protected]>
---
Applied-Upstream: (commit:https://lists.libvirt.org/archives/list/[email protected]/thread/IU7KHMVCORZP4E525RQI7A6BZARXN5CB/)
Signed-Off-By: lixianglai
Last-Update: 2025-01-06
--- libvirt-10.10.0.orig/src/security/apparmor/libvirt-qemu.in
+++ libvirt-10.10.0/src/security/apparmor/libvirt-qemu.in
@@ -144,6 +144,7 @@
/usr/bin/qemu-system-hppa rmix,
/usr/bin/qemu-system-i386 rmix,
/usr/bin/qemu-system-lm32 rmix,
+ /usr/bin/qemu-system-loongarch64 rmix,
/usr/bin/qemu-system-m68k rmix,
/usr/bin/qemu-system-microblaze rmix,
/usr/bin/qemu-system-microblazeel rmix,
--- libvirt-10.10.0.orig/src/security/virt-aa-helper.c
+++ libvirt-10.10.0/src/security/virt-aa-helper.c
@@ -481,6 +481,7 @@ valid_path(const char *path, const bool
"/usr/share/AAVMF/",
"/usr/share/qemu-efi/", /* for AAVMF images */
"/usr/share/qemu-efi-aarch64/",
+ "/usr/share/qemu-efi-loongarch64/",
"/usr/share/qemu-efi-riscv64/",
"/usr/share/qemu/", /* SUSE path for OVMF and AAVMF images */
"/usr/lib/u-boot/",