diff options
Diffstat (limited to 'gitlab/issues/target_loongarch/host_missing')
7 files changed, 331 insertions, 0 deletions
diff --git a/gitlab/issues/target_loongarch/host_missing/accel_KVM/2819.toml b/gitlab/issues/target_loongarch/host_missing/accel_KVM/2819.toml new file mode 100644 index 000000000..57830d536 --- /dev/null +++ b/gitlab/issues/target_loongarch/host_missing/accel_KVM/2819.toml @@ -0,0 +1,125 @@ +id = 2819 +title = "QEMU 9.2.0 hangs with 100% CPU when using `-vnc` on Loongarch (3A6000 and 3C6000)" +state = "opened" +created_at = "2025-02-18T16:31:10.827Z" +closed_at = "n/a" +labels = ["accel: KVM", "target: loongarch"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/2819" +host-os = "[AOSC](https://wiki.aosc.io/aosc-os/)" +host-arch = "loongarch64" +qemu-version = "9.2.0" +guest-os = "AOSC" +guest-arch = "loongarch64" +description = """When launching VMs with the `-vnc` parameter (generated by `<graphics type='vnc'>`) on a Loongarch (Loongson 3A6000 or Loongson 3C6000) machine. QEMU process hangs indefinitely with 100% CPU usage, no VNC output.""" +reproduce = """1. Create a VM using libvirt (Cockpit-Machines or virt-manager). +2. Configure VNC graphics as follows in libvirt XML, which is provided by Cockpit-Machines by default. +```xml +<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> + <listen type='address' address='127.0.0.1'/> +</graphics> +``` +3. Start the VM: QEMU process hangs indefinitely with 100% CPU usage, no VNC output.""" +additional = """- Removing the `-vnc` parameter from the QEMU command line (via removing <graphics ... In libvirt XML) resolves the issue. +- The issue appears to stem from changes introduced after QEMU 9.0.1, as downgrading resolves the problem. +- Libvirtd log: https://aosc.io/paste/detail?id=da60d57c-5040-4326-a622-6a692eab488a +- QEMU command line: https://aosc.io/paste/detail?id=30c97bd5-e666-4578-adfd-236cc1fe02ef +- Full Libvirt VM XML: https://aosc.io/paste/detail?id=6bff0fed-d805-4c36-afb7-d14f29d6313b +- No activity in `strace` during the hang. +- GDB backtrace shows the process stuck in `ppoll` (full trace below): +``` +(gdb) bt + #0 0x00007ffff189cad0 in __GI_ppoll (fds=0x7fffa4068d00, nfds=10, timeout=<optimized out>, sigmask=0x0) + at ../sysdeps/unix/sysv/linux/ppoll.c:42 + #1 0x0000555557e67320 in qemu_poll_ns () + #2 0x0000555557e636a4 in main_loop_wait () + #3 0x0000555557a0c4d4 in qemu_main_loop () + #4 0x0000555557d79cc8 in qemu_default_main () + #5 0x00007ffff17c8f30 in __libc_start_call_main + (main=main@entry=0x5555577969c0 <main>, argc=argc@entry=119, argv=argv@entry=0x7ffffbad5508) + at ../sysdeps/nptl/libc_start_call_main.h:58 + #6 0x00007ffff17c9020 in __libc_start_main_impl + (main=0x5555577969c0 <main>, argc=119, argv=0x7ffffbad5508, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>) at ../csu/libc-start.c:360 + #7 0x0000555557797b70 in _start () +``` +- Qemu full command line: +``` +LC_ALL=C \\ +PATH=/usr/local/bin:/usr/bin \\ +USER=root \\ +HOME=/var/lib/libvirt/qemu/domain-5-buildbot-new \\ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-5-buildbot-new/.local/share \\ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-5-buildbot-new/.cache \\ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-5-buildbot-new/.config \\ +/usr/bin/qemu-system-loongarch64 \\ +-name guest=buildbot-new,debug-threads=on \\ +-S \\ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain-5-buildbot-new/master-key.aes"}' \\ +-blockdev '{"driver":"file","filename":"/usr/share/qemu/edk2-loongarch64-code.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \\ +-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \\ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/buildbot-new_VARS.fd","node-name":"libvirt-pflash1-storage","read-only":false}' \\ +-machine virt,usb=off,dump-guest-core=off,memory-backend=loongarch.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-storage,acpi=on \\ +-accel kvm \\ +-cpu la464 \\ +-m size=1048576k \\ +-object '{"qom-type":"memory-backend-ram","id":"loongarch.ram","size":1073741824}' \\ +-overcommit mem-lock=off \\ +-smp 1,sockets=1,dies=1,clusters=1,cores=1,threads=1 \\ +-uuid c56a24b5-c539-4240-9c72-39fd0d0de860 \\ +-no-user-config \\ +-nodefaults \\ +-chardev socket,id=charmonitor,fd=33,server=on,wait=off \\ +-mon chardev=charmonitor,id=monitor,mode=control \\ +-rtc base=utc \\ +-no-shutdown \\ +-boot strict=on \\ +-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \\ +-device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \\ +-device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' \\ +-device '{"driver":"pcie-root-port","port":11,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x3"}' \\ +-device '{"driver":"pcie-root-port","port":12,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x4"}' \\ +-device '{"driver":"pcie-root-port","port":13,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x1.0x5"}' \\ +-device '{"driver":"pcie-root-port","port":14,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x1.0x6"}' \\ +-device '{"driver":"pcie-root-port","port":15,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x1.0x7"}' \\ +-device '{"driver":"pcie-root-port","port":16,"chassis":9,"id":"pci.9","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \\ +-device '{"driver":"pcie-root-port","port":17,"chassis":10,"id":"pci.10","bus":"pcie.0","addr":"0x2.0x1"}' \\ +-device '{"driver":"pcie-root-port","port":18,"chassis":11,"id":"pci.11","bus":"pcie.0","addr":"0x2.0x2"}' \\ +-device '{"driver":"pcie-root-port","port":19,"chassis":12,"id":"pci.12","bus":"pcie.0","addr":"0x2.0x3"}' \\ +-device '{"driver":"pcie-root-port","port":20,"chassis":13,"id":"pci.13","bus":"pcie.0","addr":"0x2.0x4"}' \\ +-device '{"driver":"pcie-root-port","port":21,"chassis":14,"id":"pci.14","bus":"pcie.0","addr":"0x2.0x5"}' \\ +-device '{"driver":"pcie-root-port","port":22,"chassis":15,"id":"pci.15","bus":"pcie.0","addr":"0x2.0x6"}' \\ +-device '{"driver":"pcie-pci-bridge","id":"pci.16","bus":"pci.1","addr":"0x0"}' \\ +-device '{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.3","addr":"0x0"}' \\ +-device '{"driver":"virtio-scsi-pci","id":"scsi0","bus":"pci.8","addr":"0x0"}' \\ +-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.4","addr":"0x0"}' \\ +-blockdev '{"driver":"file","filename":"/mnt/data/aosc-os_installer_20241122_loongarch64.iso","node-name":"libvirt-1-storage","read-only":true}' \\ +-device '{"driver":"scsi-cd","bus":"scsi0.0","channel":0,"scsi-id":0,"lun":0,"device_id":"drive-scsi0-0-0-0","drive":"libvirt-1-storage","id":"scsi0-0-0-0"}' \\ +-chardev pty,id=charserial0 \\ +-serial chardev:charserial0 \\ +-chardev socket,id=charchannel0,fd=32,server=on,wait=off \\ +-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \\ +-chardev spicevmc,id=charchannel1,name=vdagent \\ +-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":2,"chardev":"charchannel1","id":"channel1","name":"com.redhat.spice.0"}' \\ +-device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \\ +-device '{"driver":"usb-kbd","id":"input1","bus":"usb.0","port":"2"}' \\ +-audiodev '{"id":"audio1","driver":"spice"}' \\ +-vnc 127.0.0.1:0,audiodev=audio1 \\ +-spice port=5901,addr=127.0.0.1,disable-ticketing=on,image-compression=off,seamless-migration=on \\ +-device '{"driver":"virtio-gpu-pci","id":"video0","max_outputs":1,"bus":"pci.7","addr":"0x0"}' \\ +-device '{"driver":"ich9-intel-hda","id":"sound0","bus":"pci.16","addr":"0x1"}' \\ +-device '{"driver":"hda-duplex","id":"sound0-codec0","bus":"sound0.0","cad":0,"audiodev":"audio1"}' \\ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","addr":"0x0"}' \\ +-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \\ +-device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.6","addr":"0x0"}' \\ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \\ +-msg timestamp=on +``` +- I tried to reproduce the bug with a simple command but failed, not sure what is the real cause. Following commands works fine. +``` +qemu-system-loongarch64 -m 2G \\ + -cpu la464 \\ + -machine virt \\ + -smp 2 \\ + -bios /usr/share/qemu/edk2-loongarch64-code.fd \\ + -vnc 127.0.0.1:0 \\ + -device virtio-gpu-pci +```""" diff --git a/gitlab/issues/target_loongarch/host_missing/accel_missing/1261.toml b/gitlab/issues/target_loongarch/host_missing/accel_missing/1261.toml new file mode 100644 index 000000000..8ad96bfef --- /dev/null +++ b/gitlab/issues/target_loongarch/host_missing/accel_missing/1261.toml @@ -0,0 +1,33 @@ +id = 1261 +title = "qemu-user syscall 439 (faccessat2) not implemented - loongarch64" +state = "closed" +created_at = "2022-10-17T23:53:32.857Z" +closed_at = "2022-10-27T16:54:40.033Z" +labels = ["linux-user", "target: loongarch"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/1261" +host-os = "Linux" +host-arch = "x86_64" +qemu-version = "7.1.50 (v7.1.0-177-gfd28528ece-dirty)" +guest-os = "Linux" +guest-arch = "LoongArch64" +description = """On LoongArch64 architecture faccessat syscall is missing and only faccessat2 is present, but it is not handled in linux-user/syscall""" +reproduce = """1. Launch a simple bash test script (call it test.sh): if [[ -r test.sh ]] ; then echo OK ; else echo ERROR ; fi +2. The result is "ERROR" even if the file "test.sh" exists and it is readeable +3. The correct result should be "OK"""" +additional = """test.sh: + ``` + if [[ -r test.sh ]] ; then echo OK ; else echo ERROR ; fi + ``` +qemu-loongarch -strace log: + ``` +[...] +12579 statx(255,"",AT_EMPTY_PATH|AT_NO_AUTOMOUNT,STATX_BASIC_STATS,0x0000004000802a50) = 0 +12579 lseek(255,0,SEEK_CUR) = 0 +12579 read(255,0x2016d490,56) = 56 +12579 Unknown syscall 439 +12579 write(1,0x20172010,6) = 6 +12579 read(255,0x2016d490,56) = 0 +12579 rt_sigprocmask(SIG_BLOCK,0x0000004000802b60,0x0000004000802be0) = 0 +12579 rt_sigprocmask(SIG_SETMASK,0x0000004000802be0,NULL) = 0 +12579 exit_group(0) + ```""" diff --git a/gitlab/issues/target_loongarch/host_missing/accel_missing/2491.toml b/gitlab/issues/target_loongarch/host_missing/accel_missing/2491.toml new file mode 100644 index 000000000..58a1a42e3 --- /dev/null +++ b/gitlab/issues/target_loongarch/host_missing/accel_missing/2491.toml @@ -0,0 +1,25 @@ +id = 2491 +title = "Performance Regression in QEMU (amd64 Emulating LoongArch64) from 8.0.4 to 9.0.2" +state = "opened" +created_at = "2024-08-08T04:47:28.229Z" +closed_at = "n/a" +labels = ["Regression", "linux-user", "target: loongarch"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/2491" +host-os = "Arch Linux" +host-arch = "x86" +qemu-version = "9.0.2" +guest-os = "Arch Linux" +guest-arch = "loongarch64" +description = """Previous Performance: In May 2023, we were using QEMU 8.0.4 for qemu-user emulation, and the performance was satisfactory. The setup did not include LSX (Loongson SIMD Extensions) support in either the system or QEMU. Performance results are shown in Figure A. + +Current Performance: Recently, we upgraded to QEMU 9.0.2. Both the system and QEMU now support vectorized instruction sets. However, we observed a performance decline to less than 60% of the previous benchmarks. + +We found that the slowdown is not caused by LSX. Disabling LSX compilation in the new version results in even worse performance. However, there are indeed significant differences between the two systems in terms of LSX support.""" +reproduce = "n/a" +additional = """We use systemd-nspawn and qemu-binfmt for containerized operations. You can get a clean chroot from lcpu release [here](https://github.com/lcpu-club/loongarchlinux-dockerfile/releases/download/20240806/base-devel-loong64-20240806.tar.zst) + +Figure A, performance in May 2023 + + +Figure B, performance nowadays +""" diff --git a/gitlab/issues/target_loongarch/host_missing/accel_missing/2538.toml b/gitlab/issues/target_loongarch/host_missing/accel_missing/2538.toml new file mode 100644 index 000000000..0a533e934 --- /dev/null +++ b/gitlab/issues/target_loongarch/host_missing/accel_missing/2538.toml @@ -0,0 +1,34 @@ +id = 2538 +title = "qemu-system-loongarch64: ../hw/loongarch/virt.c:118: virt_flash_map1: Assertion `QEMU_IS_ALIGNED(real_size, VIRT_FLASH_SECTOR_SIZE)' failed." +state = "closed" +created_at = "2024-08-26T11:12:06.946Z" +closed_at = "2025-03-25T14:06:55.163Z" +labels = ["Regression", "target: loongarch"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/2538" +host-os = "Fedora 40" +host-arch = "x64" +qemu-version = "9.1.0" +guest-os = "None" +guest-arch = "loongarch64" +description = """Cannot enter the loongarch64 UEFI shell due to the error below: +qemu-system-loongarch64: ../hw/loongarch/virt.c:118: virt_flash_map1: Assertion `QEMU_IS_ALIGNED(real_size, VIRT_FLASH_SECTOR_SIZE)' failed.""" +reproduce = """1.follow the steps to create an empty loongarch64 uefi bare metal. +2.Click start the installation +3.Then the error occurs.""" +additional = """``` +qemu-system-loongarch64: ../hw/loongarch/virt.c:118: virt_flash_map1: Assertion `QEMU_IS_ALIGNED(real_size, VIRT_FLASH_SECTOR_SIZE)' failed.' + +Traceback (most recent call last): + File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper + callback(asyncjob, *args, **kwargs) + File "/usr/share/virt-manager/virtManager/createvm.py", line 2008, in _do_async_install + installer.start_install(guest, meter=meter) + File "/usr/share/virt-manager/virtinst/install/installer.py", line 695, in start_install + domain = self._create_guest( + ^^^^^^^^^^^^^^^^^^^ + File "/usr/share/virt-manager/virtinst/install/installer.py", line 637, in _create_guest + domain = self.conn.createXML(initial_xml or final_xml, 0) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/lib64/python3.12/site-packages/libvirt.py", line 4545, in createXML + raise libvirtError('virDomainCreateXML() failed') +```""" diff --git a/gitlab/issues/target_loongarch/host_missing/accel_missing/2738.toml b/gitlab/issues/target_loongarch/host_missing/accel_missing/2738.toml new file mode 100644 index 000000000..8849bccfa --- /dev/null +++ b/gitlab/issues/target_loongarch/host_missing/accel_missing/2738.toml @@ -0,0 +1,18 @@ +id = 2738 +title = "golang 1.23 build hangs when running under qemu-user on x86_64 host" +state = "opened" +created_at = "2024-12-21T10:42:48.765Z" +closed_at = "n/a" +labels = ["linux-user", "target: loongarch"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/2738" +host-os = "Fedora 40" +host-arch = "x86_64" +qemu-version = "9.2.0" +guest-os = "N/A" +guest-arch = "any" +description = """Forwarded from https://github.com/golang/go/issues/70329. + +#""" +reproduce = """1. Setup qemu-user binfmt for a foreign ISA, for example, installs qemu-user-static-aarch64 on Fedora. +2. Build the Dockerfile for specified arch: `podman build --arch aarch64 .`""" +additional = """""" diff --git a/gitlab/issues/target_loongarch/host_missing/accel_missing/2754.toml b/gitlab/issues/target_loongarch/host_missing/accel_missing/2754.toml new file mode 100644 index 000000000..e4f195aef --- /dev/null +++ b/gitlab/issues/target_loongarch/host_missing/accel_missing/2754.toml @@ -0,0 +1,34 @@ +id = 2754 +title = "Virt-manager using QEMU exit in flash and return an I/O Error when attempting to create an loongarch64 QEMU virtual machine" +state = "closed" +created_at = "2024-12-28T09:49:46.912Z" +closed_at = "2025-01-02T09:55:19.548Z" +labels = ["target: loongarch", "workflow::Needs Info"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/2754" +host-os = "Fedora 41" +host-arch = "x86" +qemu-version = "9.2.0" +guest-os = "Generic System(DIY system)" +guest-arch = "loongarch64" +description = """Cannot complete the installation:'Enter the end of the file when reading data:I/O Error' + +Traceback (most recent call last): + File "/usr/share/virt-manager/virtManager/asyncjob.py", line 71, in cb_wrapper + callback(asyncjob, *args, **kwargs) + ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/share/virt-manager/virtManager/createvm.py", line 2008, in _do_async_install + installer.start_install(guest, meter=meter) + ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ + File "/usr/share/virt-manager/virtinst/install/installer.py", line 726, in start_install + domain = self._create_guest( + guest, meter, initial_xml, final_xml, + doboot, transient) + File "/usr/share/virt-manager/virtinst/install/installer.py", line 667, in _create_guest + domain = self.conn.createXML(initial_xml or final_xml, 0) + File "/usr/lib64/python3.13/site-packages/libvirt.py", line 4545, in createXML + raise libvirtError('virDomainCreateXML() failed') +libvirt.libvirtError: 'Enter the end of the file when reading data:I/O Error'""" +reproduce = """1.Click to create loongarch64 virtual machine using virt-manager +2.Configure all arguments of virtual machine +3.Then click start installation,then the error occurs.""" +additional = """""" diff --git a/gitlab/issues/target_loongarch/host_missing/accel_missing/2865.toml b/gitlab/issues/target_loongarch/host_missing/accel_missing/2865.toml new file mode 100644 index 000000000..ed73610fb --- /dev/null +++ b/gitlab/issues/target_loongarch/host_missing/accel_missing/2865.toml @@ -0,0 +1,62 @@ +id = 2865 +title = "loongarch64: wrong implementation of `xvldi` instruction" +state = "closed" +created_at = "2025-03-16T17:39:40.541Z" +closed_at = "2025-03-17T12:59:28.649Z" +labels = ["target: loongarch"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/2865" +host-os = "Debian" +host-arch = "loongarch64 (default one)" +qemu-version = "qemu-loongarch64 version 9.2.2 (Debian 1:9.2.2+ds-1+b2)" +guest-os = "n/a" +guest-arch = "loongarch64 (default one)" +description = """Consider this sample program. + +```c++ +#include <cstdio> +#include <cstdint> +#include <lsxintrin.h> +#include <lasxintrin.h> + +void dump_u32(__m256i x) { + uint32_t tmp[32/4]; + __lasx_xvst(x, tmp, 0); + putchar('['); + for (int i=0; i < 32/4; i++) { + if (i > 0) { + putchar(' '); + } + + printf("%08x", tmp[i]); + } + puts("]"); +} + +int main() { + __m256i const1 = __lasx_xvldi(-3832); + dump_u32(const1); +} +``` + +The magic constants here means: replicate in 32-bit words a byte (0x4) shifted left by 8. We should have a vector of words 0x800, and indeed, the program run on a real hardware prints expected: + +``` +[00000800 00000800 00000800 00000800 00000800 00000800 00000800 00000800] +``` + +The same program run under Qemu prints: + +``` +[08000800 00000000 08000800 00000000 08000800 00000000 08000800 00000000] +```""" +reproduce = "n/a" +additional = """I grabbed the latest sources, it seems there's bug in `target/loongarch/tcg/insn_trans/trans_vec.c.inc`, in function `vldi_get_value`. + +```c + case 1: + /* data: {2{16'0, imm[7:0], 8'0}} */ + data = (t << 24) | (t << 8); + break; +``` + +There should be `(t << (8+32)) | t << 8`.""" |