summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMin M Xu <min.m.xu@intel.com>2023-01-18 07:53:01 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-01-18 05:54:59 +0000
commit998ebe5ca0ae5c449e83ede533bee872f97d63af (patch)
treea2a9b4c3f5136e063bcf6d00749e80879f830cd4
parent5c7a61135326d7f7f564e4bd11dcf78fe0ce1759 (diff)
downloadedk2-998ebe5ca0ae5c449e83ede533bee872f97d63af.tar.gz
edk2-998ebe5ca0ae5c449e83ede533bee872f97d63af.tar.bz2
edk2-998ebe5ca0ae5c449e83ede533bee872f97d63af.zip
OvmfPkg/CcExitLib: Initialize Status in IoExit
Status should be initialized otherwise it may return unexpected value. Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Michael Roth <michael.roth@amd.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
-rw-r--r--OvmfPkg/Library/CcExitLib/CcExitVeHandler.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
index b8979ec2c0..2c1de0039d 100644
--- a/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
+++ b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
@@ -109,10 +109,11 @@ IoExit (
UINT64 RepCnt;
UINT64 Status;
- Val = 0;
- Write = Veinfo->ExitQualification.Io.Direction ? FALSE : TRUE;
- Size = Veinfo->ExitQualification.Io.Size + 1;
- Port = Veinfo->ExitQualification.Io.Port;
+ Val = 0;
+ Status = 0;
+ Write = Veinfo->ExitQualification.Io.Direction ? FALSE : TRUE;
+ Size = Veinfo->ExitQualification.Io.Size + 1;
+ Port = Veinfo->ExitQualification.Io.Port;
if (Veinfo->ExitQualification.Io.String) {
//