]> xenbits.xensource.com Git - people/iwj/xen.git/commit
x86/MCE: disable if MCE banks are not present master
authorAravindh Puthiyaparambil <aravindp@cisco.com>
Mon, 3 Jun 2013 13:42:46 +0000 (15:42 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 3 Jun 2013 13:42:46 +0000 (15:42 +0200)
commit5cffb77c4072fa5b46700a2dbb3e46c5a54eba6d
tree725d22ba8f56d5dec57a7ecb6bc9bf1baa4c526b
parentb14fed71515bc6887d288169890c02f7bbe5d960
x86/MCE: disable if MCE banks are not present

When booting Xen on VMware ESX 5.1 and Workstation 9, you hit a GPF
during MCE initialization. The culprit is line 631 in
set_poll_bankmask():
                bitmap_copy(mb->bank_map, mca_allbanks->bank_map, nr_mce_banks);

What is happening is that in mca_cap_init(), nr_mce_banks is being set
to 0. This causes the allocation of bank_map to be set to
ZERO_BLOCK_PTR which is the return value for zero-size allocation by
xzalloc_array()/_xmalloc(). This results in the bitmap_copy() to fail
disastrously. The following patch fixes this issue.

Signed-off-by: Aravindh Puthiyaparambil <aravindp@cisco.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Christoph Egger <chegger@amazon.de>
xen/arch/x86/cpu/mcheck/mce.c