Commit fe8c0a8b7d for qemu.org
commit fe8c0a8b7d7847892b151c3b0f363b8a49ef2f5c
Author: Mohamed Mediouni <mohamed@unpredictable.fr>
Date: Tue Mar 24 16:13:14 2026 +0100
whpx: i386: skip TSC read for MMIO exits
The TSC value isn't needed for vmexit processing.
Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Link: https://lore.kernel.org/r/20260324151323.74473-4-mohamed@unpredictable.fr
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c
index 8f1835ee95..ac03445d9d 100644
--- a/target/i386/whpx/whpx-all.c
+++ b/target/i386/whpx/whpx-all.c
@@ -606,7 +606,7 @@ void whpx_get_registers(CPUState *cpu, WHPXStateLevel level)
assert(cpu_is_stopped(cpu) || qemu_cpu_is_self(cpu));
- if (!env->tsc_valid) {
+ if (level > WHPX_LEVEL_FAST_RUNTIME_STATE && !env->tsc_valid) {
whpx_get_tsc(cpu);
env->tsc_valid = !runstate_is_running();
}