[edk2-devel] [PATCH] OvmfPkg/ResetVector: Fix assembler bit test flag check

Gerd Hoffmann kraxel at redhat.com
Tue Sep 19 07:59:28 UTC 2023


On Fri, Jul 14, 2023 at 03:28:26PM -0500, Tom Lendacky wrote:
> Commit 63c50d3ff2854a76432b752af4f2a76f33ff1974 changed the check that is
> used to determine if SEV-ES is active. Originally, a CMP instruction with
> a supporting JZ instruction was used for the check. It was changed to use
> the BT instruction but not JZ instruction. The result of a BT instruction
> changes the the carry flag (CF) and not the zero flag (ZF). As a result,
> the wrong condition is being checked. Update the JZ to a JNC to properly
> detect if SEV-ES is active.

What is the effect of this bug?  Is it just the encryption sanity check
being skipped?

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108817): https://edk2.groups.io/g/devel/message/108817
Mute This Topic: https://groups.io/mt/100149226/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list