OSDN Git Service

KVM: x86: Add Corrected Machine Check Interrupt (CMCI) emulation to lapic.
authorJue Wang <juew@google.com>
Fri, 10 Jun 2022 17:11:30 +0000 (10:11 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 Jun 2022 08:52:02 +0000 (04:52 -0400)
commit4b903561ec499eef233bf690076cd71b1f8604cf
tree2012c0ed9626ed3da2875fb10d5cdb0c44f69cc4
parent987f625e0799c9666ce0a0e18c2d0c001db96fad
KVM: x86: Add Corrected Machine Check Interrupt (CMCI) emulation to lapic.

This patch calculates the number of lvt entries as part of
KVM_X86_MCE_SETUP conditioned on the presence of MCG_CMCI_P bit in
MCG_CAP and stores result in kvm_lapic. It translats from APIC_LVTx
register to index in lapic_lvt_entry enum. It extends the APIC_LVTx
macro as well as other lapic write/reset handling etc to support
Corrected Machine Check Interrupt.

Signed-off-by: Jue Wang <juew@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220610171134.772566-5-juew@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/lapic.c
arch/x86/kvm/lapic.h
arch/x86/kvm/x86.c