Skip to content

Commit cf8c482

Browse files
committed
KVM: SVM: Ignore writes to Remote Read Data on AVIC write traps
jira LE-1907 Rebuild_History Non-Buildable kernel-5.14.0-284.30.1.el9_2 commit-author Sean Christopherson <seanjc@google.com> commit a790e33 Drop writes to APIC_RRR, a.k.a. Remote Read Data Register, on AVIC unaccelerated write traps. The register is read-only and isn't emulated by KVM. Sending the register through kvm_apic_write_nodecode() will result in screaming when x2APIC is enabled due to the unexpected failure to retrieve the MSR (KVM expects that only "legal" accesses will trap). Fixes: 4d1d794 ("KVM: SVM: Introduce logic to (de)activate x2AVIC mode") Signed-off-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20230106011306.85230-30-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit a790e33) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 516ada3 commit cf8c482

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/x86/kvm/svm/avic.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,9 @@ static int avic_unaccel_trap_write(struct kvm_vcpu *vcpu)
628628
case APIC_DFR:
629629
avic_handle_dfr_update(vcpu);
630630
break;
631+
case APIC_RRR:
632+
/* Ignore writes to Read Remote Data, it's read-only. */
633+
return 1;
631634
default:
632635
break;
633636
}

0 commit comments

Comments
 (0)