2012-05-31 17:33:55

by Liu, Jinsong

[permalink] [raw]
Subject: [PATCH 3/3] Register native mce handler as vMCE bounce back point

>From ca1f8a2347eb34acdc7c54b805c78a982a0a590d Mon Sep 17 00:00:00 2001
From: Liu, Jinsong <[email protected]>
Date: Fri, 1 Jun 2012 08:41:00 +0800
Subject: [PATCH 3/3] Register native mce handler as vMCE bounce back point

When xen hypervisor inject vMCE to guest, use native mce handler to handle it

Signed-off-by: Ke, Liping <[email protected]>
Signed-off-by: Jiang, Yunhong <[email protected]>
Signed-off-by: Jeremy Fitzhardinge <[email protected]>
Signed-off-by: Liu, Jinsong <[email protected]>
---
arch/x86/xen/enlighten.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index ff2d00e..0cb12dd 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -618,8 +618,8 @@ static int cvt_gate_to_trap(int vector, const gate_desc *val,
/*
* Look for known traps using IST, and substitute them
* appropriately. The debugger ones are the only ones we care
- * about. Xen will handle faults like double_fault and
- * machine_check, so we should never see them. Warn if
+ * about. Xen will handle faults like double_fault,
+ * so we should never see them. Warn if
* there's an unexpected IST-using fault handler.
*/
if (addr == (unsigned long)debug)
@@ -634,7 +634,11 @@ static int cvt_gate_to_trap(int vector, const gate_desc *val,
return 0;
#ifdef CONFIG_X86_MCE
} else if (addr == (unsigned long)machine_check) {
- return 0;
+ /*
+ * when xen hyeprvisor inject vMCE to guest,
+ * use native mce handler to handle it
+ */
+ ;
#endif
} else {
/* Some other trap using IST? */
--
1.7.1


Attachments:
0003-Register-native-mce-handler-as-vMCE-bounce-back-poin.patch (1.62 kB)
0003-Register-native-mce-handler-as-vMCE-bounce-back-poin.patch

2012-05-31 17:39:49

by Konrad Rzeszutek Wilk

[permalink] [raw]
Subject: Re: [PATCH 3/3] Register native mce handler as vMCE bounce back point

On Thu, May 31, 2012 at 05:33:49PM +0000, Liu, Jinsong wrote:
> >From ca1f8a2347eb34acdc7c54b805c78a982a0a590d Mon Sep 17 00:00:00 2001
> From: Liu, Jinsong <[email protected]>
> Date: Fri, 1 Jun 2012 08:41:00 +0800
> Subject: [PATCH 3/3] Register native mce handler as vMCE bounce back point

You need to have 'xen:' in front of 'register'
>
> When xen hypervisor inject vMCE to guest, use native mce handler to handle it

And is that still OK?
>
> Signed-off-by: Ke, Liping <[email protected]>
> Signed-off-by: Jiang, Yunhong <[email protected]>
> Signed-off-by: Jeremy Fitzhardinge <[email protected]>
> Signed-off-by: Liu, Jinsong <[email protected]>
> ---
> arch/x86/xen/enlighten.c | 10 +++++++---
> 1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index ff2d00e..0cb12dd 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -618,8 +618,8 @@ static int cvt_gate_to_trap(int vector, const gate_desc *val,
> /*
> * Look for known traps using IST, and substitute them
> * appropriately. The debugger ones are the only ones we care
> - * about. Xen will handle faults like double_fault and
> - * machine_check, so we should never see them. Warn if
> + * about. Xen will handle faults like double_fault,
> + * so we should never see them. Warn if
> * there's an unexpected IST-using fault handler.
> */
> if (addr == (unsigned long)debug)
> @@ -634,7 +634,11 @@ static int cvt_gate_to_trap(int vector, const gate_desc *val,
> return 0;
> #ifdef CONFIG_X86_MCE
> } else if (addr == (unsigned long)machine_check) {
> - return 0;
> + /*
> + * when xen hyeprvisor inject vMCE to guest,

<sigh> Pls run a spell checker.

> + * use native mce handler to handle it
> + */
> + ;
> #endif
> } else {
> /* Some other trap using IST? */
> --
> 1.7.1