Re: [PATCH v4 0/3] Allow user space to restrict and augment MSR emulation

From: Jim Mattson
Date: Wed Aug 19 2020 - 22:47:54 EST


On Wed, Aug 19, 2020 at 3:09 PM Jim Mattson <jmattson@xxxxxxxxxx> wrote:
>
> On Wed, Aug 19, 2020 at 2:46 PM Graf (AWS), Alexander <graf@xxxxxxxxx> wrote:
>
> > Special MSRs like EFER also irritate me a bit. We can't really trap on them - most code paths just know they're handled in kernel. Maybe I'll add some sanity checks as well...
>
> Why can't we intercept EFER?

Some MSRs (IA32_GSBASE comes to mind) can't be completely handled by
userspace, even if we do intercept RDMSR and WRMSR. The EFER.LMA bit
also falls into that category, though the rest of the register isn't a
problem (and EFER.LMA is always derivable). Is that what you meant?