x86: add sanity check and comments for vMCE injection
authorLiu, Jinsong <jinsong.liu@intel.com>
Fri, 5 Oct 2012 12:30:21 +0000 (14:30 +0200)
committerLiu, Jinsong <jinsong.liu@intel.com>
Fri, 5 Oct 2012 12:30:21 +0000 (14:30 +0200)
commitb02dce5082373bd39225c00b0ef1fde32760cf38
tree80f6cda20ff367126fc8b12236bbc17dd0d49e7d
parent5a3be935c31be1861504dd1400651732d0d97297
x86: add sanity check and comments for vMCE injection

Add sanity check for input vcpu so that malicious value would not
return 0. Add comments since vcpu=-1 (broadcast) is some implicit to
code reader.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Suggested-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/mcheck/mce_intel.c
xen/arch/x86/cpu/mcheck/vmce.c
xen/arch/x86/cpu/mcheck/vmce.h