qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] target-i386: kvm: Use env->mcg_cap when setting up MCE
@ 2015-11-25 15:49 Eduardo Habkost
  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
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Eduardo Habkost @ 2015-11-25 15:49 UTC (permalink / raw)
  To: qemu-devel
  Cc: kvm, Marcelo Tosatti, Borislav Petkov, ying.huang, Paolo Bonzini,
	Andreas Färber, Richard Henderson

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-11-25 17:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-25 15:49 [Qemu-devel] [PATCH 0/3] target-i386: kvm: Use env->mcg_cap when setting up MCE Eduardo Habkost
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

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).