From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Haozhong Zhang <haozhong.zhang@intel.com>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Eduardo Habkost <ehabkost@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
kvm@vger.kernel.org, Boris Petkov <bp@suse.de>,
Tony Luck <tony.luck@intel.com>,
Andi Kleen <andi.kleen@intel.com>,
Ashok Raj <ashok.raj@intel.com>
Subject: Re: [Qemu-devel] [PATCH v3 1/2] target-i386: KVM: add basic Intel LMCE support
Date: Fri, 3 Jun 2016 17:57:53 +0200 [thread overview]
Message-ID: <20160603155753.GA15222@potion> (raw)
In-Reply-To: <20160603060944.17373-2-haozhong.zhang@intel.com>
2016-06-03 14:09+0800, Haozhong Zhang:
> This patch adds the support to inject SRAR and SRAO as LMCE, i.e. they
> will be injected to only one VCPU rather than broadcast to all
> VCPUs. As KVM reports LMCE support on Intel platforms, this features is
> only available on Intel platforms.
>
> Signed-off-by: Ashok Raj <ashok.raj@intel.com>
> Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
> ---
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> @@ -2786,6 +2798,20 @@ static void mce_init(X86CPU *cpu)
> && (cenv->features[FEAT_1_EDX] & (CPUID_MCE | CPUID_MCA)) ==
> (CPUID_MCE | CPUID_MCA)) {
> cenv->mcg_cap = MCE_CAP_DEF | MCE_BANKS_DEF;
> +
> + if (cpu->enable_lmce) {
> + if (lmce_supported()) {
> + cenv->mcg_cap |= MCG_LMCE_P;
> + cenv->msr_ia32_feature_control |=
> + MSR_IA32_FEATURE_CONTROL_LMCE |
> + MSR_IA32_FEATURE_CONTROL_LOCKED;
Locking right from the start breaks nested KVM, because nested relies on
setting VMXON feature from inside of the guest.
Do we keep it unlocked, or move everything into QEMU?
(The latter seems simpler.)
> + } else {
> + error_report("Warning: KVM unavailable or not support LMCE, "
> + "LMCE disabled");
> + cpu->enable_lmce = false;
> + }
> + }
> +
> cenv->mcg_ctl = ~(uint64_t)0;
> for (bank = 0; bank < MCE_BANKS_DEF; bank++) {
> cenv->mce_banks[bank * 4] = ~(uint64_t)0;
next prev parent reply other threads:[~2016-06-03 15:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 6:09 [Qemu-devel] [PATCH v3 0/2] Add QEMU support for Intel local MCE Haozhong Zhang
2016-06-03 6:09 ` [Qemu-devel] [PATCH v3 1/2] target-i386: KVM: add basic Intel LMCE support Haozhong Zhang
2016-06-03 15:57 ` Radim Krčmář [this message]
2016-06-05 15:32 ` Haozhong Zhang
2016-06-08 11:32 ` Paolo Bonzini
2016-06-13 7:55 ` Haozhong Zhang
2016-06-13 8:33 ` Paolo Bonzini
2016-06-13 10:01 ` Haozhong Zhang
2016-06-13 10:07 ` Paolo Bonzini
2016-06-13 10:09 ` Haozhong Zhang
2016-06-04 10:15 ` Boris Petkov
2016-06-05 15:35 ` Haozhong Zhang
2016-06-04 10:34 ` Boris Petkov
2016-06-04 21:03 ` Eduardo Habkost
2016-06-07 9:41 ` Haozhong Zhang
2016-06-07 11:47 ` Haozhong Zhang
2016-06-05 15:41 ` Haozhong Zhang
2016-06-08 11:34 ` Paolo Bonzini
2016-06-09 6:52 ` Haozhong Zhang
2016-06-07 20:10 ` Eduardo Habkost
2016-06-08 1:43 ` Haozhong Zhang
2016-06-03 6:09 ` [Qemu-devel] [PATCH v3 2/2] target-i386: add migration support for Intel LMCE Haozhong Zhang
2016-06-07 20:18 ` Eduardo Habkost
2016-06-08 1:56 ` Haozhong Zhang
2016-06-08 11:36 ` Paolo Bonzini
2016-06-09 7:16 ` Haozhong Zhang
2016-06-09 8:23 ` Paolo Bonzini
2016-06-03 6:38 ` [Qemu-devel] [PATCH v3 0/2] Add QEMU support for Intel local MCE Haozhong Zhang
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=20160603155753.GA15222@potion \
--to=rkrcmar@redhat.com \
--cc=andi.kleen@intel.com \
--cc=ashok.raj@intel.com \
--cc=bp@suse.de \
--cc=ehabkost@redhat.com \
--cc=haozhong.zhang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=tony.luck@intel.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;
as well as URLs for NNTP newsgroup(s).