On Mon, Oct 26, 2020 at 07:27:06PM +0100, Borislav Petkov wrote: > A couple of lines above you call get_sev_encryption_bit() which already > reads MSR_AMD64_SEV. Why not set sev_status there too instead of reading > that MSR again here? > > It can read that MSR once and use sev_status(%rip) from then on to avoid > reading that MSR multiple times...
Right, makes sense. I updated the patch.