On 3/23/23 10:34, Woodhouse, David wrote:
On Thu, 2023-03-23 at 08:16 -0500, Tom Lendacky wrote:
Maybe call this sev_early_get_cpuid_0b() or such to imply that the MSR
protocol is being used and only retrieving / returning edx.
Or indeed sev_early_get_apicid() since that's what it's actually doing,
and the caller doesn't care *how*.
Sounds good.
Also, since it is a function now and can be used at any point, the current
GHCB MSR should be saved on entry and restored on exit.
Well, I don't know that it should be callable at any point. This is
only supposed to be called from head_64.S.
I agree. But once it's there, someone somewhere in the future may look and
go, oh, I can call this. So I think it either needs a nice comment above
it about how it is currently used/called and what to do if it needs to be
called from someplace other than head_64.S or the MSR needs to be
saved/restored.
Thanks,
Tom
Amazon Development Centre (London) Ltd. Registered in England and Wales with registration number 04543232 with its registered office at 1 Principal Place, Worship Street, London EC2A 2FA, United Kingdom.