From nobody Sat May 4 17:59:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=1566222230; cv=none; d=zoho.com; s=zohoarc; b=lufDtuLlw4P2jHwqzBQlj0TKeUtX083p00X5u1gUZlbMDGLFZVDFCYHYSi99avG0U9fXy6DgOI4p8VQ7RuDcTXBkaBNYZPvhxz9ncuUSGwcSWQSNUA522J4cfbg9dzUkmq0c7quurw1RAwa3AkISf65D6MwHpvewq6UKnrE1GEQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566222230; 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=UJEeO2QnVOMccrjtA9fWyDai2fcqLBbrNGZpJizgNc4=; b=UhXBGMqIayR3o8N4UjVuRsIHwG00KtnT53LIJtMTW7FkrZJhvC8h+rUN6MN8kUmClOn8upaTOWzCh5/iWWtzMI61s5qBplh12lyx0lEFMI7sp3YwVtuMNJK6MrEbZZZZnTIsuir1n+Ns4OMBw+ipSjwy/yBIWmpC82RUl4BYQpg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1566222230134734.000450703595; Mon, 19 Aug 2019 06:43:50 -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 1hzhvR-0003AA-Jq; Mon, 19 Aug 2019 13:42:21 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hzhvP-00039u-V4 for xen-devel@lists.xenproject.org; Mon, 19 Aug 2019 13:42:19 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 29858da2-c287-11e9-8bec-12813bfff9fa; Mon, 19 Aug 2019 13:42:18 +0000 (UTC) X-Inumbo-ID: 29858da2-c287-11e9-8bec-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1566222139; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yfWRkhDyGXfdkAnMnsIJwCE9Pk3nvcWfx+V+LFcI9+s=; b=S+RYKqAgfdGhjcjBQlHZpKtSxdNwYpONFD8MZmQea2NUYKn62g4MON1r Z+9NTVL9BIlDc1LMPRZEXzRhAFmDtu9BsAgesmlFlXK554HONd/r0asDR HWgjvnu56jDsW4Jq3rOxaol/WWpFJMkDEgeSSWGgx6TRdapViLhfU8+Bf w=; Authentication-Results: esa2.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 (esa2.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=esa2.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.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=esa2.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 (esa2.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=esa2.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: FfhpFYRtLMePUtP0TscbUxuHsNavc6neOCFjIAbuMlYc6ZQ+3suue0fWy2hYoMZg6F0LTdOthU 2AfVZMoAtAIqJ0oj+GobgdPhAYMFjuDufe+mq2MOMhcHse+IOpXmYxGLv26EBbr12dNfmpO2Jf obVkrboYFU34z+bIe90lTPbXMaSbpS0XaxXHBJepzZAm0k22Ra+5XeijXrqrklrpn21/om9D7f obZEQiBLbDEi4CBBAxLjeh3P9kOoXqS+PI1vDSWv7A1Vj6oa/Z2BBnMiJt8xUQa+mLeGS0FeOg kXY= X-SBRS: 2.7 X-MesageID: 4422947 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,405,1559534400"; d="scan'208";a="4422947" From: Andrew Cooper To: Xen-devel Date: Mon, 19 Aug 2019 14:42:12 +0100 Message-ID: <20190819134213.1628-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190819134213.1628-1-andrew.cooper3@citrix.com> References: <20190819134213.1628-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] x86/boot: Reposition trampoline data 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" X-ZohoMail-DKIM: fail (Header signature does not verify) ... to separate code from data. In particular, trampoline_realmode_entry's write to trampoline_cpu_started clobbers the I-cache line containing trampoline_protmode_entry, which won't be great for AP startup. Reformat the comments for trampoline_gdt to reduce their volume. No functional change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/boot/trampoline.S | 67 ++++++++++++++++++--------------------= ---- 1 file changed, 28 insertions(+), 39 deletions(-) diff --git a/xen/arch/x86/boot/trampoline.S b/xen/arch/x86/boot/trampoline.S index 1761fc1213..1b11b4757a 100644 --- a/xen/arch/x86/boot/trampoline.S +++ b/xen/arch/x86/boot/trampoline.S @@ -59,45 +59,6 @@ GLOBAL(trampoline_realmode_entry) lmsw %ax # CR0.PE =3D 1 (enter protected = mode) ljmpl $BOOT_CS32,$bootsym_rel(trampoline_protmode_entry,6) =20 -trampoline_gdt: - /* 0x0000: unused */ - .quad 0x0000000000000000 - /* 0x0008: ring 0 code, 32-bit mode */ - .quad 0x00cf9b000000ffff - /* 0x0010: ring 0 code, 64-bit mode */ - .quad 0x00af9b000000ffff - /* 0x0018: ring 0 data */ - .quad 0x00cf93000000ffff - /* 0x0020: real-mode code @ BOOT_TRAMPOLINE */ - .long 0x0000ffff - .long 0x00009b00 - /* 0x0028: real-mode data @ BOOT_TRAMPOLINE */ - .long 0x0000ffff - .long 0x00009300 - /* - * 0x0030: ring 0 Xen data, 16 MiB size, base - * address is computed at runtime. - */ - .quad 0x00c0930000000fff -.Ltramopline_gdt_end: - - .pushsection .trampoline_rel, "a" - .long trampoline_gdt + BOOT_PSEUDORM_CS + 2 - . - .long trampoline_gdt + BOOT_PSEUDORM_DS + 2 - . - .popsection - -GLOBAL(trampoline_misc_enable_off) - .quad 0 - -GLOBAL(cpuid_ext_features) - .long 0 - -GLOBAL(trampoline_xen_phys_start) - .long 0 - -GLOBAL(trampoline_cpu_started) - .byte 0 - .code32 trampoline_protmode_entry: /* Set up a few descriptors: on entry only CS is guaranteed good. = */ @@ -186,6 +147,34 @@ idt_48: .word 0, 0, 0 # base =3D limit =3D 0 gdt_48: .word .Ltramopline_gdt_end - trampoline_gdt - 1 .long bootsym_rel(trampoline_gdt,4) =20 +trampoline_gdt: + .quad 0x0000000000000000 /* 0x0000: unused */ + .quad 0x00cf9b000000ffff /* 0x0008: ring 0 code, 32-bit mode */ + .quad 0x00af9b000000ffff /* 0x0010: ring 0 code, 64-bit mode */ + .quad 0x00cf93000000ffff /* 0x0018: ring 0 data */ + .quad 0x00009b000000ffff /* 0x0020: real-mode code @ BOOT_TRAMPO= LINE */ + .quad 0x000093000000ffff /* 0x0028: real-mode data @ BOOT_TRAMPO= LINE */ + .quad 0x00c0930000000fff /* 0x0030: ring 0 Xen data, 16M @ XEN */ +.Ltramopline_gdt_end: + + /* Relocations for trampoline Real Mode segments. */ + .pushsection .trampoline_rel, "a" + .long trampoline_gdt + BOOT_PSEUDORM_CS + 2 - . + .long trampoline_gdt + BOOT_PSEUDORM_DS + 2 - . + .popsection + +GLOBAL(trampoline_misc_enable_off) + .quad 0 + +GLOBAL(cpuid_ext_features) + .long 0 + +GLOBAL(trampoline_xen_phys_start) + .long 0 + +GLOBAL(trampoline_cpu_started) + .byte 0 + /* The first page of trampoline is permanent, the rest boot-time only. */ /* Reuse the boot trampoline on the 1st trampoline page as stack for wakeu= p. */ .equ wakeup_stack, trampoline_start + PAGE_SIZE --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel