qemu-e2k/target/i386/whpx
Ivan Shcherbakov 5ad93fd351 whpx: Fixed incorrect CR8/TPR synchronization
This fixes the following error triggered when stopping and resuming a 64-bit
Linux kernel via gdb:

qemu-system-x86_64.exe: WHPX: Failed to set virtual processor context, hr=c0350005

The previous logic for synchronizing the values did not take into account
that the lower 4 bits of the CR8 register, containing the priority level,
mapped to bits 7:4 of the APIC.TPR register (see section 10.8.6.1 of
Volume 3 of Intel 64 and IA-32 Architectures Software Developer's Manual).
The caused WHvSetVirtualProcessorRegisters() to fail with an error,
effectively preventing GDB from changing the guest context.

Signed-off-by: Ivan Shcherbakov <ivan@sysprogs.com>
Message-Id: <010b01d82874$bb4ef160$31ecd420$@sysprogs.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-15 11:26:20 +01:00
..
meson.build accel: replace struct CpusAccel with AccelOpsClass 2021-02-05 10:24:15 -10:00
whpx-accel-ops.c accel: Introduce AccelOpsClass::cpu_thread_is_idle() 2022-03-06 13:15:42 +01:00
whpx-accel-ops.h accel: replace struct CpusAccel with AccelOpsClass 2021-02-05 10:24:15 -10:00
whpx-all.c whpx: Fixed incorrect CR8/TPR synchronization 2022-03-15 11:26:20 +01:00
whpx-apic.c whpx: move whpx_lapic_state from header to c file 2021-01-12 12:38:03 +01:00
whpx-internal.h whpx: move whpx_lapic_state from header to c file 2021-01-12 12:38:03 +01:00