From nobody Mon Feb 9 16:02:53 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1565354443; cv=none; d=zoho.com; s=zohoarc; b=FUsbnJxn08CxVlxmpplcAbTp7mI7Ai4fXQGru7osWV6LfQ/z/6fhY04hL6+chGAFScRxaKVbhRz6JocTRJn+LJAjgIiOHog41sZ8TXbDskou39goHeBhAu522Aog9o8Ud3jgvsYVvZszWVcBOHh1X2dqZ5THBQyb4td77j6l3BQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565354443; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=vncWJDACsRDTrZomAFEPhdE57v9w7DJG/C6nynY2vfI=; b=gh/Lsm2AeeKmP0ftOE592YtV0XLWv/KTkNoLz4NCMp5v73OniENzEj+NY4R3YX1rSXTnRNxu96/MLfylVyF/MY5s+GxypoAmJZRgKiHtbmclJywWq6GzZF+O0psOFdd1IEJHhuQi12KE3zmq4fsZd9Y7JdRqZl8eoKnX7/9o/bU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1565354443057388.8986015573489; Fri, 9 Aug 2019 05:40:43 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hw4BC-0003rx-0z; Fri, 09 Aug 2019 12:39:34 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hw4BB-0003rs-Al for xen-devel@lists.xenproject.org; Fri, 09 Aug 2019 12:39:33 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id bbe4ad90-baa2-11e9-8980-bc764e045a96; Fri, 09 Aug 2019 12:39:31 +0000 (UTC) X-Inumbo-ID: bbe4ad90-baa2-11e9-8980-bc764e045a96 Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@citrix.com; spf=Pass smtp.mailfrom=Andrew.Cooper3@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of andrew.cooper3@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.hc3370-68.iphmx.com: domain of Andrew.Cooper3@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="Andrew.Cooper3@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: OxgKCIi1c8dpcHZwq/PkZyZqn7zCNNdTmTDKMtpiPNBTQrP5B9pWTDp1mcolj9AdjCt+k40rlI ngvdbjyR/6zSHYOgGuPvyjx40rBlUgNDArX4ytHwdf9J6rRmejKxctW+g6QZg25WaD+kgWOwh9 MgkUzyHB/cVYtpxi1ARSXvAFFHr88fX+0wf1b9y3WRLNVQ7JOW3tdb4dnkj6yC8RtZQeDyA+8O cLHyyAI6DuQ8Xy7LOUpMQwkto+1ONv+BF0XNE969Fz/HdTKwhUptR2PDxzQcIwwKOP4OdewLX2 6/I= X-SBRS: 2.7 X-MesageID: 4217963 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,364,1559534400"; d="scan'208";a="4217963" From: Andrew Cooper To: Xen-devel Date: Fri, 9 Aug 2019 13:39:27 +0100 Message-ID: <20190809123927.29751-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 3/2] x86/desc: Drop __HYPERVISOR_CS32 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Xen, being 64bit only these days, has no use for a 32bit Ring 0 code segmen= t. Delete __HYPERVISOR_CS32 and remove it from the GDTs. Also delete __HYPERVISOR_CS64 and use __HYPERVISOR_CS uniformly. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/acpi/wakeup_prot.S | 2 +- xen/arch/x86/boot/x86_64.S | 2 +- xen/arch/x86/desc.c | 12 ++++-------- xen/include/asm-x86/config.h | 4 +--- xen/include/asm-x86/desc.h | 4 ++-- 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/xen/arch/x86/acpi/wakeup_prot.S b/xen/arch/x86/acpi/wakeup_pro= t.S index 4a92627436..9e9fcc1ab6 100644 --- a/xen/arch/x86/acpi/wakeup_prot.S +++ b/xen/arch/x86/acpi/wakeup_prot.S @@ -74,7 +74,7 @@ ENTRY(__ret_point) LOAD_GREG(sp) =20 /* Reload code selector */ - pushq $(__HYPERVISOR_CS64) + pushq $__HYPERVISOR_CS leaq 1f(%rip),%rax pushq %rax lretq diff --git a/xen/arch/x86/boot/x86_64.S b/xen/arch/x86/boot/x86_64.S index f762dfea11..5ab24d73fc 100644 --- a/xen/arch/x86/boot/x86_64.S +++ b/xen/arch/x86/boot/x86_64.S @@ -23,7 +23,7 @@ ENTRY(__high_start) popf =20 /* Reload code selector. */ - pushq $(__HYPERVISOR_CS64) + pushq $__HYPERVISOR_CS leaq 1f(%rip),%rax pushq %rax lretq diff --git a/xen/arch/x86/desc.c b/xen/arch/x86/desc.c index b5c9208164..7d9940d08a 100644 --- a/xen/arch/x86/desc.c +++ b/xen/arch/x86/desc.c @@ -31,7 +31,7 @@ __section(".data.page_aligned") __aligned(PAGE_SIZE) seg_desc_t boot_gdt[PAGE_SIZE / sizeof(seg_desc_t)] =3D { /* 0xe008 - Ring 0 code, 64bit mode */ - [SEL2GDT(__HYPERVISOR_CS64)] =3D { 0x00af9b000000ffff }, + [SEL2GDT(__HYPERVISOR_CS)] =3D { 0x00af9b000000ffff }, =20 /* 0xe010 - Ring 0 data */ [SEL2GDT(__HYPERVISOR_DS32)] =3D { 0x00cf93000000ffff }, @@ -47,9 +47,7 @@ seg_desc_t boot_gdt[PAGE_SIZE / sizeof(seg_desc_t)] =3D /* 0xe033 - Ring 3 code, 64-bit mode */ [SEL2GDT(FLAT_RING3_CS64)] =3D { 0x00affb000000ffff }, =20 - /* 0xe038 - Ring 0 code, compatibility */ - [SEL2GDT(__HYPERVISOR_CS32)] =3D { 0x00cf9b000000ffff }, - + /* 0xe038 - reserved */ /* 0xe040 - TSS */ /* 0xe050 - LDT */ =20 @@ -61,7 +59,7 @@ __section(".data.page_aligned") __aligned(PAGE_SIZE) seg_desc_t boot_compat_gdt[PAGE_SIZE / sizeof(seg_desc_t)] =3D { /* 0xe008 - Ring 0 code, 64bit mode */ - [SEL2GDT(__HYPERVISOR_CS64)] =3D { 0x00af9b000000ffff }, + [SEL2GDT(__HYPERVISOR_CS)] =3D { 0x00af9b000000ffff }, =20 /* 0xe010 - Ring 0 data */ [SEL2GDT(__HYPERVISOR_DS32)] =3D { 0x00cf93000000ffff }, @@ -78,9 +76,7 @@ seg_desc_t boot_compat_gdt[PAGE_SIZE / sizeof(seg_desc_t)= ] =3D /* 0xe033 - Ring 3 data */ [SEL2GDT(FLAT_COMPAT_RING3_DS)] =3D { 0x00cff3000000ffff }, =20 - /* 0xe038 - Ring 0 code, compatibility */ - [SEL2GDT(__HYPERVISOR_CS32)] =3D { 0x00cf9b000000ffff }, - + /* 0xe038 - reserved */ /* 0xe040 - TSS */ /* 0xe050 - LDT */ =20 diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h index 6e4f28d934..22dc795eea 100644 --- a/xen/include/asm-x86/config.h +++ b/xen/include/asm-x86/config.h @@ -264,9 +264,7 @@ extern unsigned char boot_edid_info[128]; =20 #endif =20 -#define __HYPERVISOR_CS64 0xe008 -#define __HYPERVISOR_CS32 0xe038 -#define __HYPERVISOR_CS __HYPERVISOR_CS64 +#define __HYPERVISOR_CS 0xe008 #define __HYPERVISOR_DS64 0x0000 #define __HYPERVISOR_DS32 0xe010 #define __HYPERVISOR_DS __HYPERVISOR_DS64 diff --git a/xen/include/asm-x86/desc.h b/xen/include/asm-x86/desc.h index 80aa254206..4b29dac259 100644 --- a/xen/include/asm-x86/desc.h +++ b/xen/include/asm-x86/desc.h @@ -155,7 +155,7 @@ do { = \ ((unsigned long)(dpl) << 45) | \ ((unsigned long)(type) << 40) | \ ((unsigned long)(addr) & 0xFFFFUL) | \ - ((unsigned long)__HYPERVISOR_CS64 << 16) | \ + ((unsigned long)__HYPERVISOR_CS << 16) | \ (1UL << 47); \ } while (0) =20 @@ -169,7 +169,7 @@ static inline void _set_gate_lower(idt_entry_t *gate, u= nsigned long type, ((unsigned long)(dpl) << 45) | ((unsigned long)(type) << 40) | ((unsigned long)(addr) & 0xFFFFUL) | - ((unsigned long)__HYPERVISOR_CS64 << 16) | + ((unsigned long)__HYPERVISOR_CS << 16) | (1UL << 47); _write_gate_lower(gate, &idte); } --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel