22.04.2022 17:10, Adrian Davey wrote:
Package: qemu-system-x86
Version: 1:7.0+dfsg-1
Severity: normal

2022-04-21T17:07:40.354354Z qemu-system-x86_64: warning: This feature depends
on other features that were not requested: CPUID.8000000AH:EDX.npt [bit 0]

As I said, this is unrelated.

2022-04-21T17:07:40.419616Z qemu-system-x86_64: error: failed to set MSR
0xc0000104 to 0x100000000
qemu-system-x86_64: ../../target/i386/kvm/kvm.c:2996: kvm_buf_set_msrs:
Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

And this is the actual issue in the.. KERNEL.

The commit in the kernel which introduce it is this one:

commit 880993138396f8f0be620c425d08f84490c35251
Author: Maxim Levitsky <mlevi...@redhat.com>
Date:   Tue Mar 22 19:24:48 2022 +0200

    KVM: x86: SVM: fix tsc scaling when the host doesn't support it

which is part of 5.16.0 kernel.  And the commit which fixed this is

commit e910a53fb4f20aa012e46371ffb4c32c8da259b4
Author: Maxim Levitsky <mlevi...@redhat.com>
Date:   Wed Feb 23 13:56:49 2022 +0200

    KVM: x86: nSVM: disallow userspace setting of MSR_AMD64_TSC_RATIO to non 
default value when tsc scaling disabled

which is a part of 5.16.12 kernel.

I don't know which is 5.16.0-5-amd64, - but it looks like 5.16.18 is
in Debian now. Is it your current kernel? What does `uname -a' say?

It looks like the only thing you need is to upgrade the kernel.

Reverting to qemu-system-x86 6.2+dfsg-3 and the VMs start-up perfectly fine
using the same libvirt xml.

It is because new qemu started using the MSRs it didn't use previously,
and hit this very issue. It is all in the kernel, -- it is the kernel
who reports the list of MSRs it supports, and qemu sets only those MSRs
which the kernel reports are supported. And out of the sudden one of
the reported-as-supported MSRs turned out to be unsupported by the kernel -
that's the meaining of this assert().

Please verify your kernel is at least 5.16.18.

Thanks,

/mjt

Kernel: Linux 5.16.0-5-amd64 (SMP w/2 CPU threads; PREEMPT)

Reply via email to