diff --git a/meson.build b/meson.build index 407eef5b4e..daa58e46a3 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-events b/target/i386/whpx/trace-events new file mode 100644 index 0000000000..ebdfa34b28 --- /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" diff --git a/target/i386/whpx/trace.h b/target/i386/whpx/trace.h new file mode 100644 index 0000000000..b7c090deff --- /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 acae61e089..e56ae2b343 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 @@ -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(