From: Mohamed Mediouni <mohamed@unpredictable.fr>
The XCR0 value isn't currently needed for vmexit processing.
Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Link: https://lore.kernel.org/r/20260324151323.74473-5-mohamed@unpredictable.fr
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/whpx/whpx-all.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c
index ac03445d9da..c0c7ba91772 100644
--- a/target/i386/whpx/whpx-all.c
+++ b/target/i386/whpx/whpx-all.c
@@ -689,7 +689,9 @@ void whpx_get_registers(CPUState *cpu, WHPXStateLevel level)
* Extended control registers needs to be handled separately depending
* on whether xsave is supported/enabled or not.
*/
- whpx_get_xcrs(cpu);
+ if (level > WHPX_LEVEL_FAST_RUNTIME_STATE) {
+ whpx_get_xcrs(cpu);
+ }
/* 16 XMM registers */
assert(whpx_register_names[idx] == WHvX64RegisterXmm0);
--
2.53.0