From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Xenia Ragiadakou" <xenia.ragiadakou@amd.com>,
"Sergiy Kibrik" <Sergiy_Kibrik@epam.com>,
"George Dunlap" <george.dunlap@citrix.com>,
"Andrei Semenov" <andrei.semenov@vates.fr>,
"Vaishali Thakkar" <vaishali.thakkar@vates.tech>,
Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 4/5] x86/svm: Switch SVM features over normal cpu_has_*
Date: Tue, 30 Apr 2024 15:25:36 +0200 [thread overview]
Message-ID: <8e5cd297-ef1c-4f6c-b8e4-5d7135fbf78f@suse.com> (raw)
In-Reply-To: <20240429151625.977884-5-andrew.cooper3@citrix.com>
On 29.04.2024 17:16, Andrew Cooper wrote:
> @@ -2493,38 +2491,14 @@ const struct hvm_function_table * __init start_svm(void)
>
> setup_vmcb_dump();
>
> - if ( boot_cpu_data.extended_cpuid_level >= 0x8000000aU )
> - svm_feature_flags = cpuid_edx(0x8000000aU);
> -
> - printk("SVM: Supported advanced features:\n");
> -
> /* DecodeAssists fast paths assume nextrip is valid for fast rIP update. */
> - if ( !cpu_has_svm_nrips )
> - __clear_bit(SVM_FEATURE_DECODEASSISTS, &svm_feature_flags);
> + if ( !cpu_has_nrips )
> + setup_clear_cpu_cap(X86_FEATURE_DECODE_ASSIST);
Should we grow any alternatives patching based on this feature (or any
other which someone might later add clearing of next to here as well),
this is too late: alternative_instructions() runs a bit earlier than
do_presmp_initcalls(). If this is to be kept, a comment towards the
possible pitfall is imo required.
Jan
next prev parent reply other threads:[~2024-04-30 13:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-29 15:16 [PATCH 0/5] x86: AMD CPUID handling improvements Andrew Cooper
2024-04-29 15:16 ` [PATCH 1/5] x86/cpu-policy: Infrastructure for the AMD SVM and SEV leaves Andrew Cooper
2024-04-30 12:45 ` Jan Beulich
2024-04-30 13:25 ` Andrew Cooper
2024-04-30 13:33 ` Jan Beulich
2024-05-01 9:16 ` George Dunlap
2024-04-29 15:16 ` [PATCH 2/5] x86/cpu-policy: Add SVM features already used by Xen Andrew Cooper
2024-04-29 15:24 ` Andrew Cooper
2024-04-30 13:02 ` Jan Beulich
2024-05-01 10:00 ` George Dunlap
2024-05-01 10:39 ` Andrew Cooper
2024-05-01 10:51 ` George Dunlap
2024-04-29 15:16 ` [PATCH 3/5] x86/spec-ctrl: Remove open-coded check of SVM_FEATURE_SPEC_CTRL Andrew Cooper
2024-04-30 13:13 ` Jan Beulich
2024-04-29 15:16 ` [PATCH 4/5] x86/svm: Switch SVM features over normal cpu_has_* Andrew Cooper
2024-04-30 5:51 ` Vaishali Thakkar
2024-04-30 13:25 ` Jan Beulich [this message]
2024-04-29 15:16 ` [PATCH 5/5] x86/cpu-policy: Introduce some SEV features Andrew Cooper
2024-04-30 6:15 ` Vaishali Thakkar
2024-04-30 13:54 ` Jan Beulich
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=8e5cd297-ef1c-4f6c-b8e4-5d7135fbf78f@suse.com \
--to=jbeulich@suse.com \
--cc=Sergiy_Kibrik@epam.com \
--cc=andrei.semenov@vates.fr \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=vaishali.thakkar@vates.tech \
--cc=xen-devel@lists.xenproject.org \
--cc=xenia.ragiadakou@amd.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).