Excerpts from Fabiano Rosas's message of October 16, 2021 11:45 pm: > Nicholas Piggin <npiggin@xxxxxxxxx> writes: > >> This reduces the number of mtmsrd required to enable facility bits when >> saving/restoring registers, by having the KVM code set all bits up front >> rather than using individual facility functions that set their particular >> MSR bits. >> >> Signed-off-by: Nicholas Piggin <npiggin@xxxxxxxxx> > > Reviewed-by: Fabiano Rosas <farosas@xxxxxxxxxxxxx> > > Aside: at msr_check_and_set what's with MSR_VSX always being implicitly > set whenever MSR_FP is set? I get that it depends on MSR_FP, but if FP > always implies VSX, then you could stop setting MSR_VSX in this patch. Good question, this seems to come from quite old code and is carried forward. I did not immediately see why, might have been to avoid another mtmsrd operation if we later want to set VSX. But the rule seems to be to set MSR_VSX if both FP and VEC are set, so this seems a bit odd. __msr_check_and_clear similarly clears VSX if we clear FP, but not if we clear VEC. I might be good to remove that logic or turn it into warnings and make sure the callers do the right thing. Not sure. Thanks, Nick