Re: [RFC Part1 PATCH 06/13] x86/compressed: rescinds and validate the memory used for the GHCB

From: Borislav Petkov
Date: Wed Apr 07 2021 - 07:16:11 EST


On Tue, Apr 06, 2021 at 10:47:18AM -0500, Brijesh Singh wrote:
> Before the GHCB is established the caller does not need to save and
> restore MSRs. The page_state_change() uses the GHCB MSR protocol and it
> can be called before and after the GHCB is established hence I am saving
> and restoring GHCB MSRs.

I think you need to elaborate on that, maybe with an example. What the
other sites using the GHCB MSR currently do is:

1. request by writing it
2. read the response

None of them save and restore it.

So why here?

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette