[PATCH -v2] x86/msr: Filter MSR writes

From: Gyan Gupta
Date: Mon Jun 22 2020 - 10:21:08 EST


From: Borislav Petkov <bp@xxxxxxxxx>

> The whitelist is still TBD, I might be able to remove it competely and defer the
> whole whitelisting to the future. when people start reporting MSRs (see
> pr_err_ratelimited() call below).

I am also working on a similar functionality where we allow specific MSRs(whitelisted MSRs) to be allowed to read & write.
Additionally, writes are subjected to checks where only certain bits can be allowed to be modified. This is to increase security & safety of system.
For example, MCi_CTL can be used to enable/disable error reporting of hw unit. So in our use case once error reporting is enabled, it must
not be disabled. Also we want to have restrictions on rdmsr for security purposes.

- Gyan