Re: [PATCH] x86/mce: Check for hypervisor before enabling additional error logging

From: Paolo Bonzini
Date: Tue Nov 10 2020 - 11:08:40 EST


On 10/11/20 16:50, Borislav Petkov wrote:
I was thinking of
having a mapping between f/m/s and a list of MSRs which those models
have - even non-architectural ones - but that's a waste of energy. Why?
Because using the *msr_safe() variants will give you the same thing

Yes, pretty much.

If it makes sense to emulate certain non-architectural MSRs we can add them.
See above - probably not worth the effort.

When we do, certain Microsoft OSes are usually involved. :)

I'll take a look at how ugly it would become to make the majority of MSR
accesses safe.

I think most of them already are, especially the non-architectural ones, because I remember going through a similar discussion a few years ago and Andy said basically "screw it, let's just use *_safe anywhere" as well. I don't see any need to do anything but add it to your review checklist if you have it (and do it now for MSR_ERROR_CONTROL).

Paolo