On 15.03.2022 15:18, Roger Pau Monne wrote: > Use the logic to set shadow SPEC_CTRL values in order to implement > support for VIRT_SPEC_CTRL (signaled by VIRT_SSBD CPUID flag) for HVM > guests. This includes using the spec_ctrl vCPU MSR variable to store > the guest set value of VIRT_SPEC_CTRL.SSBD, which will be OR'ed with > any SPEC_CTRL values being set by the guest. > > On hardware having SPEC_CTRL VIRT_SPEC_CTRL will not be offered by > default to guests. VIRT_SPEC_CTRL will only be part of the max CPUID > policy so it can be enabled for compatibility purposes. > > Note that '!' is used in order to tag the VIRT_SSBD feature as > specially handled. It's possible for the feature to be available to > guests on hardware that doesn't support it natively, for example when > implemented as done by this patch on top of SPEC_CTRL.SSBD (AMD_SSBD).
Except for this ! aspect the change looks good to me, but in order to give my R-b this aspect needs sorting. Andrew - what are your thoughts here? The reason cited by Roger doesn't look to be one that I so far understood would require use of !, but your intentions may well have been different from what my current understanding is. Jan