[UBUNTU 20.04] KVM: s390: pv: don't allow userspace to set the clock under PV - qemu part
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
High
|
Skipper Bug Screeners | ||
qemu (Ubuntu) |
Fix Released
|
Low
|
Ubuntu Server | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Kinetic |
Fix Released
|
Undecided
|
Unassigned | ||
Lunar |
Fix Released
|
Low
|
Ubuntu Server |
Bug Description
[ Impact ]
* suspend and resume (and other situations that cause vm
state change) lead to situations where the hipervisor
wants to change the clock.
Now the s390x clock can be considered staged with
offsets potentially added at each level of virtualization.
In the secure execution mode on s390x the hipervisor
is not allowed to touch this, leading to wrong timing.
* The fix skips changing the tod (time of day -> clock)
on a kvm_s390_
[ Test Plan ]
* 1. Start SE guest using libvirt.
2. Pause the guest using "virsh suspend", wait for a few
seconds, resume using "virsh resume".
3. Run "time sleep 1" in the guest.
4. The sleep will sleep much longer than one second.
[ Where problems could occur ]
* This is gladly very isolated to s390x clock handling, so
that (and only that) would be the place to look out for
problems or regressions.
[ Other info ]
* s390x secure execution needs HW feature my machine lacks,
this will need IBM to verify the case once accepted to proposed.
--- original report ---
Description: KVM: s390: pv: don't allow userspace to set the clock under PV
Symptom: Timer issues and RCU stalls after suspending and resuming an IBM
Problem: KVM and QEMU try to set the guest's TOD clock after resume
Solution: Don't set the clock after resume under PV. Note that kernel and
QEMU patches are required in lockstep, to avoid a warning message
in QEMU.
Reproduction: 1. Start SE guest using libvirt.
2. Pause the guest using "virsh suspend", wait for a few
3. Run "time sleep 1" in the guest.
4. The sleep will sleep much longer than one second.
Component: qemu
Upstream-ID: 38621181ae3cbec
Preventive: yes
Author: Nico Boehr <email address hidden>
Please note that fixing the described problem requires patches for the kernel as well as for QEMU.
This bug covers the qemu part, whereas the required kernel part is described and handled in the following related bug:
Bug 200889 - [UBUNTU 20.04] KVM: s390: pv: don't allow userspace to set the clock under PV - kernel part
Both parts, the kernel and the qemu patches should be applied / released at the same time to avoid problems resulting in the following warning message for customers:
'warning: Unable to set KVM guest TOD clock: Operation not supported'
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)
- git-ubuntu bot: Approve
- Miriam España Acebal (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 87 lines (+65/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/series (+1/-0)
debian/patches/ubuntu/lp-1999885-s390x-tod-kvm-don-t-save-restore-the-TOD-in-PV-guest.patch (+57/-0)
- git-ubuntu bot: Approve
- Andreas Hasenack (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 6922 lines (+6313/-13)16 files modifieddebian/changelog (+4885/-3)
debian/control (+55/-8)
debian/control-in (+5/-2)
debian/patches/series (+6/-0)
debian/patches/ubuntu/define-ubuntu-machine-types.patch (+911/-0)
debian/patches/ubuntu/enable-svm-by-default.patch (+34/-0)
debian/patches/ubuntu/pre-bionic-256k-ipxe-efi-roms.patch (+62/-0)
debian/patches/ubuntu/qboot-Disable-LTO-for-ELF-binary-build-step.patch (+44/-0)
debian/qemu-block-extra.postinst (+59/-0)
debian/qemu-kvm-init (+89/-0)
debian/qemu-system-common.install (+1/-0)
debian/qemu-system-common.qemu-kvm.default (+8/-0)
debian/qemu-system-common.qemu-kvm.service (+16/-0)
debian/qemu-system-x86.NEWS (+80/-0)
debian/qemu-system-x86.README.Debian (+47/-0)
debian/rules (+11/-0)
CVE References
tags: | added: architecture-s39064 bugnameltc-200901 severity-high targetmilestone-inin--- |
Changed in ubuntu: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
affects: | ubuntu → linux (Ubuntu) |
affects: | linux (Ubuntu) → qemu (Ubuntu) |
Changed in qemu (Ubuntu): | |
importance: | Undecided → High |
Changed in ubuntu-z-systems: | |
importance: | Undecided → High |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
Changed in qemu (Ubuntu Lunar): | |
importance: | High → Low |
Changed in ubuntu-z-systems: | |
status: | New → Triaged |
Changed in qemu (Ubuntu Lunar): | |
assignee: | Skipper Bug Screeners (skipper-screen-team) → Ubuntu Server (ubuntu-server) |
Changed in qemu (Ubuntu Lunar): | |
status: | New → In Progress |
Changed in ubuntu-z-systems: | |
status: | Triaged → In Progress |
description: | updated |
Changed in qemu (Ubuntu Jammy): | |
status: | New → In Progress |
Changed in qemu (Ubuntu Focal): | |
status: | New → In Progress |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
tags: |
added: targetmilestone-inin2004 removed: targetmilestone-inin--- |
tags: |
added: verification-done removed: verification-needed |
Changed in ubuntu-z-systems: | |
status: | Fix Committed → Fix Released |
Meanwhile 7.2 landed in lunar-proposed:
qemu | 1:7.2+dfsg-3ubuntu1 | lunar-proposed
hence updating ticket status to Fix Committed.