From: Jue Wang <juew@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Sean Christopherson <seanjc@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>
Cc: Tony Luck <tony.luck@intel.com>,
kvm@vger.kernel.org, Greg Thelen <gthelen@google.com>,
Jiaqi Yan <jiaqiyan@google.com>, Jue Wang <juew@google.com>
Subject: [PATCH v3 0/7] KVM: x86: Add CMCI and UCNA emulation
Date: Fri, 13 May 2022 11:20:31 -0700 [thread overview]
Message-ID: <20220513182038.2564643-1-juew@google.com> (raw)
This patch series implement emulation for Corrected Machine Check
Interrupt (CMCI) signaling and UnCorrectable No Action required (UCNA)
error injection.
UCNA errors signaled via CMCI allow a guest to be notified as soon as
uncorrectable memory errors get detected by some background threads,
e.g., threads that migrate guest memory across hosts or threads that
constantly scan system memory for errors [1].
Upon receiving UCNAs, guest kernel isolates the poisoned pages which may
still be free, preventing future accesses that may cause fatal MCEs.
1. https://lore.kernel.org/linux-mm/8eceffc0-01e8-2a55-6eb9-b26faa9e3caf@intel.com/t/
Patch 1-3 clean up KVM APIC LVT logic.
Patch 4 adds CMCI emulation to lapic.
Patch 5 updates the allocation of mce_array to use array allocation api:
kcalloc.
Patch 6 adds emulation for the per-bank MSR_IA32_MCx_CTL2 MSRs that
controls CMCI signaling.
Patch 7 enables MCG_CMCI_P on x86 and handles injected UCNA errors.
v3 changes
- Incorporate feedback from Sean Christopherson <seanjc@google.com>
- Split clean up to KVM APIC LVT logic to 3 patches.
- Put the clean up of mce_array allocation in a separate patch.
- Base the MCi_CTL2 register emulation on Sean's clean up and fix
series [2]
- Fix bugs around MCi_CTL2 register offset validation and the free of
mci_ctl2_banks array.
- Rewrite the change log with more details in architectural information
about CMCI, UCNA and MCG_CMCI_P.
- Fix various comments and wrapping style.
2. https://lore.kernel.org/lkml/20220512222716.4112548-1-seanjc@google.com/T/
v2 chanegs
- Incorporate feedback from Sean Christopherson <seanjc@google.com>
- Split the single patch into 4:
1). clean up KVM APIC LVT logic
2). add CMCI emulation to lapic
3). add emulation of MSR_IA32_MCx_CTL2
4). enable MCG_CMCI_P and handle injected UCNAs
- Fix various style issues.
Jue Wang (7):
KVM: x86: Make APIC_VERSION capture only the magic 0x14UL.
KVM: x86: Fill apic_lvt_mask with enums / explicit entries.
KVM: x86: Add APIC_LVTx() macro.
KVM: x86: Add Corrected Machine Check Interrupt (CMCI) emulation to
lapic.
KVM: x86: Use kcalloc to allocate the mce_banks array.
KVM: x86: Add emulation for MSR_IA32_MCx_CTL2 MSRs.
KVM: x86: Enable MCG_CMCI_P and handle injected UCNAs.
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/lapic.c | 58 +++++++---
arch/x86/kvm/lapic.h | 15 ++-
arch/x86/kvm/vmx/vmx.c | 1 +
arch/x86/kvm/x86.c | 182 +++++++++++++++++++++++++-------
5 files changed, 200 insertions(+), 57 deletions(-)
--
2.36.0.550.gb090851708-goog
next reply other threads:[~2022-05-13 18:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 18:20 Jue Wang [this message]
2022-05-13 18:20 ` [PATCH v3 1/7] KVM: x86: Make APIC_VERSION capture only the magic 0x14UL Jue Wang
2022-05-13 18:49 ` David Matlack
2022-05-13 18:20 ` [PATCH v3 2/7] KVM: x86: Fill apic_lvt_mask with enums / explicit entries Jue Wang
2022-05-13 18:20 ` [PATCH v3 3/7] KVM: x86: Add APIC_LVTx() macro Jue Wang
2022-05-13 18:20 ` [PATCH v3 4/7] KVM: x86: Add Corrected Machine Check Interrupt (CMCI) emulation to lapic Jue Wang
2022-05-13 18:20 ` [PATCH v3 5/7] KVM: x86: Use kcalloc to allocate the mce_banks array Jue Wang
2022-05-13 18:20 ` [PATCH v3 6/7] KVM: x86: Add emulation for MSR_IA32_MCx_CTL2 MSRs Jue Wang
2022-05-13 18:20 ` [PATCH v3 7/7] KVM: x86: Enable MCG_CMCI_P and handle injected UCNAs Jue Wang
2022-05-13 18:37 ` [PATCH v3 0/7] KVM: x86: Add CMCI and UCNA emulation David Matlack
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220513182038.2564643-1-juew@google.com \
--to=juew@google.com \
--cc=gthelen@google.com \
--cc=jiaqiyan@google.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tony.luck@intel.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox