From: Xiaoyao Li <xiaoyao.li@intel.com>
To: Jue Wang <juew@google.com>, 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>,
David Matlack <dmatlack@google.com>
Cc: Tony Luck <tony.luck@intel.com>,
kvm@vger.kernel.org, Greg Thelen <gthelen@google.com>,
Jiaqi Yan <jiaqiyan@google.com>
Subject: Re: [PATCH v5 4/8] KVM: x86: Add Corrected Machine Check Interrupt (CMCI) emulation to lapic.
Date: Fri, 1 Jul 2022 10:07:19 +0800 [thread overview]
Message-ID: <958774eb-90df-34e9-e025-959c3eb60614@intel.com> (raw)
In-Reply-To: <20220610171134.772566-5-juew@google.com>
On 6/11/2022 1:11 AM, Jue Wang wrote:
...
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 4790f0d7d40b..a08693808729 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -4772,6 +4772,8 @@ static int kvm_vcpu_ioctl_x86_setup_mce(struct kvm_vcpu *vcpu,
> /* Init IA32_MCi_CTL to all 1s */
> for (bank = 0; bank < bank_num; bank++)
> vcpu->arch.mce_banks[bank*4] = ~(u64)0;
> + vcpu->arch.apic->nr_lvt_entries =
> + KVM_APIC_MAX_NR_LVT_ENTRIES - !(mcg_cap & MCG_CMCI_P);
vcpu->arch.apic->nr_lvt_entries needs to be initialized as
KVM_APIC_MAX_NR_LVT_ENTREIS - 1 when creating lapic.
What if userspace doesn't call KVM_X86_SETUP_MCE at all?
>
> static_call(kvm_x86_setup_mce)(vcpu);
> out:
next prev parent reply other threads:[~2022-07-01 2:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-10 17:11 [PATCH v5 0/8] KVM: x86: Add CMCI and UCNA emulation Jue Wang
2022-06-10 17:11 ` [PATCH v5 1/8] KVM: x86: Make APIC_VERSION capture only the magic 0x14UL Jue Wang
2022-06-10 17:11 ` [PATCH v5 2/8] KVM: x86: Fill apic_lvt_mask with enums / explicit entries Jue Wang
2022-06-10 17:11 ` [PATCH v5 3/8] KVM: x86: Add APIC_LVTx() macro Jue Wang
2022-06-10 17:11 ` [PATCH v5 4/8] KVM: x86: Add Corrected Machine Check Interrupt (CMCI) emulation to lapic Jue Wang
2022-07-01 2:07 ` Xiaoyao Li [this message]
2022-07-01 4:40 ` Jue Wang
2022-07-01 16:53 ` Jue Wang
2022-06-10 17:11 ` [PATCH v5 5/8] KVM: x86: Use kcalloc to allocate the mce_banks array Jue Wang
2022-06-10 17:11 ` [PATCH v5 6/8] KVM: x86: Add emulation for MSR_IA32_MCx_CTL2 MSRs Jue Wang
2022-06-10 17:11 ` [PATCH v5 7/8] KVM: x86: Enable CMCI capability by default and handle injected UCNA errors Jue Wang
2022-06-10 17:11 ` [PATCH v5 8/8] KVM: selftests: Add a self test for CMCI and UCNA emulations Jue Wang
2022-06-23 17:25 ` [PATCH v5 0/8] KVM: x86: Add CMCI and UCNA emulation Paolo Bonzini
2022-06-30 13:48 ` Xiaoyao Li
2022-06-30 14:05 ` Jue Wang
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=958774eb-90df-34e9-e025-959c3eb60614@intel.com \
--to=xiaoyao.li@intel.com \
--cc=dmatlack@google.com \
--cc=gthelen@google.com \
--cc=jiaqiyan@google.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=juew@google.com \
--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