From nobody Sun May 5 21:04:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+69087+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+69087+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608195067; cv=none; d=zohomail.com; s=zohoarc; b=Bgr8SRXmScbmB+EhQI44yM3E4WPvl/P+usZzOyaUHebNs1q0u0dXsfyALGeUa/+GSBjWtsYs4Xeb5SX0v/Dcinvs4j0ZK0b3jPzBhebQ72xGt/Y3tCw2f7C0d/I2IUcTLkO/hgxmMxN01ILtTmKzdtw+syKDYk3NgPxsOpeq0X0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608195067; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=kzCCsdWyT0y7fudHfwg5tGqWDaUnxZO0KVodq/Yh2gI=; b=I/zn5xJOpj33zq7dD0zcNITZBV+MyqMLNzwnhMN3ljpMkMAoCVw6vCCIucCFyvgyedJnvNOxi39amnWrNpcALKNvfeN+rf2CD6DoSlu3ckr6gAxhU2fnuIGTbxx8sWKlHjtp8KpuXPqHBxlbcaRta1hs+D78v9eEpojQZ95ta8E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+69087+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1608195067577850.2006467225821; Thu, 17 Dec 2020 00:51:07 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id YkW8YY1788612xKJX2q8NjxU; Thu, 17 Dec 2020 00:51:07 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web09.5168.1608195066027587838 for ; Thu, 17 Dec 2020 00:51:06 -0800 X-Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-147-AUjzO-rEP0aQeB74dx5eTA-1; Thu, 17 Dec 2020 03:51:00 -0500 X-MC-Unique: AUjzO-rEP0aQeB74dx5eTA-1 X-Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8CDD3107ACF5; Thu, 17 Dec 2020 08:50:58 +0000 (UTC) X-Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-246.ams2.redhat.com [10.36.112.246]) by smtp.corp.redhat.com (Postfix) with ESMTP id D791418210; Thu, 17 Dec 2020 08:50:56 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Eric Dong , Guo Dong , James Bottomley , Rahul Kumar , Ray Ni , Thomas Lendacky Subject: [edk2-devel] [PATCH] Revert "UefiCpuPkg/CpuDxe: Fix boot error" Date: Thu, 17 Dec 2020 09:50:55 +0100 Message-Id: <20201217085055.15131-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com X-Gm-Message-State: rPLS6MWRfurNZFphMEmKMm8ox1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1608195067; bh=kzCCsdWyT0y7fudHfwg5tGqWDaUnxZO0KVodq/Yh2gI=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=uQskOzDqdpspKvZK6uUnfL1mHbDJhmRTtDJv903DkClkKV8VrKLASWbq28LISJlSjhg h8Hy1VdB9Hse0tjHKgN2FtlBYpvRMtq6b4bvegmxOruayZarqEt7Ygc1MEKzllAi0Xj08 pRDiUaNq/WtfBVMIslUnTuXp6arVu/K9WXQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" This reverts commit cee5b0441af39dd6f76cc4e0447a1c7f788cbb00. Commit cee5b0441af3 ("UefiCpuPkg/CpuDxe: Fix boot error", 2020-12-08) breaks CpuDxe (and with it, OVMF boot) on AMD processors. AMD processors cannot do far jumps to 64-bit targets, as documented in the AMD64 Architecture Programmer's Manual. Revert the patch until a RETFQ-based substitute is posted. Cc: Eric Dong Cc: Guo Dong Cc: James Bottomley Cc: Rahul Kumar Cc: Ray Ni Cc: Thomas Lendacky Ref: https://edk2.groups.io/g/devel/message/68597 Ref: https://www.redhat.com/archives/edk2-devel-archive/2020-December/msg00= 493.html Reported-by: Thomas Lendacky Ref: https://edk2.groups.io/g/devel/message/68832 Ref: https://www.redhat.com/archives/edk2-devel-archive/2020-December/msg00= 737.html Reported-by: James Bottomley Signed-off-by: Laszlo Ersek --- Notes: The broken patch was committed on December 8th; Tom reported the regression the next day, and James reported it independently on Dec 14th/15th (dependent on one's time zone). =20 Nine days after merging the broken patch, I've only seen "pondering" of how we should fix the issue. I'll tell you how: I'm going to merge this revert later today unless I see a patch that implements the RETFQ-based replacement. =20 Regressing code and not working diligently to address the problem is unacceptable. UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm b/UefiCpuPkg/CpuDxe/X64/CpuA= sm.nasm index 6ad32b49f4ef..c3489bcc3e89 100644 --- a/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm +++ b/UefiCpuPkg/CpuDxe/X64/CpuAsm.nasm @@ -23,8 +23,8 @@ ASM_PFX(SetCodeSelector): sub rsp, 0x10 lea rax, [setCodeSelectorLongJump] mov [rsp], rax - mov [rsp+8], cx - jmp qword far [rsp] + mov [rsp+4], cx + jmp dword far [rsp] setCodeSelectorLongJump: add rsp, 0x10 ret --=20 2.19.1.3.g30247aa5d201 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#69087): https://edk2.groups.io/g/devel/message/69087 Mute This Topic: https://groups.io/mt/79032725/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-