* [pvops-dom0]Let PV ops guest could handle Machine Check trap
@ 2009-09-22 6:32 Ke, Liping
2009-09-22 16:36 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 3+ messages in thread
From: Ke, Liping @ 2009-09-22 6:32 UTC (permalink / raw)
To: Jeremy Fitzhardinge, Jiang, Yunhong, Li, Haicheng
Cc: xen-devel@lists.xensource.com
[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]
Hi, Jeremy and all
This small patch lets pv ops guest handle machine check trap. When non
fatal mce error happens, xen will inject vMCE# to the impacted pv ops guest.
This patch allows pv ops guest could receive machine check trap and enter
its own machine check handler.
Thanks & Regards,
Criping
>From 5efc12fe8214d55e2becc2c4b6ec4a30531d7b60 Mon Sep 17 00:00:00 2001
From: Liping Ke <liping.ke@intel.com>
Date: Tue, 22 Sep 2009 10:46:05 +0800
Subject: [PATCH] Let PV guest handle machine check trap.
This patch lets pv ops guest handle machine check trap. When non
fatal mce error happens, XEN will inject vMCE# to the pv ops guest
This patch allows pv ops guest could receive machine check trap
and enter its own machine check handler.
Signed-off-by: Liping Ke <liping.ke@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 1edf6a8..3399a40 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -476,7 +476,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 {
/* Some other trap using IST? */
--
1.5.1
[-- Attachment #2: 0001-Let-PV-guest-handle-machine-check-trap.patch --]
[-- Type: application/octet-stream, Size: 1029 bytes --]
From 5efc12fe8214d55e2becc2c4b6ec4a30531d7b60 Mon Sep 17 00:00:00 2001
From: Liping Ke <liping.ke@intel.com>
Date: Tue, 22 Sep 2009 10:46:05 +0800
Subject: [PATCH] Let PV guest handle machine check trap.
This patch lets pv ops guest handle machine check trap. When non
fatal mce error happens, XEN will inject vMCE# to the pv ops guest
This patch allows pv ops guest could receive machine check trap
and enter its own machine check handler.
Signed-off-by: Liping Ke <liping.ke@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 1edf6a8..3399a40 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -476,7 +476,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 {
/* Some other trap using IST? */
--
1.5.1
[-- 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: [pvops-dom0]Let PV ops guest could handle Machine Check trap
2009-09-22 6:32 [pvops-dom0]Let PV ops guest could handle Machine Check trap Ke, Liping
@ 2009-09-22 16:36 ` Jeremy Fitzhardinge
2009-11-03 8:16 ` Jiang, Yunhong
0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Fitzhardinge @ 2009-09-22 16:36 UTC (permalink / raw)
To: Ke, Liping; +Cc: Li, Haicheng, Jiang, Yunhong, xen-devel@lists.xensource.com
On 09/21/09 23:32, Ke, Liping wrote:
> Hi, Jeremy and all
>
> This small patch lets pv ops guest handle machine check trap. When non
> fatal mce error happens, xen will inject vMCE# to the impacted pv ops guest.
> This patch allows pv ops guest could receive machine check trap and enter
> its own machine check handler.
>
Have you tested this? This code is specifically to deal with traps
installed using an IST stack. If the machine_check handler just works
as-is then there's no need for that whole ifdef block. If it doesn't
work, then we need a variant which has the right exception frame format.
Thanks,
J
> Thanks & Regards,
> Criping
>
>
> From 5efc12fe8214d55e2becc2c4b6ec4a30531d7b60 Mon Sep 17 00:00:00 2001
> From: Liping Ke <liping.ke@intel.com>
> Date: Tue, 22 Sep 2009 10:46:05 +0800
> Subject: [PATCH] Let PV guest handle machine check trap.
>
> This patch lets pv ops guest handle machine check trap. When non
> fatal mce error happens, XEN will inject vMCE# to the pv ops guest
> This patch allows pv ops guest could receive machine check trap
> and enter its own machine check handler.
>
> Signed-off-by: Liping Ke <liping.ke@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 1edf6a8..3399a40 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -476,7 +476,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 {
> /* Some other trap using IST? */
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [pvops-dom0]Let PV ops guest could handle Machine Check trap
2009-09-22 16:36 ` Jeremy Fitzhardinge
@ 2009-11-03 8:16 ` Jiang, Yunhong
0 siblings, 0 replies; 3+ messages in thread
From: Jiang, Yunhong @ 2009-11-03 8:16 UTC (permalink / raw)
To: Jeremy Fitzhardinge, Ke, Liping
Cc: Li, Haicheng, xen-devel@lists.xensource.com
Jeremy Fitzhardinge wrote:
> On 09/21/09 23:32, Ke, Liping wrote:
>> Hi, Jeremy and all
>>
>> This small patch lets pv ops guest handle machine check trap. When
>> non fatal mce error happens, xen will inject vMCE# to the impacted
>> pv ops guest. This patch allows pv ops guest could receive machine
>> check trap and enter its own machine check handler.
>>
>
> Have you tested this? This code is specifically to deal with traps
> installed using an IST stack. If the machine_check handler just works
> as-is then there's no need for that whole ifdef block. If it doesn't
> work, then we need a variant which has the right exception
> frame format.
I remember Criping has tested the patch already and it works.
After checking the machine check code in dom0, I think it should be ok to use normal handler, I didn't find any dependency for the IST stack in the machine check handler.
One potential issue is, if it is a MCA is for current thread, i.e. the EIPV == 1, RIPV==0, the current thread may be killed. It will depends on how dom0's implementation will handle such situation, but most likely dom0 will do error handling when return from MCA, and that will be ok. BTW, I don't think we have such MCA now.
Thanks
--jyh
>
> Thanks,
> J
>
>> Thanks & Regards,
>> Criping
>>
>>
>> From 5efc12fe8214d55e2becc2c4b6ec4a30531d7b60 Mon Sep 17 00:00:00
>> 2001 From: Liping Ke <liping.ke@intel.com>
>> Date: Tue, 22 Sep 2009 10:46:05 +0800
>> Subject: [PATCH] Let PV guest handle machine check trap.
>>
>> This patch lets pv ops guest handle machine check trap. When non
>> fatal mce error happens, XEN will inject vMCE# to the pv ops guest
>> This patch allows pv ops guest could receive machine check trap
>> and enter its own machine check handler.
>>
>> Signed-off-by: Liping Ke <liping.ke@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 1edf6a8..3399a40 100644 --- a/arch/x86/xen/enlighten.c
>> +++ b/arch/x86/xen/enlighten.c
>> @@ -476,7 +476,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 {
>> /* Some other trap using IST? */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-03 8:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-22 6:32 [pvops-dom0]Let PV ops guest could handle Machine Check trap Ke, Liping
2009-09-22 16:36 ` Jeremy Fitzhardinge
2009-11-03 8:16 ` 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.