On 28/10/2022 12:49, Roger Pau Monne wrote:
> Add MSR_VIRT_SPEC_CTRL to the list of MSRs handled by
> hvm_load_cpu_msrs(), or else it would be lost.
>
> Fixes: 8ffd5496f4 ('amd/msr: implement VIRT_SPEC_CTRL for HVM guests on top 
> of SPEC_CTRL')
> Signed-off-by: Roger Pau Monné <roger....@citrix.com>
> ---
> I'm confused as to why we have two different list of MSR to send and
> load, one in msrs_to_send[] and the other open-coded in
> hvm_load_cpu_msrs(), but given the release status it's no time to
> clean that up.

It's necessary (for now).

guest_wrmsr() started as only safe in current context.  The conversion
work (to make it safe in remote-but-paused context) is in progress.

e.g. guest_wrmsr()'s call into vmce_wrmsr() will malfunction in
non-current context.  There are probably others (although I think most
of problem went away when restructured the handlers.)

The list is the list of MSRs is the subset known safe for remote
writes.  It should be dropped when guest_wrmsr() is fully safe.

~Andrew

Reply via email to