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

Re: [Xen-devel] [PATCH 06/19] x86/mce: merge intel_default_mce_dhandler/uhandler()



On 02/17/17 03:01 -0700, Jan Beulich wrote:
> >>> On 17.02.17 at 07:39, <haozhong.zhang@xxxxxxxxx> wrote:
> > Implementations of these two functions are effectively the same, so
> > unify them by a common intel_default_mce_handler().
> 
> Them being the same right now may also be an issue with the
> earlier authors never having completed their job. I'd like to see
> justification here that the two handlers also are conceptionally
> (mostly) identical. Mechanically the patch is fine.
> 

Maybe conceptually not, because
1) uhandler is called in MCE context and, IIUC, should be more careful
   than dhandler;
2) the 3rd argument "regs" only makes sense in MCE context, so
   dhandler should never use them.

I think a better alternative is to move the same code to a common
function and let uhandler and dhandler call that common function. In
addition, I'll leave a comment to explain why not merge them.

Haozhong

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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