[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] [PATCH] X86 MCE: Add SRAR handler



Jan Beulich wrote:
>>>> On 30.09.11 at 09:44, "Liu, Jinsong" <jinsong.liu@xxxxxxxxx> wrote:
>> Jan Beulich wrote:
>>>>>> On 30.09.11 at 04:51, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
>>>>>> wrote:
>>>>> This made me look at the current source, and there I see in
>>>>> mce_urgent_action() 
>>>>> 
>>>>>     if ( !(gstatus & MCG_STATUS_RIPV) && !guest_mode(regs))
>>>>> return -1; 
>>>>> 
>>>>> which I think should say ... _EIPV and use || instead. Thoughts?
>>>> 
>>>> I think this code means, if the error happens in hypervisor mode
>>>> (i.e. !guest_mode()), and RIPV indicate the RIP in stack can't be
>>>> restarted, we have to panic.
>>> 
>>> Then the guest_mode() check still lacks an extra check of EIPV, like
>>> 
>>>      if ( !(gstatus & MCG_STATUS_RIPV) &&
>>>           (!(gstatus & MCG_STATUS_EIPV) || !guest_mode(regs)))     
>>> return -1; 
>>> 
>> 
>> That would be overkilled.
>> Considering instruction fetch error occur at guest context,
>> hypervisor deliver to guest to handle the error is perfer, not panic
>> all system. 
> 
> Even if it was hypervisor code that got prefetched while still
> executing guest code (which ought to be possible at least
> across a syscall/sysenter instruction)?
> 

Executing guest code will not satisfy the check
if ( !(gstatus & MCG_STATUS_RIPV) && !guest_mode(regs))
        return -1;
so it would not panic system.

Thanks,
Jinsong
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.