From: Haozhong Zhang <haozhong.zhang@intel.com>
To: xen-devel@lists.xen.org
Cc: Haozhong Zhang <haozhong.zhang@intel.com>,
Jan Beulich <jbeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Christoph Egger <chegger@amazon.de>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: [PATCH 5/7] x86/mce: clear MSR_IA32_MCG_STATUS by writing 0
Date: Fri, 24 Feb 2017 18:52:54 +0800 [thread overview]
Message-ID: <20170224105256.24668-6-haozhong.zhang@intel.com> (raw)
In-Reply-To: <20170224105256.24668-1-haozhong.zhang@intel.com>
On Intel CPU, an attemp to write to MSR_IA32_MCG_STATUS with any
non-zero value would result in #GP.
This commit writes 0 on AMD CPU as well instead of just clearing MCIP
bit, because all non-reserved bits of MSR_IA32_MCG_STATUS have been
handled at this point.
Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
---
Cc: Christoph Egger <chegger@amazon.de>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Changes:
* Write 0 on AMD as well.
* Change the patch title to reflect the above change.
---
xen/arch/x86/cpu/mcheck/mce.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/cpu/mcheck/mce.c b/xen/arch/x86/cpu/mcheck/mce.c
index 53ca29c..5a7e2ba 100644
--- a/xen/arch/x86/cpu/mcheck/mce.c
+++ b/xen/arch/x86/cpu/mcheck/mce.c
@@ -539,7 +539,7 @@ void mcheck_cmn_handler(const struct cpu_user_regs *regs)
gstatus = mca_rdmsr(MSR_IA32_MCG_STATUS);
if ((gstatus & MCG_STATUS_MCIP) != 0) {
mce_printk(MCE_CRITICAL, "MCE: Clear MCIP@ last step");
- mca_wrmsr(MSR_IA32_MCG_STATUS, gstatus & ~MCG_STATUS_MCIP);
+ mca_wrmsr(MSR_IA32_MCG_STATUS, 0);
}
mce_barrier_exit(&mce_trap_bar);
--
2.10.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-02-24 10:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-24 10:52 [PATCH 0/7] MCE code cleanup and bugfix Haozhong Zhang
2017-02-24 10:52 ` [PATCH 1/7] xen/mce: adjust comment of callback register functions Haozhong Zhang
2017-02-24 10:52 ` [PATCH 2/7] xen/mce: remove unused x86_mcinfo_add() Haozhong Zhang
2017-02-24 15:01 ` Jan Beulich
2017-02-24 10:52 ` [PATCH 3/7] x86/mce: set mcinfo_comm.type and .size in x86_mcinfo_reserve() Haozhong Zhang
2017-02-24 15:02 ` Jan Beulich
2017-02-24 10:52 ` [PATCH 4/7] x86/vmce: fill MSR_IA32_MCG_STATUS on all vcpus in broadcast case Haozhong Zhang
2017-02-24 15:07 ` Jan Beulich
2017-02-24 10:52 ` Haozhong Zhang [this message]
2017-02-24 13:29 ` [PATCH 5/7] x86/mce: clear MSR_IA32_MCG_STATUS by writing 0 Boris Ostrovsky
2017-02-24 15:07 ` Jan Beulich
2017-02-24 10:52 ` [PATCH 6/7] xen/mce: make ASSERT's about mce_dhandler_num in mce_action() Intel only Haozhong Zhang
2017-02-24 15:14 ` Jan Beulich
2017-02-24 10:52 ` [PATCH 7/7] tools/xen-mceinj: fix the type of cpu number Haozhong Zhang
2017-02-26 17:47 ` Wei Liu
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=20170224105256.24668-6-haozhong.zhang@intel.com \
--to=haozhong.zhang@intel.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=chegger@amazon.de \
--cc=jbeulich@suse.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=xen-devel@lists.xen.org \
/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).