All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] DOM0: Add Machine check support to dom0
@ 2010-01-28 10:13 Jiang, Yunhong
  2010-02-09 21:24 ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 3+ messages in thread
From: Jiang, Yunhong @ 2010-01-28 10:13 UTC (permalink / raw)
  To: Jeremy Fitzhardinge, Ke, Liping; +Cc: xen-devel@lists.xensource.com

[-- Attachment #1: Type: text/plain, Size: 1347 bytes --]

Jeremy, this patch is to add MCE support to dom0.

As currently there is no branch for MCA (the original one is really so out of date), so this patch is against xen master.

Another patch will sent out as RFC to cover the smal windows between syscall entry point and stack switch.

Thanks
Yunhong Jiang

 From 2fe838c3ab2d68d4019d72b2098da4c2ef97fcd8 Mon Sep 17 00:00:00 2001
From: Jiang, Yunhong <yunhong.jiang@intel.com>
Date: Wed, 27 Jan 2010 23:48:54 +0800
Subject: [PATCH] Change the machine check point

Enable MCE support in dom0, so that if a MCE happen and that MCE impact dom0, dom0 can receive a vMCE.

Signed-off-by: Ke, Liping <liping.ke@intel.com>
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
---
 arch/x86/xen/enlighten.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 7a62c2b..a8c1d34 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -531,7 +531,7 @@ 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;
+		addr = (unsigned long)machine_check;
 #endif
 	} else if (WARN(val->ist != 0,
 			"Unknown IST-using trap: vector %d, %pF, val->ist=%d\n",
-- 
1.5.4.2




[-- Attachment #2: 0001-Change-the-machine-check-point.patch --]
[-- Type: application/octet-stream, Size: 1000 bytes --]

From 2fe838c3ab2d68d4019d72b2098da4c2ef97fcd8 Mon Sep 17 00:00:00 2001
From: Jiang, Yunhong <yunhong.jiang@intel.com>
Date: Wed, 27 Jan 2010 23:48:54 +0800
Subject: [PATCH] Change the machine check point

Enable MCE support in dom0, so that if a MCE happen and that MCE impact dom0, dom0 can receive a vMCE.

Signed-off-by: Ke, Liping <liping.ke@intel.com>
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
---
 arch/x86/xen/enlighten.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 7a62c2b..a8c1d34 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -531,7 +531,7 @@ 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;
+		addr = (unsigned long)machine_check;
 #endif
 	} else if (WARN(val->ist != 0,
 			"Unknown IST-using trap: vector %d, %pF, val->ist=%d\n",
-- 
1.5.4.2


[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

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

* Re: [PATCH] DOM0: Add Machine check support to dom0
  2010-01-28 10:13 [PATCH] DOM0: Add Machine check support to dom0 Jiang, Yunhong
@ 2010-02-09 21:24 ` Jeremy Fitzhardinge
  2010-02-10  9:23   ` Jiang, Yunhong
  0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Fitzhardinge @ 2010-02-09 21:24 UTC (permalink / raw)
  To: Jiang, Yunhong; +Cc: xen-devel@lists.xensource.com, Ke, Liping

On 01/28/2010 02:13 AM, Jiang, Yunhong wrote:
> Jeremy, this patch is to add MCE support to dom0.
>
> As currently there is no branch for MCA (the original one is really so out of date), so this patch is against xen master.
>
> Another patch will sent out as RFC to cover the smal windows between syscall entry point and stack switch.
>
> Thanks
> Yunhong Jiang
>
>   From 2fe838c3ab2d68d4019d72b2098da4c2ef97fcd8 Mon Sep 17 00:00:00 2001
> From: Jiang, Yunhong<yunhong.jiang@intel.com>
> Date: Wed, 27 Jan 2010 23:48:54 +0800
> Subject: [PATCH] Change the machine check point
>
> Enable MCE support in dom0, so that if a MCE happen and that MCE impact dom0, dom0 can receive a vMCE.
>
> Signed-off-by: Ke, Liping<liping.ke@intel.com>
> Signed-off-by: Jiang, Yunhong<yunhong.jiang@intel.com>
> ---
>   arch/x86/xen/enlighten.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index 7a62c2b..a8c1d34 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -531,7 +531,7 @@ 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;
> +		addr = (unsigned long)machine_check;
>    

I just had another look at this while going through my backlog.  This is 
just a no-op.  I assume we need the test because val->ist != 0 and so 
would provoke the check, but we needn't have any body in the if(), right?

     J

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

* RE: [PATCH] DOM0: Add Machine check support to dom0
  2010-02-09 21:24 ` Jeremy Fitzhardinge
@ 2010-02-10  9:23   ` Jiang, Yunhong
  0 siblings, 0 replies; 3+ messages in thread
From: Jiang, Yunhong @ 2010-02-10  9:23 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: xen-devel@lists.xensource.com, Ke, Liping

Yes, it should be safe. I remember I thought this also, but forgot why I still use original patch.  I will try tomorrow once I got the platform to test.
BTW, how do you think of the mail at http://old.nabble.com/-RFC---PATCH--Dom0:-Don't-switch-back-to-user-space-stack-in-syscall-entry-td27353863.html ? Do you think we need the vIST implementation?

Thanks
Yunhong Jiang

>-----Original Message-----
>From: Jeremy Fitzhardinge [mailto:jeremy@goop.org]
>Sent: Wednesday, February 10, 2010 5:24 AM
>To: Jiang, Yunhong
>Cc: Ke, Liping; xen-devel@lists.xensource.com
>Subject: Re: [PATCH] DOM0: Add Machine check support to dom0
>
>On 01/28/2010 02:13 AM, Jiang, Yunhong wrote:
>> Jeremy, this patch is to add MCE support to dom0.
>>
>> As currently there is no branch for MCA (the original one is really so out of date), so
>this patch is against xen master.
>>
>> Another patch will sent out as RFC to cover the smal windows between syscall
>entry point and stack switch.
>>
>> Thanks
>> Yunhong Jiang
>>
>>   From 2fe838c3ab2d68d4019d72b2098da4c2ef97fcd8 Mon Sep 17 00:00:00
>2001
>> From: Jiang, Yunhong<yunhong.jiang@intel.com>
>> Date: Wed, 27 Jan 2010 23:48:54 +0800
>> Subject: [PATCH] Change the machine check point
>>
>> Enable MCE support in dom0, so that if a MCE happen and that MCE impact dom0,
>dom0 can receive a vMCE.
>>
>> Signed-off-by: Ke, Liping<liping.ke@intel.com>
>> Signed-off-by: Jiang, Yunhong<yunhong.jiang@intel.com>
>> ---
>>   arch/x86/xen/enlighten.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
>> index 7a62c2b..a8c1d34 100644
>> --- a/arch/x86/xen/enlighten.c
>> +++ b/arch/x86/xen/enlighten.c
>> @@ -531,7 +531,7 @@ 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;
>> +		addr = (unsigned long)machine_check;
>>
>
>I just had another look at this while going through my backlog.  This is
>just a no-op.  I assume we need the test because val->ist != 0 and so
>would provoke the check, but we needn't have any body in the if(), right?
>
>     J

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

end of thread, other threads:[~2010-02-10  9:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-28 10:13 [PATCH] DOM0: Add Machine check support to dom0 Jiang, Yunhong
2010-02-09 21:24 ` Jeremy Fitzhardinge
2010-02-10  9:23   ` Jiang, Yunhong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.