qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: kvm@vger.kernel.org, "Marcelo Tosatti" <mtosatti@redhat.com>,
	"Borislav Petkov" <bp@alien8.de>,
	ying.huang@intel.com, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Richard Henderson" <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH 0/3] target-i386: kvm: Use env->mcg_cap when setting up MCE
Date: Wed, 25 Nov 2015 13:49:46 -0200	[thread overview]
Message-ID: <1448466589-9407-1-git-send-email-ehabkost@redhat.com> (raw)

Instead of overwriting env->mcg_cap, make kvm_arch_init_vcpu(),
use the value already set at the CPU object when initializing
MCE.

Except for the new "unsupported MCG_CAPS bits" warning, this
patch doesn't change any of the existing QEMU behavior. The
previous code set env->mcg_cap to:
  (MCE_CAP_DEF & ioctl(KVM_X86_GET_MCE_CAP_SUPPORTED)) | MCE_BANKS_DEF
and the new code still keeps it exactly the same, as env->mcg_cap
is already initialized as MCE_CAP_DEF|MCE_BANKS_DEF at
mce_init().

This will allow us to change mce_init() in the future, to
implement different defaults depending on CPU model, machine-type
or command-line parameters.

Eduardo Habkost (3):
  target-i386: kvm: Abort if MCE bank count is not supported by host
  target-i386: kvm: Use env->mcg_cap when setting up MCE
  target-i386: kvm: Print warning when clearing mcg_cap bits

 target-i386/cpu.h |  2 ++
 target-i386/kvm.c | 22 ++++++++++++++--------
 2 files changed, 16 insertions(+), 8 deletions(-)

-- 
2.1.0

             reply	other threads:[~2015-11-25 15:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25 15:49 Eduardo Habkost [this message]
2015-11-25 15:49 ` [Qemu-devel] [PATCH 1/3] target-i386: kvm: Abort if MCE bank count is not supported by host Eduardo Habkost
2015-11-25 16:46   ` Paolo Bonzini
2015-11-25 17:26     ` Eduardo Habkost
2015-11-25 17:30       ` Paolo Bonzini
2015-11-25 15:49 ` [Qemu-devel] [PATCH 2/3] target-i386: kvm: Use env->mcg_cap when setting up MCE Eduardo Habkost
2015-11-25 15:49 ` [Qemu-devel] [PATCH 3/3] target-i386: kvm: Print warning when clearing mcg_cap bits Eduardo Habkost
2015-11-25 16:45   ` Paolo Bonzini
2015-11-25 17:29     ` Eduardo Habkost
2015-11-25 17:30       ` Paolo Bonzini
2015-11-25 17:21   ` Borislav Petkov
2015-11-25 17:29     ` Paolo Bonzini
2015-11-25 17:35       ` Borislav Petkov

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=1448466589-9407-1-git-send-email-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=afaerber@suse.de \
    --cc=bp@alien8.de \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=ying.huang@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).