On Wed, Jul 22, 2020 at 11:55:29AM +0100, Andrew Cooper wrote: > Both the read and write side have commonalities which can be abstracted away. > This also allows for additional safety in release builds, and slightly more > helpful diagnostics in debug builds. > > Signed-off-by: Andrew Cooper <[email protected]>
Reviewed-by: Roger Pau Monné <[email protected]> > --- > CC: Jan Beulich <[email protected]> > CC: Wei Liu <[email protected]> > CC: Roger Pau Monné <[email protected]> > > I'm not a massive fan of the global scope want_rdmsr_safe boolean, but I can't > think of a reasonable way to fix it without starting to use other > flexibiltiies offered to us by C99. (And to preempt the other question, an > extra set of braces makes extremely confusing to read logic.) The logic could be moved to a helper that takes a expected_safe or some such parameter, but I think I prefer this approach. Thanks, Roger.
