[Bug 1988527] Re: autopkgtest_qemu doesn't use accel=kvm on ppc64le, being fully unusable on that arch
Christian Ehrhardt
1988527 at bugs.launchpad.net
Mon Sep 5 06:58:21 UTC 2022
There is sadly no shortage of options to set the accelerator and they
keep changing which might cause subtle unexpected changes on upgrades.
If you had this working before it might have been by some now deprecated and incompatible options. For example some args used to set accelerators have changed in recent years:
-machine accel= + -accel at the same time are now incompatible
-accel tcg -accel kvm => used to only do kvm, now will do tcg:kvm
That is in since qemu v5.0.0 which translates to 20.10 and later.
There is also "-enable-kvm" which overrules any of the former.
As I said, there are too many options controlling the same
"kvm" used to be a wrapper script which added -enable-kvm, but now is just a symlink - due to qemu internally setting to kvm:tcg now it should have the same behavior, with one twist.
In the past in an env that can only do TCG but not KVM it would have:
$ kvm ...
- old - used -enable-kvm: abort, can't initialize KVM
- new - sets kvm:tcg: try KVM, fall back to TCG
That was considered an improvement as it works in more cases, but it might have led in your case to a silent downgrade to tcg?
In any case, specifying explicitly what you want should be best.
I see autopkgtest uses qemu-system-*, so I'd expect that explicitly setting accel to kvm:tcg should be helpful.
But I'd recommend to not add it as further "-machine" but extend the existing one (if any).
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to autopkgtest in Ubuntu.
https://bugs.launchpad.net/bugs/1988527
Title:
autopkgtest_qemu doesn't use accel=kvm on ppc64le, being fully
unusable on that arch
Status in autopkgtest package in Ubuntu:
New
Bug description:
On Power9 the qemu based autopkgtest commands create VMs that are
extremely slow and fail with obscure errors (partially discussed in
LP: #1973628, comment 8). This can be reproduced for example by
running:
autopkgtest-buildvm-ubuntu-cloud -v -r jammy --ram-size 1024
but autopkgtest-virt-qemu is also affected. The extreme slowness of
the VMs made me think that something was off with the virtualization
settings. I modified autopkgtest_qemu.py so that qemu-system-ppc64le
is called with '-machine accel=kvm' (which I think is the same as
'-machine pseries,accel=kvm' with pseries being the default machine
type).
With this change everything is very fast and reliable. These warnings
also went away:
qemu-system-ppc64le: warning: TCG doesn't support requested feature, cap-cfpc=workaround
qemu-system-ppc64le: warning: TCG doesn't support requested feature, cap-sbbc=workaround
qemu-system-ppc64le: warning: TCG doesn't support requested feature, cap-ibs=workaround
qemu-system-ppc64le: warning: TCG doesn't support requested feature, cap-ccf-assist=on
indicating that we were using TCG emulation before.
I imagine that Qemu has good reasons not to default to accel=kvm or
accel=kvm:tcg on ppc64, but think it's reasonable to assume it's
available and enable it in autopkgtest.
We can fix this in autopkgtest upstream, but it would be nice to
verify if this is an issue with Debian too before submitting a salsa
MR.
[1] https://wiki.qemu.org/Documentation/TCG
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autopkgtest/+bug/1988527/+subscriptions
More information about the foundations-bugs
mailing list