|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH v2 5/5] x86/amd: optional build of amd.c
On 29.08.2024 11:48, Sergiy Kibrik wrote:
> 19.08.24 15:36, Jan Beulich:
>> On 16.08.2024 13:19, Sergiy Kibrik wrote:
>>> --- a/xen/arch/x86/hvm/svm/svm.c
>>> +++ b/xen/arch/x86/hvm/svm/svm.c
>>> @@ -919,7 +919,8 @@ static void cf_check svm_ctxt_switch_from(struct vcpu
>>> *v)
>>> * Possibly clear previous guest selection of SSBD if set. Note that
>>> * SPEC_CTRL.SSBD is already handled by svm_vmexit_spec_ctrl.
>>> */
>>> - if ( v->arch.msrs->virt_spec_ctrl.raw & SPEC_CTRL_SSBD )
>>> + if ( IS_ENABLED(CONFIG_AMD) &&
>>> + v->arch.msrs->virt_spec_ctrl.raw & SPEC_CTRL_SSBD )
>>> {
>>> ASSERT(v->domain->arch.cpuid->extd.virt_ssbd);
>>> amd_set_legacy_ssbd(false);
>>> @@ -953,7 +954,8 @@ static void cf_check svm_ctxt_switch_to(struct vcpu *v)
>>> wrmsr_tsc_aux(v->arch.msrs->tsc_aux);
>>>
>>> /* Load SSBD if set by the guest. */
>>> - if ( v->arch.msrs->virt_spec_ctrl.raw & SPEC_CTRL_SSBD )
>>> + if ( IS_ENABLED(CONFIG_AMD) &&
>>> + v->arch.msrs->virt_spec_ctrl.raw & SPEC_CTRL_SSBD )
>>> {
>>> ASSERT(v->domain->arch.cpuid->extd.virt_ssbd);
>>> amd_set_legacy_ssbd(true);
>> Instead of these changes, shouldn't AMD_SVM become dependent upon AMD in
>> Kconfig?
>
> It could be done earlier, yet I haven't done so since we briefly touched
> this before and decided not to link {AMD,INTEL} with {AMD_SVM,INTEL_VMX}
> then:
>
> https://lore.kernel.org/xen-devel/9a973f18-e0af-456c-8b07-6869f044519e@xxxxxxxxxx/
Yet that only suggests that e.g HYGON also ought to select AMD_SVM. Which
will happen transitively with HYGON selecting AMD (in the earlier patch).
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |