qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Haozhong Zhang <haozhong.zhang@intel.com>
To: qemu-devel@nongnu.org
Cc: 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>,
	Haozhong Zhang <haozhong.zhang@intel.com>
Subject: [Qemu-devel] [PATCH v3 0/2] Add QEMU support for Intel local MCE
Date: Fri,  3 Jun 2016 14:09:42 +0800	[thread overview]
Message-ID: <20160603060944.17373-1-haozhong.zhang@intel.com> (raw)

This is v3 of LMCE patch series. Previous ones can be found at
 v2: https://lists.nongnu.org/archive/html/qemu-devel/2015-12/msg01731.html
 v1: https://lists.nongnu.org/archive/html/qemu-devel/2015-12/msg01651.html
 v0: https://lists.nongnu.org/archive/html/qemu-devel/2015-12/msg01498.html

Changes in v3:
 * LMCE can be enabled only for non-intel guests.
 * LMCE is disabled by default and a cpu option 'lmce=on/off' is added
   to explicitly enable/disable LMCE.
 * LMCE is disabled if KVM does not support (even though 'lmce=on').
 * VM on LMCE-enabled QEMU can be only migrated to LMCE-enabled QEMU.
 * MCG_LMCE_P is not included in MCE_CAP_DEF and instead added to
   env->mcg_cap if LMCE is enabled.
 * Code style fix.

This QEMU patch series along with the corresponding KVM patch (sent
via another email with title "[PATCH v1] Add KVM support for Intel
local MCE") enables Intel local MCE feature for guest.

Intel Local MCE (LMCE) is a feature on Intel Skylake Server CPU that
can deliver MCE to a single processor thread instead of broadcasting
to all threads, which can reduce software's load when processing MCE
on machines with a large number of processor threads.

The technical details of LMCE can be found in Intel SDM Vol 3, Chapter
"Machine-Check Architecture" (search for 'LMCE'). Basically,
 * The capability of LMCE is indicated by bit 27 (MCG_LMCE_P) of
   MSR_IA32_MCG_CAP.
 * LMCE is enabled by setting bit 20 (MSR_IA32_FEATURE_CONTROL_LMCE)
   of MSR_IA32_FEATURE_CONTROL and bit 0 (MCG_EXT_CTL_LMCE_EN) of
   MSR_IA32_MCG_EXT_CTL.
 * Software can determine if a MCE is local to the current processor
   thread by checking bit 2 (MCG_STATUS_LMCE) of MSR_IA32_MCG_STATUS.

Haozhong Zhang (2):
  target-i386: KVM: add basic Intel LMCE support
  target-i386: add migration support for Intel LMCE

 include/hw/i386/pc.h  |  7 ++++++-
 target-i386/cpu.c     | 27 +++++++++++++++++++++++++++
 target-i386/cpu.h     | 18 +++++++++++++++++-
 target-i386/kvm.c     | 35 +++++++++++++++++++++++++++++++----
 target-i386/machine.c | 24 ++++++++++++++++++++++++
 5 files changed, 105 insertions(+), 6 deletions(-)

-- 
2.8.3

             reply	other threads:[~2016-06-03  6:10 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03  6:09 Haozhong Zhang [this message]
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ář
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=20160603060944.17373-1-haozhong.zhang@intel.com \
    --to=haozhong.zhang@intel.com \
    --cc=andi.kleen@intel.com \
    --cc=ashok.raj@intel.com \
    --cc=bp@suse.de \
    --cc=ehabkost@redhat.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).