From nobody Fri Apr 19 10:13:08 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+85664+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+85664+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1642091448; cv=none; d=zohomail.com; s=zohoarc; b=nIIS6iAdwR2AULAsB9aeU1Z8Ogd+25NtT/c+xRZry+o5OHd3VQD/HDzPKLGbK7PEmaMDZCaGlrDB11JLFZDDweP0smn8ET3rWzOxQQU6mZgOB8oqpvy8aKg7KrkkHHJHwn5bgp53JaxI+I7qwMndHX1rH4/AkxEjxJJ2NbJha0g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642091448; h=Content-Type:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=PC7Fxmxc20LCAKPlN0y0aYG0mYalfUV76aaARs20GMU=; b=S/K1UvDKw9YrkoDZRz9T6ylrcvEwflrnk6lpXdbmjxSgWg8ahPdRUy0X6nrFkJjGRx5JdvOt2npOGkgI5VLQy+v/u+YYcpj5ddWiQlR/6Mk5A7ORrO+SLeLRHsphiRxAJ+WX4YL/6cuzFy54P5qkavUF6HVuvTeJ9E8TkKPrlc4= 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+85664+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1642091448379449.8181039512307; Thu, 13 Jan 2022 08:30:48 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 3uhnYY1788612xhtyuwMF74v; Thu, 13 Jan 2022 08:30:48 -0800 X-Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) by mx.groups.io with SMTP id smtpd.web10.11001.1642091447523719466 for ; Thu, 13 Jan 2022 08:30:47 -0800 X-Received: by mail-pg1-f201.google.com with SMTP id t18-20020a63dd12000000b00342725203b5so189923pgg.16 for ; Thu, 13 Jan 2022 08:30:47 -0800 (PST) X-Gm-Message-State: scns9Hbc80hEEiDCOgV7nghBx1787277AA= X-Google-Smtp-Source: ABdhPJyOqsHHjKpgpK4wP7XafTT08QdyTpfodHjrchQD1IZyQYEi2Xc3KWc+vC9zgu4fRxzKPmXe4hPWjNQ= X-Received: from pgonda1.kir.corp.google.com ([2620:15c:29:203:cc6d:a07f:db7:214d]) (user=pgonda job=sendgmr) by 2002:a17:902:6906:b0:149:7087:355c with SMTP id j6-20020a170902690600b001497087355cmr5070683plk.153.1642091446564; Thu, 13 Jan 2022 08:30:46 -0800 (PST) Date: Thu, 13 Jan 2022 08:30:43 -0800 Message-Id: Mime-Version: 1.0 Subject: [edk2-devel] [PATCH v2] OvmfPkg/ResetVector: Removing SEV-ES CPUID bit check From: "Peter Gonda via groups.io" To: devel@edk2.groups.io Cc: Peter Gonda , James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Laszlo Ersek , Erdem Aktas , Brijesh Singh , Marc Orr Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,pgonda@google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1642091448; bh=feqzOUNQM+yk1BQ1j3KEwiMSuLrqUK7rUyunPm7mwXI=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=rqYmhfe2b3E5HOLqzdVgLB/hWRstoBxDUNVhaVg4gdGcMmdsC2Z/6HVxx1D4BpzfooF OjpNXPD1UYvETBUyn0u4TieaP+OvOYT8bbGf2FkwfqQbBdWXegdab273kkPJaXw9ZSP/T LjHouIWXVvn2XkinRINOOEesX6MW/+2zU8M= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1642091449269100002 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The SEV-ES bit of Fn800-001F[EAX] - Bit 3 is used for a host to determine support for running SEV-ES guests. It should not be checked by a guest to determine if it is running under SEV-ES. The guest should use the SEV_STATUS MSR Bit 1 to determine if SEV-ES is enabled. This check was not part of the original SEV-ES support and was added in a91b700e38. Removing the check makes this code consistent with the Linux kernel Fixes: a91b700e38 (Ovmf/ResetVector: Simplify and consolidate the SEV featu= res checks) Cc: James Bottomley Cc: Min Xu Cc: Jiewen Yao Cc: Tom Lendacky Cc: Jordan Justen Cc: Ard Biesheuvel Cc: Laszlo Ersek Cc: Erdem Aktas Cc: Brijesh Singh Cc: Erdem Aktas Cc: Marc Orr Signed-off-by: Peter Gonda Acked-by: Tom Lendacky --- OvmfPkg/ResetVector/Ia32/AmdSev.asm | 8 -------- 1 file changed, 8 deletions(-) diff --git a/OvmfPkg/ResetVector/Ia32/AmdSev.asm b/OvmfPkg/ResetVector/Ia32= /AmdSev.asm index 1f827da3b9..77692db27e 100644 --- a/OvmfPkg/ResetVector/Ia32/AmdSev.asm +++ b/OvmfPkg/ResetVector/Ia32/AmdSev.asm @@ -265,14 +265,6 @@ CheckSevFeatures: ; Set the work area header to indicate that the SEV is enabled mov byte[WORK_AREA_GUEST_TYPE], 1 =20 - ; Check for SEV-ES memory encryption feature: - ; CPUID Fn8000_001F[EAX] - Bit 3 - ; CPUID raises a #VC exception if running as an SEV-ES guest - mov eax, 0x8000001f - cpuid - bt eax, 3 - jnc GetSevEncBit - ; Check if SEV-ES is enabled ; MSR_0xC0010131 - Bit 1 (SEV-ES enabled) mov ecx, SEV_STATUS_MSR --=20 2.34.1.575.g55b058a8bb-goog -=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 (#85664): https://edk2.groups.io/g/devel/message/85664 Mute This Topic: https://groups.io/mt/88400388/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-