From: "Maciej S. Szmigiero" <maciej.szmigiero@xxxxxxxxxx> This is an updated v2 patch series of the v1 series located at: https://lore.kernel.org/kvm/cover.1755609446.git.maciej.szmigiero@xxxxxxxxxx/ Changes from v1: Fix this issue by doing unconditional LAPIC -> V_TPR sync at each VMRUN rather than by just patching the KVM_SET_LAPIC ioctl() code path (and similar ones). Maciej S. Szmigiero (2): KVM: SVM: Sync TPR from LAPIC into VMCB::V_TPR even if AVIC is active KVM: selftests: Test TPR / CR8 sync and interrupt masking arch/x86/kvm/svm/svm.c | 3 +- .../testing/selftests/kvm/include/x86/apic.h | 5 + .../selftests/kvm/x86/xapic_state_test.c | 265 +++++++++++++++++- 3 files changed, 268 insertions(+), 5 deletions(-)