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/[email protected]/ -Sergiy
