From nobody Wed May 1 16:42:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1577977260; cv=none; d=zohomail.com; s=zohoarc; b=MegntjSBJ5aULpPtLvwrZuet5sykf8jhBqmzXX0J319Uofd5UAjDsEfQx2CL9L5BSTpS1P/aSCdCUjD/Dabs/6EskMIRh1AxNy0dx5zBbnAmjy6QcUdeWr2Q9Vopk732ElRPLF70Au4NqBHuo4UAZBzwL8twCEku8RJ8Z/KW7HM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1577977260; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=c5nztIEOxUbNAbjNVXES0FrVe23uTgfftsH/pu6T2cU=; b=mGo8OmdyI1N0sG6f8k28VTDXmJxCCPQeo4Agc6XgvbMG+lAroQvTEwlC9NxPMjtZoQcuFJjeuuJ2lWyTCQpHr0Sjvm1O9IfpmNqsSDYMRaySjJImnTzowvH6tT8wX9kFqeFuh8dzuBLitwbacEd0zoEPwYsON85/y3CTrBGCtB8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1577977260570484.2530436662065; Thu, 2 Jan 2020 07:01:00 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1in1x9-0002LP-BL; Thu, 02 Jan 2020 14:59:59 +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 1in1x7-0002LD-DU for xen-devel@lists.xenproject.org; Thu, 02 Jan 2020 14:59:57 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 89baca9e-2d70-11ea-a37c-12813bfff9fa; Thu, 02 Jan 2020 14:59:56 +0000 (UTC) X-Inumbo-ID: 89baca9e-2d70-11ea-a37c-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1577977196; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=sjRDIYOl9ceyQaNIJEpSnWE5i6UF/jphRt0RbeiWh+s=; b=CWuktZJdVGWTjoBSsQmM3VzY0AxerxdSlhmmMT9vB2ICmcdcnRa8jEkd SLHIkG1UJ8tHyPO8p8s0XYQfOV+pbJroayU3XQra0m+6+uzxzewR/VEm7 7SB9X0ONHLN6QQW9oiEvFFXrs3AI3SHs8BlseDyb7ohzHtN7gD94sLrYJ 8=; 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 (zohomail.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 (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 ip4:168.245.78.127 ~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: HmXv9cAy0TPiQc8KcuIsL2vZu0EapoJhudXaSNIwNrQ43yUjM5Qoee3FdgSXpmHzqG4qozlAcN B83mnrhr3xSGItDH4WUmMEXkJBppHYeJj8AgDZHxiHKmjPhIkRLDwWE+prDSVYf8XrEZ933hXO Cr4IkwUnmD4LijGwVkLAIQvfQFgwtkQMAj4UE3I2+kKh5CiR97d1BZZcdbYtNigiW/0Gi8HNZ6 B3GykfCxR0BRUT2JgS9Rno2Ztckv0cg+Am8mw/fnylbcsuih7E3G63tA04iZOd+Ux2aoGMn3QX 5m4= X-SBRS: 2.7 X-MesageID: 10533696 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.69,387,1571716800"; d="scan'208";a="10533696" From: Andrew Cooper To: Xen-devel Date: Thu, 2 Jan 2020 14:59:53 +0000 Message-ID: <20200102145953.6503-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] x86/boot: Clean up the trampoline transition into Long mode 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) The jmp after setting %cr0 is redundant with the following ljmp. The CPUID to protect the jump to higher mappings was inserted due to an abundance of caution/paranoia before Spectre was public. There is not a matching protection in the S3 resume path, and there is nothing interesting in memory at this point. 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 | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/xen/arch/x86/boot/trampoline.S b/xen/arch/x86/boot/trampoline.S index c60ebb3f00..574d1bd8f4 100644 --- a/xen/arch/x86/boot/trampoline.S +++ b/xen/arch/x86/boot/trampoline.S @@ -101,8 +101,6 @@ trampoline_protmode_entry: mov $(X86_CR0_PG | X86_CR0_AM | X86_CR0_WP | X86_CR0_NE |\ X86_CR0_ET | X86_CR0_MP | X86_CR0_PE), %eax mov %eax,%cr0 - jmp 1f -1: =20 /* Now in compatibility mode. Long-jump into 64-bit mode. */ ljmp $BOOT_CS64,$bootsym_rel(start64,6) @@ -111,26 +109,6 @@ trampoline_protmode_entry: start64: /* Jump to high mappings. */ movabs $__high_start, %rdi - -#ifdef CONFIG_INDIRECT_THUNK - /* - * If booting virtualised, or hot-onlining a CPU, sibling threads = can - * attempt Branch Target Injection against this jmp. - * - * We've got no usable stack so can't use a RETPOLINE thunk, and a= re - * further than disp32 from the high mappings so couldn't use - * JUMP_THUNK even if it was a non-RETPOLINE thunk. Furthermore, = an - * LFENCE isn't necessarily safe to use at this point. - * - * As this isn't a hotpath, use a fully serialising event to reduce - * the speculation window as much as possible. %ebx needs preserv= ing - * for __high_start. - */ - mov %ebx, %esi - cpuid - mov %esi, %ebx -#endif - jmpq *%rdi =20 #include "video.h" --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel