QEMU linux-user emulation is broken for MIPS and POWER in Ubuntu 22.04
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qemu (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Confirmed
|
Undecided
|
Unassigned | ||
Kinetic |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
[ Impact ]
* If not used for virtualization qemu is helping by emulating
other architectures. Here two reproducible issues got
identified that break such emulation of ppc and mips which
gladly have been fixed upstream and we could identify the
changes for. Especially given that 22.04 still has 9 more
years in the field it seems worth to stabilize/fix this.
* The patches are rather small and isolated to the
particular target emulation, they are cleanly applying
and seem to work fine through tests.
[ Test Plan ]
a. the PPC emulation case
1. Unpack archive [1] and change to test_p64 directory
2. Build the source file with: powerpc64le-
3. Run with QEMU: qemu-ppc64le -cpu POWER9 test_p64 > output.txt
4. Check the output text file output.txt to see the printouts
With the bug present min/max will identify the wrong number
[1]: https:/
b. the MIPS emulation case
1. Download the source code from https:/
2. Change to project's test directory and build the binary for MIPS using cross-compiler (see simd_make_m64.mk)
3. Run the binary with QEMU linux-user mode: qemu-mips64el -cpu I6400 simd_test.m64f32Lr6 -c 1 | tee qemu64
4. Check the output text file qemu64 (with pluma or any other text editor) to see the error printouts
[ Where problems could occur ]
* The changes applied are tied to emulation and that of ppc and
mips in particular. Therefore these two areas are where we
need to watch out for unwanted effects. The many other uses
of qemu should (tm) have on direct chance to be regressed by
this.
[ Other Info ]
* This could be two SRU bugs, but after all the context
is here it would feel weird to split it. But I have
added two test descriptions to cover each case
individually.
---
There are issues with QEMU linux-user mode emulation
on MIPS arch:
https:/
and on POWER:
https:/
The bugs were filed against QEMU version 6.2.0,
however QEMU developers are not normally making point maintenance releases for older versions.
Both bugs for MIPS and POWER architectures were fixed in 7.1.0 and 7.0.0 respectively.
Requesting QEMU 6.2.1 with bug-fixes for Ubuntu 22.04 LTS update cycle.
Related branches
- git-ubuntu bot: Approve
- Miriam España Acebal (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 204 lines (+170/-0)5 files modifieddebian/changelog (+8/-0)
debian/patches/series (+3/-0)
debian/patches/ubuntu/lp-1999885-s390x-tod-kvm-don-t-save-restore-the-TOD-in-PV-guest.patch (+62/-0)
debian/patches/ubuntu/lp-2011832-target-mips-Fix-FTRUNC_S-and-FTRUNC_U-trans-helper.patch (+43/-0)
debian/patches/ubuntu/lp-2011832-target-mips-Fix-df_extract_val-and-df_extract_df-dfe.patch (+54/-0)
- git-ubuntu bot: Approve
- Miriam España Acebal (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 305 lines (+265/-0)6 files modifieddebian/changelog (+8/-0)
debian/patches/series (+4/-0)
debian/patches/ubuntu/lp-1999885-s390x-tod-kvm-don-t-save-restore-the-TOD-in-PV-guest.patch (+62/-0)
debian/patches/ubuntu/lp-2011832-target-mips-Fix-FTRUNC_S-and-FTRUNC_U-trans-helper.patch (+43/-0)
debian/patches/ubuntu/lp-2011832-target-mips-Fix-df_extract_val-and-df_extract_df-dfe.patch (+54/-0)
debian/patches/ubuntu/lp-2011832-target-ppc-Fix-xs-max-min-cj-dp-to-use-VSX-registers.patch (+94/-0)
Changed in qemu (Ubuntu Kinetic): | |
status: | New → Confirmed |
Thank you for the bug report. Based on your tests provided in the upstream bugs I can confirm both are issues in 22.04. Do you happen to know what bug reports upstream are related to these issues being fixed in 7.1.0 and 7.0.0? Also it may be worth submitting a second bug report here for either MIPS or POWER since they are somewhat different issues.