[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] x86/pv: Provide better SYSCALL backwards compatibility in FRED mode


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 31 Mar 2026 08:31:18 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vheqAJQ4ojLcTi+UsnqYL89G2/5RVLOWRianD+yHNKM=; b=qnuwUSDnQGCRgK2uc2McYcME93jgeghjf75Juy0lIL8Kx4PSfW8rPQ2TXu5zeNxzEgVTNh0nbAxVjP9x4c0wK3ZL8bLG1E8WoFeFx9z3LdGTyB0agXArY8hE2ci5Zj8iZ6RvQW7rW6ruq1nHhN53wyrow92dCO5KLjpNHBrpBtJp94nXOqOC7JSq5f1r+MqQ7YsAOT+5kefvFAZpVA4OAJzm6bTkwG0q9iw84PD9inpEDDR0iZJXQZjIRDDJrcqluEjmWGl5UQm1hD/HScQZ1Dofbi/Uk5Lz3cZmOKpRLxANonh1q5wPTQxrL2kYifYZd5SQ8K1QB9WeV39HC5cnvQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YD3f62DJklE4myL5oJ60AQaAX11XMFXICXME7/Jw6MyrKkoLyXmT5HZ9e2OixlvtOpNm9jtr6FUMDWdMZASgQWAKy7Nem8/G+Apy4cqDVyjm5aqcszSzdxgygeFYm5+ySJKsEJ1evXXvrWmoIwSutJ+jZyW2vrLvnhifjHz0vOcGBiX7WW/R0rdJbkr58jkVEL+8pbev+D8mJjRcmqUECW/uxAunnjungE4FOmRLBMeTZgTkdIYGJFoopotF2ZVVx5n4xU5tiPMd9TqLIVCjQVcMu/i72UPCSnKyBaEQ++LdE3Hwiat5Eesjis/3kbVnrHK8FYRPZEzVfGMXEoMnNg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 31 Mar 2026 07:31:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 27/03/2026 8:50 am, Jan Beulich wrote:
> On 26.03.2026 22:05, Andrew Cooper wrote:
>> On 26/03/2026 9:14 am, Jan Beulich wrote:
>>> Don't you also need to set TRAP_syscall here, for the new code in
>>> eretu_exit_to_guest to actually make a difference?
>> It is create_bounce_frame() which sets up TRAP_syscall.
> Hmm, right. I was misled by {l,c}star_enter and sysenter_entry setting
> the flag explicitly. That looks to be necessary only for the pv_hypercall()
> path out of lstar_enter; everything else goes through create_bounce_frame().

Oh, that's a can of worms in and of itself.

The hypercall page preserves %rcx/%r11 around the SYSCALL instruction,
but that's not captured in
https://xenbits.xen.org/docs/latest/guest-guide/x86/hypercall-abi.html

Given that we're now explicitly supporting the use of hypercalls without
the hypercall page for CFI hardening reasons, I guess I need to fix that.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.