From nobody Sun Apr 12 22:39:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass header.i=teddy.astie@vates.tech; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=vates.tech ARC-Seal: i=1; a=rsa-sha256; t=1775637323; cv=none; d=zohomail.com; s=zohoarc; b=mw7xqvGsXWuwEMnyuZ/wpjOWfgrLSJZMKUQcLjh0Ka97eLrfOsPQc911A0loI1HF5yv55tCvpQcnuFETWutgLXP7gptrKJebCHT46pbG5tL1CdrGLeALePrhGRMySraKf+MdQ00d+YS6vULDGqvN9KIUyo+SBV4yzkhAxPNmp4s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775637323; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=V15Ycdk9jaZJ7+p5Gd4ld56W5KMrZofjseDMn4uinCw=; b=ASoxacKPsjMXfkzd0eKoTGGiYxw27jidVvfPBCzcp+LQPengMgi1WaX24/b1t61I0PiE7rqGyBul123mJbUGnYVpwmo/ojRANXaN17HnJ2Lm6hsXt4B+tYEQABuD/1Xm/IlRccLlkcHtI9lkrMcc2F2wC5RlsFlxX4mp0mNHuxE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=teddy.astie@vates.tech; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1775637323826557.3348304390086; Wed, 8 Apr 2026 01:35:23 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1275493.1561284 (Exim 4.92) (envelope-from ) id 1wAONA-0006Tc-EE; Wed, 08 Apr 2026 08:34:52 +0000 Received: by outflank-mailman (output) from mailman id 1275493.1561284; Wed, 08 Apr 2026 08:34:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wAONA-0006TV-AJ; Wed, 08 Apr 2026 08:34:52 +0000 Received: by outflank-mailman (input) for mailman id 1275493; Wed, 08 Apr 2026 08:34:51 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wAON9-0006TP-5t for xen-devel@lists.xenproject.org; Wed, 08 Apr 2026 08:34:51 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wAON8-009DM5-C7 for xen-devel@lists.xenproject.org; Wed, 08 Apr 2026 10:34:50 +0200 Received: from [10.42.69.5] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 69d6131c-5cb7-0a2a0a5109dd-0a2a4505862c-32 for ; Wed, 08 Apr 2026 10:34:50 +0200 Received: from [198.2.180.46] (helo=mail180-46.suw31.mandrillapp.com) by tlsNG-c201ff.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.0) (envelope-from ) id 69d61329-3760-0a2a45050019-c602b42e3004-3 for ; Wed, 08 Apr 2026 10:34:50 +0200 Received: from pmta11.mandrill.prod.suw01.rsglab.com (localhost [127.0.0.1]) by mail180-46.suw31.mandrillapp.com (Mailchimp) with ESMTP id 4frGZw5TVNz8XRyK6 for ; Wed, 8 Apr 2026 08:34:48 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id 71da37fbec604bb4a1412d3b56c179dc; Wed, 08 Apr 2026 08:34:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=mte1 header.d=mandrillapp.com header.i="@mandrillapp.com" header.h="From:Subject:To:Cc:Message-Id:Feedback-ID:Date:MIME-Version:Content-Type:Content-Transfer-Encoding"; dkim=pass header.s=mte1 header.d=vates.tech header.i="teddy.astie@vates.tech" header.h="From:Subject:To:Cc:Message-Id:Feedback-ID:Date:MIME-Version:Content-Type:Content-Transfer-Encoding" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1775637288; x=1775907288; bh=V15Ycdk9jaZJ7+p5Gd4ld56W5KMrZofjseDMn4uinCw=; h=From:Subject:To:Cc:Message-Id:Feedback-ID:Date:MIME-Version: Content-Type:Content-Transfer-Encoding:CC:Date:Subject:From; b=yIZZ9DxNIY4TQwh20gN21UE8RKXrlhr2iNaYiIVs2S3KuVX4DtA0VlBdZNtS0sxcm KuTnNDZXwI1rw9TOMcbBTYHvDAUxjwklvlTGYWlgHPyqvvE34HTkO+uuBt/2RKq1qP CIUu8A2MNIIO81vbsE0YUHEYsx8yn/uCopl3aSF6vvERwi/K/2OEl/FIoE7P7EVdYD LzU+1rV1AQGWESBpr69kTCQ9Nah4jCg3e13fy4HDXW8m8p0t53MRbv8NHJq9V4tQEE yMUfoLwwKr1sBw7dIo2GPzWxZpkopSFj/sOcHn30N+VQsVPmYOB6we6Nm0/PstWVgr GtxobKm5drJ1w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1775637288; x=1775897788; i=teddy.astie@vates.tech; bh=V15Ycdk9jaZJ7+p5Gd4ld56W5KMrZofjseDMn4uinCw=; h=From:Subject:To:Cc:Message-Id:Feedback-ID:Date:MIME-Version: Content-Type:Content-Transfer-Encoding:CC:Date:Subject:From; b=uyfT7i8Jl5sXFyTNuSFyTYLTM7VcDTfPHjuVSuzL9sZ+r4cdxSUDjvI0DAcQfXrMN Sgc/0X8TQ1llFmAPMOZPiw4o6WehraWlmvL4WO4GM3idLhUiPOHPk3VLBp50Z8VqTa TKNatiOXfWwjE06qREau4I039QkOc/5dZthUfKFhpr82FnmuRiagUQCZn7h0Tjx095 yCI7guG7EmcJ27qBYN0OBnSTIXN31zwN7b59tALAYN3sXCMCLk+qbbJFrmTD0zYOyg Od0X8LXOZN7rnofXcC1uFrd+FC6ZkH249mB2yqXpKasJUBPjQ7S6dSnmYYETuzX6q8 EcNgSsc6XEZ+Q== From: "Teddy Astie" Subject: =?utf-8?Q?[PATCH]=20x86/emul:=20Remove=20ops->{read,write}=5Fsegment=20checks=20for=20swapgs?= X-Mailer: git-send-email 2.53.0 X-Bm-Disclaimer: Yes X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1775637287689 To: xen-devel@lists.xenproject.org Cc: "Teddy Astie" , "Jan Beulich" , "Andrew Cooper" , "=?utf-8?Q?Roger=20Pau=20Monn=C3=A9?=" Message-Id: X-Native-Encoded: 1 X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.71da37fbec604bb4a1412d3b56c179dc?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20260408:md Date: Wed, 08 Apr 2026 08:34:48 +0000 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-c201ff/1775637290-21B3896F-1106AE6A/0/0 X-purgate-type: clean X-purgate-size: 1193 X-ZohoMail-DKIM: pass (identity @mandrillapp.com) (identity teddy.astie@vates.tech) X-ZM-MESSAGEID: 1775637326980154100 Content-Type: text/plain; charset="utf-8" Remove these checks now that we don't use these 2 ops anymore. Amends: 4bedbe47eef4f ("x86/emul: Remove fallback path from SWAPGS") Signed-off-by: Teddy Astie Reviewed-by: Andrew Cooper --- xen/arch/x86/x86_emulate/0f01.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/arch/x86/x86_emulate/0f01.c b/xen/arch/x86/x86_emulate/0f0= 1.c index 54bd6faf0f..4d36c7d289 100644 --- a/xen/arch/x86/x86_emulate/0f01.c +++ b/xen/arch/x86/x86_emulate/0f01.c @@ -187,8 +187,7 @@ int x86emul_0f01(struct x86_emulate_state *s, case 0xf8: /* swapgs */ generate_exception_if(!mode_64bit(), X86_EXC_UD); generate_exception_if(!mode_ring0(), X86_EXC_GP, 0); - fail_if(!ops->read_segment || !ops->read_msr || - !ops->write_segment || !ops->write_msr); + fail_if(!ops->read_msr || !ops->write_msr); if ( (rc =3D ops->read_msr(MSR_GS_BASE, &sreg.base, ctxt)) !=3D X86EMUL_OKAY || (rc =3D ops->read_msr(MSR_SHADOW_GS_BASE, &msr_val, --=20 2.53.0 -- Teddy Astie | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech