The attached patch adds the capability for dom0 to inject MCA errors into Xen. The basic idea is to add specific MSR values that will be read by the polling code or the #MC handler. On AMD cpus, the MSRs can actually be written, on Intel CPUs, interpose code is used to fake the MSR values. Since actual hardware problems are rare, it's convenient to be able to test the code like this. We run our testsuite using this code. Others have expressed some interest in this, so that's why I'm submitting this patch. - Frank