mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "H. Peter Anvin" <hpa@zytor.com>,
	"Lai, Yi" <yi1.lai@linux.intel.com>, Xin Li <xin@zytor.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Dave Hansen <dave.hansen@intel.com>,
	yi1.lai@intel.com, bp@alien8.de, dave.hansen@linux.intel.com,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	luto@kernel.org, mingo@redhat.com, shuah@kernel.org,
	tglx@kernel.org, x86@kernel.org
Subject: Re: [PATCH] selftests/x86: Fix sysret_rip assertion failure on FRED systems
Date: Tue, 24 Mar 2026 14:08:14 +0000	[thread overview]
Message-ID: <f55dd646-c728-4b0e-ab3e-18da8ac9e6e2@citrix.com> (raw)
In-Reply-To: <0200a8d8-6871-4ff2-8c6a-968c2cb39a4f@zytor.com>

On 23/03/2026 8:27 pm, H. Peter Anvin wrote:
> On 2026-03-23 12:17, Andrew Cooper wrote:
>> This doesn't really test whether FRED is active.  It tests whether the
>> OS is not providing strict backwards compatibility, and I think will
>> malfunction when there's a hypervisor above Linux providing strict
>> backwards compatibility.
>>
> But that applies equally to IRET, no? If the hypervisor clobbers the segment
> selector like IRET would in the interest of compatibility then you have the
> same issue.

I suppose.  I for one don't care to provide that level of compatibility.

But for SYSCALL, what are Linux's plans for CRIU or RR ?  I had to fix
SYSCALL legacy behaviour in Xen for the following case:

* PV guest issues SYSCALL on FRED system.  %rcx/%r11 not clobbered
* Migrate to a non-FRED system
* Xen uses a real SYSRET instruction to resume execution


Here, the guest continues executing at whichever dead variable is in %rcx.

CRIU/RR won't be exactly the same, but will suffer the same class of
problem when moving between FRED and non-FRED systems.

~Andrew

  reply	other threads:[~2026-03-24 14:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20  6:33 Yi Lai
2026-03-20 14:31 ` Dave Hansen
2026-03-20 15:47   ` Andrew Cooper
2026-03-20 15:50     ` Dave Hansen
2026-03-22  6:13       ` Xin Li
2026-03-23  6:06         ` Lai, Yi
2026-03-23 16:19           ` Xin Li
2026-03-23 19:11           ` H. Peter Anvin
2026-03-23 19:17             ` Andrew Cooper
2026-03-23 20:27               ` H. Peter Anvin
2026-03-24 14:08                 ` Andrew Cooper [this message]
2026-03-24 14:33                   ` H. Peter Anvin
2026-03-24 14:46                     ` Andrew Cooper
2026-03-24 15:16                       ` H. Peter Anvin
2026-03-22 20:08       ` H. Peter Anvin
2026-03-23  5:55       ` Lai, Yi
2026-03-23 16:39         ` Andrew Cooper
2026-03-24  1:28           ` Lai, Yi
2026-03-24 11:08 ` David Laight
2026-03-24 14:31   ` H. Peter Anvin

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=f55dd646-c728-4b0e-ab3e-18da8ac9e6e2@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=shuah@kernel.org \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    --cc=xin@zytor.com \
    --cc=yi1.lai@intel.com \
    --cc=yi1.lai@linux.intel.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

Powered by JetHome