mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH] x86/xen: simplify sysenter and syscall setup
Date: Thu, 20 Oct 2022 13:41:42 +0200	[thread overview]
Message-ID: <87deb6d1-b2e3-2560-4b49-d50819d3c4a7@suse.com> (raw)
In-Reply-To: <Y1EzXQP3/Pn3bme+@zn.tnic>


[-- Attachment #1.1.1: Type: text/plain, Size: 1226 bytes --]

On 20.10.22 13:39, Borislav Petkov wrote:
> On Thu, Oct 20, 2022 at 01:36:19PM +0200, Juergen Gross wrote:
>> xen_enable_sysenter() and xen_enable_syscall() can be simplified a lot.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>>   arch/x86/xen/setup.c | 23 ++++++-----------------
>>   1 file changed, 6 insertions(+), 17 deletions(-)
>>
>> diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
>> index cfa99e8f054b..0f33ed6d3a7b 100644
>> --- a/arch/x86/xen/setup.c
>> +++ b/arch/x86/xen/setup.c
>> @@ -910,17 +910,9 @@ static int register_callback(unsigned type, const void *func)
>>   
>>   void xen_enable_sysenter(void)
>>   {
>> -	int ret;
>> -	unsigned sysenter_feature;
>> -
>> -	sysenter_feature = X86_FEATURE_SYSENTER32;
>> -
>> -	if (!boot_cpu_has(sysenter_feature))
>> -		return;
>> -
>> -	ret = register_callback(CALLBACKTYPE_sysenter, xen_entry_SYSENTER_compat);
>> -	if(ret != 0)
>> -		setup_clear_cpu_cap(sysenter_feature);
>> +	if (boot_cpu_has(X86_FEATURE_SYSENTER32) &&
> 
> Can you switch that and below to cpu_feature_enabled() while at it, pls?
> 
>> +	if (boot_cpu_has(X86_FEATURE_SYSCALL32) &&
> 	^^^^^^^^^^^^^^^^^^

Yes, of course.


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2022-10-20 11:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 11:36 Juergen Gross
2022-10-20 11:39 ` Borislav Petkov
2022-10-20 11:41   ` Juergen Gross [this message]
2022-10-21  8:06   ` Andrew Cooper
2022-10-21  8:21     ` Juergen Gross

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=87deb6d1-b2e3-2560-4b49-d50819d3c4a7@suse.com \
    --to=jgross@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®