All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Sergiy Kibrik <sergiy_kibrik@epam.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [XEN PATCH v2 5/5] x86/amd: optional build of amd.c
Date: Thu, 29 Aug 2024 12:02:54 +0200	[thread overview]
Message-ID: <697bbad5-e545-4847-9228-56dc6e07bd21@suse.com> (raw)
In-Reply-To: <7e798639-98f4-4b7b-bab3-14f4f6da51d0@epam.com>

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@citrix.com/

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


      reply	other threads:[~2024-08-29 10:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1723806405.git.Sergiy_Kibrik@epam.com>
2024-08-16 11:10 ` [XEN PATCH v2 1/5] x86/Kconfig: introduce CENTAUR, HYGON & SHANGHAI config options Sergiy Kibrik
2024-08-16 13:16   ` Alejandro Vallejo
2024-08-19  8:53   ` Jan Beulich
2024-08-29  9:29     ` Sergiy Kibrik
2024-08-16 11:12 ` [XEN PATCH v2 2/5] x86/amd: configurable handling of AMD-specific MSRs access Sergiy Kibrik
2024-08-19 12:21   ` Jan Beulich
2024-08-16 11:14 ` [XEN PATCH v2 3/5] x86/spec-ctrl: configurable Intlel/AMD-specific calculations Sergiy Kibrik
2024-08-19 12:28   ` Jan Beulich
2024-08-29 19:25   ` Andrew Cooper
2024-08-30  7:41     ` Jan Beulich
2024-08-16 11:17 ` [XEN PATCH v2 4/5] x86/intel: optional build of intel.c Sergiy Kibrik
2024-08-19 12:31   ` Jan Beulich
2024-08-16 11:19 ` [XEN PATCH v2 5/5] x86/amd: optional build of amd.c Sergiy Kibrik
2024-08-19 12:36   ` Jan Beulich
2024-08-29  9:48     ` Sergiy Kibrik
2024-08-29 10:02       ` Jan Beulich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=697bbad5-e545-4847-9228-56dc6e07bd21@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=sergiy_kibrik@epam.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.