* [PATCH 2/2] Register native mce handler as vMCE bounce back point
@ 2012-04-16 1:07 Liu, Jinsong
2012-04-16 20:28 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 6+ messages in thread
From: Liu, Jinsong @ 2012-04-16 1:07 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk, xen-devel@lists.xensource.com,
linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 1708 bytes --]
>From 76e40a60878ff72986fd8d92611400195ae0f997 Mon Sep 17 00:00:00 2001
From: Liu, Jinsong <jinsong.liu@intel.com>
Date: Mon, 16 Apr 2012 00:16:58 +0800
Subject: [PATCH 2/2] Register native mce handler as vMCE bounce back point
When xen hyeprvisor inject vMCE to guest, use native mce handler to handle it
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>
---
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 15628d4..346ba64 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -614,8 +614,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)
@@ -630,7 +630,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
[-- Attachment #2: 0002-Register-native-mce-handler-as-vMCE-bounce-back-poin.patch --]
[-- Type: application/octet-stream, Size: 1663 bytes --]
From 76e40a60878ff72986fd8d92611400195ae0f997 Mon Sep 17 00:00:00 2001
From: Liu, Jinsong <jinsong.liu@intel.com>
Date: Mon, 16 Apr 2012 00:16:58 +0800
Subject: [PATCH 2/2] Register native mce handler as vMCE bounce back point
When xen hyeprvisor inject vMCE to guest, use native mce handler to handle it
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>
---
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 15628d4..346ba64 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -614,8 +614,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)
@@ -630,7 +630,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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Register native mce handler as vMCE bounce back point
2012-04-16 1:07 [PATCH 2/2] Register native mce handler as vMCE bounce back point Liu, Jinsong
@ 2012-04-16 20:28 ` Konrad Rzeszutek Wilk
2012-04-17 12:55 ` Liu, Jinsong
0 siblings, 1 reply; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-04-16 20:28 UTC (permalink / raw)
To: Liu, Jinsong; +Cc: xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org
On Mon, Apr 16, 2012 at 01:07:35AM +0000, Liu, Jinsong wrote:
> >From 76e40a60878ff72986fd8d92611400195ae0f997 Mon Sep 17 00:00:00 2001
> From: Liu, Jinsong <jinsong.liu@intel.com>
> Date: Mon, 16 Apr 2012 00:16:58 +0800
> Subject: [PATCH 2/2] Register native mce handler as vMCE bounce back point
>
> When xen hyeprvisor inject vMCE to guest, use native mce handler to handle it
hypervisor
>
> 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>
> ---
> 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 15628d4..346ba64 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -614,8 +614,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)
> @@ -630,7 +630,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
> + */
> + ;
Can you just take the check out?
> #endif
> } else {
> /* Some other trap using IST? */
> --
> 1.7.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 2/2] Register native mce handler as vMCE bounce back point
2012-04-16 20:28 ` Konrad Rzeszutek Wilk
@ 2012-04-17 12:55 ` Liu, Jinsong
2012-04-17 16:02 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 6+ messages in thread
From: Liu, Jinsong @ 2012-04-17 12:55 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk
Cc: xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org
Konrad Rzeszutek Wilk wrote:
> On Mon, Apr 16, 2012 at 01:07:35AM +0000, Liu, Jinsong wrote:
>>> From 76e40a60878ff72986fd8d92611400195ae0f997 Mon Sep 17 00:00:00
>>> 2001
>> From: Liu, Jinsong <jinsong.liu@intel.com>
>> Date: Mon, 16 Apr 2012 00:16:58 +0800
>> Subject: [PATCH 2/2] Register native mce handler as vMCE bounce back
>> point
>>
>> When xen hyeprvisor inject vMCE to guest, use native mce handler to
>> handle it
>
> hypervisor
>
>>
>> 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>
>> --- 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 15628d4..346ba64 100644
>> --- a/arch/x86/xen/enlighten.c
>> +++ b/arch/x86/xen/enlighten.c
>> @@ -614,8 +614,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)
>> @@ -630,7 +630,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
>> + */
>> + ;
>
>
> Can you just take the check out?
What do you mean by 'check out'? remove
else if (addr == (unsigned long) machine_check) {
;
}
?
That would fail to register mce bounce back point.
>
>
>> #endif
>> } else {
>> /* Some other trap using IST? */
>> --
>> 1.7.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Register native mce handler as vMCE bounce back point
2012-04-17 12:55 ` Liu, Jinsong
@ 2012-04-17 16:02 ` Konrad Rzeszutek Wilk
2012-04-17 17:06 ` Liu, Jinsong
0 siblings, 1 reply; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-04-17 16:02 UTC (permalink / raw)
To: Liu, Jinsong; +Cc: xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org
On Tue, Apr 17, 2012 at 12:55:49PM +0000, Liu, Jinsong wrote:
> Konrad Rzeszutek Wilk wrote:
> > On Mon, Apr 16, 2012 at 01:07:35AM +0000, Liu, Jinsong wrote:
> >>> From 76e40a60878ff72986fd8d92611400195ae0f997 Mon Sep 17 00:00:00
> >>> 2001
> >> From: Liu, Jinsong <jinsong.liu@intel.com>
> >> Date: Mon, 16 Apr 2012 00:16:58 +0800
> >> Subject: [PATCH 2/2] Register native mce handler as vMCE bounce back
> >> point
> >>
> >> When xen hyeprvisor inject vMCE to guest, use native mce handler to
> >> handle it
> >
> > hypervisor
> >
> >>
> >> 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>
> >> --- 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 15628d4..346ba64 100644
> >> --- a/arch/x86/xen/enlighten.c
> >> +++ b/arch/x86/xen/enlighten.c
> >> @@ -614,8 +614,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)
> >> @@ -630,7 +630,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
> >> + */
> >> + ;
> >
> >
> > Can you just take the check out?
>
> What do you mean by 'check out'? remove
> else if (addr == (unsigned long) machine_check) {
> ;
> }
> ?
>
> That would fail to register mce bounce back point.
Right, b/c right after we hit this check:
/* Some other trap using IST? */
639 if (WARN_ON(val->ist != 0))
640 return 0;
641 }
.. And the val->ist is not set for MCEs right?
>
> >
> >
> >> #endif
> >> } else {
> >> /* Some other trap using IST? */
> >> --
> >> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 2/2] Register native mce handler as vMCE bounce back point
2012-04-17 16:02 ` Konrad Rzeszutek Wilk
@ 2012-04-17 17:06 ` Liu, Jinsong
2012-04-17 18:18 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 6+ messages in thread
From: Liu, Jinsong @ 2012-04-17 17:06 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk
Cc: xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org
Konrad Rzeszutek Wilk wrote:
> On Tue, Apr 17, 2012 at 12:55:49PM +0000, Liu, Jinsong wrote:
>> Konrad Rzeszutek Wilk wrote:
>>> On Mon, Apr 16, 2012 at 01:07:35AM +0000, Liu, Jinsong wrote:
>>>>> From 76e40a60878ff72986fd8d92611400195ae0f997 Mon Sep 17 00:00:00
>>>>> 2001
>>>> From: Liu, Jinsong <jinsong.liu@intel.com>
>>>> Date: Mon, 16 Apr 2012 00:16:58 +0800
>>>> Subject: [PATCH 2/2] Register native mce handler as vMCE bounce
>>>> back point
>>>>
>>>> When xen hyeprvisor inject vMCE to guest, use native mce handler to
>>>> handle it
>>>
>>> hypervisor
>>>
>>>>
>>>> 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>
>>>> --- 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 15628d4..346ba64 100644 --- a/arch/x86/xen/enlighten.c
>>>> +++ b/arch/x86/xen/enlighten.c
>>>> @@ -614,8 +614,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)
>>>> @@ -630,7 +630,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
>>>> + */
>>>> + ;
>>>
>>>
>>> Can you just take the check out?
>>
>> What do you mean by 'check out'? remove
>> else if (addr == (unsigned long) machine_check) {
>> ;
>> }
>> ?
>>
>> That would fail to register mce bounce back point.
>
> Right, b/c right after we hit this check:
> /* Some other trap using IST? */
> 639 if (WARN_ON(val->ist != 0))
> 640 return 0;
> 641 }
>
> .. And the val->ist is not set for MCEs right?
No, mce ist is set as 0/5 (32/64), set_intr_gate_ist(X86_TRAP_MC, &machine_check, MCE_STACK);
>
>>
>>>
>>>
>>>> #endif
>>>> } else {
>>>> /* Some other trap using IST? */
>>>> --
>>>> 1.7.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-kernel" in the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Register native mce handler as vMCE bounce back point
2012-04-17 17:06 ` Liu, Jinsong
@ 2012-04-17 18:18 ` Konrad Rzeszutek Wilk
0 siblings, 0 replies; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-04-17 18:18 UTC (permalink / raw)
To: Liu, Jinsong; +Cc: xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org
On Tue, Apr 17, 2012 at 05:06:49PM +0000, Liu, Jinsong wrote:
> Konrad Rzeszutek Wilk wrote:
> > On Tue, Apr 17, 2012 at 12:55:49PM +0000, Liu, Jinsong wrote:
> >> Konrad Rzeszutek Wilk wrote:
> >>> On Mon, Apr 16, 2012 at 01:07:35AM +0000, Liu, Jinsong wrote:
> >>>>> From 76e40a60878ff72986fd8d92611400195ae0f997 Mon Sep 17 00:00:00
> >>>>> 2001
> >>>> From: Liu, Jinsong <jinsong.liu@intel.com>
> >>>> Date: Mon, 16 Apr 2012 00:16:58 +0800
> >>>> Subject: [PATCH 2/2] Register native mce handler as vMCE bounce
> >>>> back point
> >>>>
> >>>> When xen hyeprvisor inject vMCE to guest, use native mce handler to
> >>>> handle it
> >>>
> >>> hypervisor
> >>>
> >>>>
> >>>> 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>
> >>>> --- 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 15628d4..346ba64 100644 --- a/arch/x86/xen/enlighten.c
> >>>> +++ b/arch/x86/xen/enlighten.c
> >>>> @@ -614,8 +614,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)
> >>>> @@ -630,7 +630,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
> >>>> + */
> >>>> + ;
> >>>
> >>>
> >>> Can you just take the check out?
> >>
> >> What do you mean by 'check out'? remove
> >> else if (addr == (unsigned long) machine_check) {
> >> ;
> >> }
> >> ?
> >>
> >> That would fail to register mce bounce back point.
> >
> > Right, b/c right after we hit this check:
> > /* Some other trap using IST? */
> > 639 if (WARN_ON(val->ist != 0))
> > 640 return 0;
> > 641 }
> >
> > .. And the val->ist is not set for MCEs right?
>
> No, mce ist is set as 0/5 (32/64), set_intr_gate_ist(X86_TRAP_MC, &machine_check, MCE_STACK);
OK. then your idea is the right one. Please just fix the spelling and
re-submit.
>
> >
> >>
> >>>
> >>>
> >>>> #endif
> >>>> } else {
> >>>> /* Some other trap using IST? */
> >>>> --
> >>>> 1.7.1
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe
> >> linux-kernel" in the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at http://vger.kernel.org/majordomo-info.html
> >> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-04-17 18:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16 1:07 [PATCH 2/2] Register native mce handler as vMCE bounce back point Liu, Jinsong
2012-04-16 20:28 ` Konrad Rzeszutek Wilk
2012-04-17 12:55 ` Liu, Jinsong
2012-04-17 16:02 ` Konrad Rzeszutek Wilk
2012-04-17 17:06 ` Liu, Jinsong
2012-04-17 18:18 ` Konrad Rzeszutek Wilk
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).