x86, amd_ucode: safeguard against #GP
authorAravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
Fri, 1 Aug 2014 14:48:30 +0000 (16:48 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 1 Aug 2014 14:48:30 +0000 (16:48 +0200)
commit8b24b07eef3ba13ce48d800f28c1c28de5a2b4a7
tree4571bd3e6cbd676c26a0c15a691fc9702b51645f
parent6784dd6fdc43914e9bf5b080e12c7877d000dffa
x86, amd_ucode: safeguard against #GP

When HW tries to load a corrupted patch, it generates #GP
and depending on 'noreboot' parameter on grub, the system
is either stuck in a reboot loop or is hung. Use wrmsr_safe
instead of wrmsrl so that we fail to load microcode gracefully.

Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/microcode_amd.c