From patchwork Wed Aug 7 11:34:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 11081929 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5531D112C for ; Wed, 7 Aug 2019 11:36:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42AC1289E8 for ; Wed, 7 Aug 2019 11:36:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 36FD4289F2; Wed, 7 Aug 2019 11:36:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C0B59289E8 for ; Wed, 7 Aug 2019 11:36:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hvKDY-000267-80; Wed, 07 Aug 2019 11:34:56 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hvKDX-000261-Pc for xen-devel@lists.xenproject.org; Wed, 07 Aug 2019 11:34:55 +0000 X-Inumbo-ID: 5fd1758f-b907-11e9-8980-bc764e045a96 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 5fd1758f-b907-11e9-8980-bc764e045a96; Wed, 07 Aug 2019 11:34:53 +0000 (UTC) Authentication-Results: esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.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=esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: YaoXaSCECJGWCJMDSsDg3ZdHwNMfmD0FaYyX2yrg0ZIcJ4mViRy35jAdTenY9QhNa7mZP0SlzU BpDXwZSmDKpDa052amB6/pIJ4XOfrlKfltxSvS4rzo6/6qxk4iAI1MS5hnPJmCQDHUPiA5QNuL 2D1hRV3/sxQ4PJa5Tt9jMR2Olbp8Lh1dowkFClI53DzFw+OyQ/13fwjJlz3+ubCJlyDhDpzHKM p+742nFmDZ7ex3G/WuH860azzousUoVk64FI1e3Uo51HcCNZQrerWAQZz36bD+NW0E0TNFmoPI rxM= X-SBRS: 2.7 X-MesageID: 4010750 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,357,1559534400"; d="scan'208";a="4010750" From: Andrew Cooper To: Xen-devel Date: Wed, 7 Aug 2019 12:34:39 +0100 Message-ID: <20190807113439.12802-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] x86/boot: Set Accessed bits in boot_cpu_{, compat_}gdt_table[] 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_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP There is no point causing the CPU to performed a locked update of the descriptors on first use. Reported-by: Jan Beulich Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- xen/arch/x86/boot/x86_64.S | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/xen/arch/x86/boot/x86_64.S b/xen/arch/x86/boot/x86_64.S index cf47e019f5..0eaf9d2a07 100644 --- a/xen/arch/x86/boot/x86_64.S +++ b/xen/arch/x86/boot/x86_64.S @@ -55,13 +55,13 @@ GLOBAL(stack_start) .align PAGE_SIZE, 0 GLOBAL(boot_cpu_gdt_table) .quad 0x0000000000000000 /* unused */ - .quad 0x00af9a000000ffff /* 0xe008 ring 0 code, 64-bit mode */ - .quad 0x00cf92000000ffff /* 0xe010 ring 0 data */ + .quad 0x00af9b000000ffff /* 0xe008 ring 0 code, 64-bit mode */ + .quad 0x00cf93000000ffff /* 0xe010 ring 0 data */ .quad 0x0000000000000000 /* reserved */ - .quad 0x00cffa000000ffff /* 0xe023 ring 3 code, compatibility */ - .quad 0x00cff2000000ffff /* 0xe02b ring 3 data */ - .quad 0x00affa000000ffff /* 0xe033 ring 3 code, 64-bit mode */ - .quad 0x00cf9a000000ffff /* 0xe038 ring 0 code, compatibility */ + .quad 0x00cffb000000ffff /* 0xe023 ring 3 code, compatibility */ + .quad 0x00cff3000000ffff /* 0xe02b ring 3 data */ + .quad 0x00affb000000ffff /* 0xe033 ring 3 code, 64-bit mode */ + .quad 0x00cf9b000000ffff /* 0xe038 ring 0 code, compatibility */ .fill (PER_CPU_GDT_ENTRY - __HYPERVISOR_CS32 / 8 - 1), 8, 0 .quad 0x0000910000000000 /* per-CPU entry (limit == cpu) */ @@ -70,13 +70,13 @@ GLOBAL(boot_cpu_gdt_table) /* (compatibility) machine->physical mapping table lives there. */ GLOBAL(boot_cpu_compat_gdt_table) .quad 0x0000000000000000 /* unused */ - .quad 0x00af9a000000ffff /* 0xe008 ring 0 code, 64-bit mode */ - .quad 0x00cf92000000ffff /* 0xe010 ring 0 data */ - .quad 0x00cfba000000ffff /* 0xe019 ring 1 code, compatibility */ - .quad 0x00cfb2000000ffff /* 0xe021 ring 1 data */ - .quad 0x00cffa000000ffff /* 0xe02b ring 3 code, compatibility */ - .quad 0x00cff2000000ffff /* 0xe033 ring 3 data */ - .quad 0x00cf9a000000ffff /* 0xe038 ring 0 code, compatibility */ + .quad 0x00af9b000000ffff /* 0xe008 ring 0 code, 64-bit mode */ + .quad 0x00cf93000000ffff /* 0xe010 ring 0 data */ + .quad 0x00cfbb000000ffff /* 0xe019 ring 1 code, compatibility */ + .quad 0x00cfb3000000ffff /* 0xe021 ring 1 data */ + .quad 0x00cffb000000ffff /* 0xe02b ring 3 code, compatibility */ + .quad 0x00cff3000000ffff /* 0xe033 ring 3 data */ + .quad 0x00cf9b000000ffff /* 0xe038 ring 0 code, compatibility */ .fill (PER_CPU_GDT_ENTRY - __HYPERVISOR_CS32 / 8 - 1), 8, 0 .quad 0x0000910000000000 /* per-CPU entry (limit == cpu) */ .align PAGE_SIZE, 0