028ade14da
The processor tracing features in cpu_x86_cpuid() are hardcoded to a set
that should be safe on all processor that support PT virtualization.
But as an additional check, x86_cpu_filter_features() also checks
that the accelerator supports that safe subset, and if not it marks
CPUID_7_0_EBX_INTEL_PT as unavailable.
This check fails on accelerators other than KVM, but it is actually
unnecessary to do it because KVM is the only accelerator that uses the
safe subset. Everything else just provides nonzero values for CPUID
leaf 0x14 (TCG/HVF because processor tracing is not supported; qtest
because nothing is able to read CPUID anyway). Restricting the check
to KVM fixes a warning with the qtest accelerator:
$ qemu-system-x86_64 -display none -cpu max,mmx=off -accel qtest
qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.intel-pt [bit 25]
The warning also happens in the test-x86-cpuid-compat qtest.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2096
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20240221162910.101327-1-pbonzini@redhat.com>
Fixes:
|
||
---|---|---|
.. | ||
hvf | ||
kvm | ||
nvmm | ||
tcg | ||
whpx | ||
arch_dump.c | ||
arch_memory_mapping.c | ||
cpu-dump.c | ||
cpu-internal.h | ||
cpu-param.h | ||
cpu-qom.h | ||
cpu-sysemu.c | ||
cpu.c | ||
cpu.h | ||
gdbstub.c | ||
helper.c | ||
helper.h | ||
host-cpu.c | ||
host-cpu.h | ||
Kconfig | ||
machine.c | ||
meson.build | ||
monitor.c | ||
ops_sse.h | ||
sev-sysemu-stub.c | ||
sev.c | ||
sev.h | ||
svm.h | ||
trace-events | ||
trace.h | ||
xsave_helper.c |