The following patch reworks the MCA error telemetry handling inside Xen, and shares code between the Intel and AMD implementations as much as possible. I've had this patch sitting around for a while, but it wasn't ported to -unstable yet. I finished porting and testing it, and am submitting it now, because the Intel folks want to go ahead and submit their new changes, so we agreed that I should push our changes first. Brief explanation of the telemetry part: previously, the telemetry was accessed in a global array, with index variables used to access it. There were some issues with that: race conditions with regard to new machine checks (or CMCIs) coming in while handling the telemetry, and interaction with domains having been notified or not, which was a bit hairy. Our changes (I should say: Gavin Maltby's changes, as he did the bulk of this work for our 3.1 based tree, I merely ported/extended it to 3.3 and beyond) make telemetry access transactional (think of a database). Also, the internal database updates are atomic, since the final commit is done by a pointer swap. There is a brief explanation of the mechanism in mctelem.h.This patch also removes dom0->domU notification, which is ok, since Intel's upcoming changes will replace domU notification with a vMCE mechanism anyway. The common code part is pretty much what it says. It defines a common MCE handler, with a few hooks for the special needs of the specific CPUs. I've been told that Intel's upcoming patch will need to make some parts of the common code specific to the Intel CPU again, but we'll work together to use as much common code as possible. - Frank