From: Mohamed Mediouni <mohamed@unpredictable.fr>
Not actionable information for users, so stop
having it displayed unconditionally.
Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Link: https://lore.kernel.org/r/20260327011152.4126-4-mohamed@unpredictable.fr
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 1 +
target/i386/whpx/trace.h | 2 ++
target/i386/whpx/whpx-all.c | 5 +++--
target/i386/whpx/trace-events | 1 +
4 files changed, 7 insertions(+), 2 deletions(-)
create mode 100644 target/i386/whpx/trace.h
create mode 100644 target/i386/whpx/trace-events
diff --git a/meson.build b/meson.build
index 407eef5b4ed..daa58e46a3c 100644
--- a/meson.build
+++ b/meson.build
@@ -3687,6 +3687,7 @@ if have_system or have_user
'target/hppa',
'target/i386',
'target/i386/kvm',
+ 'target/i386/whpx',
'target/loongarch',
'target/mips/tcg',
'target/ppc',
diff --git a/target/i386/whpx/trace.h b/target/i386/whpx/trace.h
new file mode 100644
index 00000000000..b7c090deff3
--- /dev/null
+++ b/target/i386/whpx/trace.h
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+#include "trace/trace-target_i386_whpx.h"
diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c
index acae61e089d..e56ae2b3433 100644
--- a/target/i386/whpx/whpx-all.c
+++ b/target/i386/whpx/whpx-all.c
@@ -41,6 +41,7 @@
#include "emulate/x86_emu.h"
#include "emulate/x86_flags.h"
#include "emulate/x86_mmu.h"
+#include "trace.h"
#include <winhvplatform.h>
@@ -1921,8 +1922,8 @@ int whpx_vcpu_run(CPUState *cpu)
1 : 3;
if (!is_known_msr) {
- warn_report("WHPX: Unsupported MSR access (0x%x), IsWrite=%i",
- vcpu->exit_ctx.MsrAccess.MsrNumber, vcpu->exit_ctx.MsrAccess.AccessInfo.IsWrite);
+ trace_whpx_unsupported_msr_access(vcpu->exit_ctx.MsrAccess.MsrNumber,
+ vcpu->exit_ctx.MsrAccess.AccessInfo.IsWrite);
}
hr = whp_dispatch.WHvSetVirtualProcessorRegisters(
diff --git a/target/i386/whpx/trace-events b/target/i386/whpx/trace-events
new file mode 100644
index 00000000000..ebdfa34b281
--- /dev/null
+++ b/target/i386/whpx/trace-events
@@ -0,0 +1 @@
+whpx_unsupported_msr_access(uint32_t msr, int is_write) "WHPX: Unsupported MSR access (0x%x), IsWrite=%i"
--
2.53.0