From: Borislav Petkov <borislav.petkov@amd.com>
To: "Liu, Jinsong" <jinsong.liu@intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Borislav Petkov <bp@amd64.org>,
"Luck, Tony" <tony.luck@intel.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] xen/mce: Add mcelog support for Xen platform (v2)
Date: Tue, 22 May 2012 11:23:54 +0200 [thread overview]
Message-ID: <20120522092354.GB18578@aftab.osrc.amd.com> (raw)
In-Reply-To: <DE8DF0795D48FD4CA783C40EC82923351D6892@SHSMSX101.ccr.corp.intel.com>
On Tue, May 22, 2012 at 05:45:04AM +0000, Liu, Jinsong wrote:
> From 4df7496eea9e92a3e267ffb0a4b8f5e6e0c29c36 Mon Sep 17 00:00:00 2001
> From: Liu, Jinsong <jinsong.liu@intel.com>
> Date: Mon, 21 May 2012 05:07:47 +0800
> Subject: [PATCH 1/3] xen/mce: Add mcelog support for Xen platform
>
> When MCA error occurs, it would be handled by Xen hypervisor first,
> and then the error information would be sent to initial domain for logging.
>
> This patch gets error information from Xen hypervisor and convert
> Xen format error into Linux format mcelog. This logic is basically
> self-contained, not touching other kernel components.
>
> By using tools like mcelog tool users could read specific error information,
> like what they did under native Linux.
>
> To test follow directions outlined in Documentation/acpi/apei/einj.txt
>
> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
> Signed-off-by: Ke, Liping <liping.ke@intel.com>
> Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
If you're sending the patch, you need to be the last on the SOB-chain
and the SOB-chain has to show the proper path the patch took. See
<Documentation/SubmittingPatches>.
> ---
> arch/x86/include/asm/xen/hypercall.h | 8 +
> arch/x86/kernel/cpu/mcheck/mce.c | 4 +-
> arch/x86/xen/enlighten.c | 9 +-
> drivers/xen/Kconfig | 8 +
> drivers/xen/Makefile | 1 +
> drivers/xen/mcelog.c | 395 ++++++++++++++++++++++++++++++++++
> include/linux/miscdevice.h | 1 +
> include/xen/interface/xen-mca.h | 389 +++++++++++++++++++++++++++++++++
> 8 files changed, 809 insertions(+), 6 deletions(-)
> create mode 100644 drivers/xen/mcelog.c
> create mode 100644 include/xen/interface/xen-mca.h
>
> diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h
> index 5728852..59c226d 100644
> --- a/arch/x86/include/asm/xen/hypercall.h
> +++ b/arch/x86/include/asm/xen/hypercall.h
> @@ -48,6 +48,7 @@
> #include <xen/interface/sched.h>
> #include <xen/interface/physdev.h>
> #include <xen/interface/platform.h>
> +#include <xen/interface/xen-mca.h>
>
> /*
> * The hypercall asms have to meet several constraints:
> @@ -302,6 +303,13 @@ HYPERVISOR_set_timer_op(u64 timeout)
> }
>
> static inline int
> +HYPERVISOR_mca(struct xen_mc *mc_op)
> +{
> + mc_op->interface_version = XEN_MCA_INTERFACE_VERSION;
> + return _hypercall1(int, mca, mc_op);
> +}
> +
> +static inline int
> HYPERVISOR_dom0_op(struct xen_platform_op *platform_op)
> {
> platform_op->interface_version = XENPF_INTERFACE_VERSION;
> diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
> index d086a09..24b2e86 100644
> --- a/arch/x86/kernel/cpu/mcheck/mce.c
> +++ b/arch/x86/kernel/cpu/mcheck/mce.c
> @@ -57,8 +57,6 @@ static DEFINE_MUTEX(mce_chrdev_read_mutex);
>
> int mce_disabled __read_mostly;
>
> -#define MISC_MCELOG_MINOR 227
> -
> #define SPINUNIT 100 /* 100ns */
>
> atomic_t mce_entry;
> @@ -1791,7 +1789,7 @@ static const struct file_operations mce_chrdev_ops = {
> .llseek = no_llseek,
> };
>
> -static struct miscdevice mce_chrdev_device = {
> +struct miscdevice mce_chrdev_device = {
> MISC_MCELOG_MINOR,
> "mcelog",
> &mce_chrdev_ops,
You're still reusing those - pls, define your own 'struct miscdevice
mce_chrdev_device' in drivers/xen/ or somewhere convenient and
your own mce_chrdev_ops. The only thing you should be touching in
arch/x86/.../mcheck/ is the export of MISC_MCELOG_MINOR.
Thanks.
--
Regards/Gruss,
Boris.
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
next prev parent reply other threads:[~2012-05-22 9:23 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 5:45 Liu, Jinsong
2012-05-22 9:23 ` Borislav Petkov [this message]
2012-05-24 10:10 ` Liu, Jinsong
2012-05-24 10:30 ` Borislav Petkov
2012-05-24 16:15 ` Liu, Jinsong
2012-05-24 16:26 ` Borislav Petkov
2012-05-24 16:52 ` Liu, Jinsong
2012-05-24 19:10 ` [Xen-devel] " Konrad Rzeszutek Wilk
2012-05-25 18:01 ` Liu, Jinsong
2012-05-25 18:03 ` Konrad Rzeszutek Wilk
2012-05-25 19:55 ` Liu, Jinsong
2012-05-25 20:23 ` Konrad Rzeszutek Wilk
2012-05-25 20:47 ` Liu, Jinsong
2012-05-25 21:15 ` Konrad Rzeszutek Wilk
2012-05-24 18:49 ` Konrad Rzeszutek Wilk
2012-05-25 17:56 ` Liu, Jinsong
2012-05-25 18:01 ` Konrad Rzeszutek Wilk
2012-05-25 18:55 ` Liu, Jinsong
[not found] ` <DE8DF0795D48FD4CA783C40EC82923351F0D53@SHSMSX101.ccr.corp.intel.com>
2012-05-28 13:36 ` Liu, Jinsong
2012-05-29 18:39 ` Konrad Rzeszutek Wilk
2012-05-30 15:14 ` Liu, Jinsong
2012-05-28 14:48 ` [PATCH 1/3] xen/mce: Add mcelog support for Xen platform (RFC) Liu, Jinsong
2012-05-29 13:38 ` Borislav Petkov
2012-05-29 16:40 ` Liu, Jinsong
2012-05-29 17:06 ` Borislav Petkov
2012-05-30 14:40 ` Liu, Jinsong
2012-05-30 15:09 ` Liu, Jinsong
2012-05-30 15:08 ` Konrad Rzeszutek Wilk
2012-05-30 15:20 ` Liu, Jinsong
2012-05-30 15:29 ` Borislav Petkov
2012-05-30 17:21 ` Liu, Jinsong
2012-05-30 17:28 ` Borislav Petkov
2012-05-31 13:00 ` Liu, Jinsong
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=20120522092354.GB18578@aftab.osrc.amd.com \
--to=borislav.petkov@amd.com \
--cc=bp@amd64.org \
--cc=jinsong.liu@intel.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=xen-devel@lists.xensource.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
all inboxes | Powered by JetHome®