On 31/03/2021 17:02, Jan Beulich wrote: > On 31.03.2021 12:32, Roger Pau Monne wrote: >> EOIs are always executed in guest vCPU context, so there's no reason to >> pass a vCPU parameter around as can be fetched from current. >> >> While there make the vector parameter of both callbacks unsigned int. >> >> No functional change intended. >> >> Suggested-by: Paul Durrant <pdurr...@amazon.com> >> Signed-off-by: Roger Pau Monné <roger....@citrix.com> >> Reviewed-by: Paul Durrant <p...@xen.org> >> --- >> Changes since v1: >> - New in this version. > I'm afraid the situation with viridian_synic_wrmsr() hasn't changed > since v2, and hence my previous comment still applies.
Only just spotted that line of reasoning. Longterm, I do want to remove all the Viridian special cases, and handle all of the state via architectural mechanisms (cpu policy for static settings, and the existing MSR records for dynamic content). A consequence of this cleanup is that guest_{rd,wr}msr() will be eventually be used to save/restore dynamic state in the migrate stream, which is why I've been engineering guest_{rd,wr}msr() to work for MSRs in "current || !scheduled" context. As such, it is important to retain a vcpu pointer because it will not be current on the save/restore hypercalls, which execute in control domain context. How much is keeping the vcpu pointer going to interfere with this series? My expectation is that this patch would need reverting to continue the cleanup plans. ~Andrew