From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.153809.1673825274206247621 for ; Sun, 15 Jan 2023 15:27:56 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=AsRKtTzA; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673825276; x=1705361276; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7zx5cl7/Wy/qpeSFZiXwBs1ztwxgNWQS2hQkLkBKRh4=; b=AsRKtTzAp5WQQwyIwof7xuYc2qky7lo6f+BHxNOIqDlSxXtD2z30q8jJ GApUZxb4YsW4pmSKtqsb4lp9/7f8vB5hAhYbnX30ioN1uR623tkEFR/Xe jF0JIO8zn3G2R2OObowgXv82D6qC/a/qc8EFqizl2Eyh2DiUjabZgQGnZ yd3xmZVrFD+wUkWTus71RRBoOyZCFxMBz2/iCPPcV5PRKYUOxrAhSS7zl vZLkNzbstLQ9rdZ7M/kzhRE62425BIObaSTqK4kkHoZtWU+wM0dg8q21T eyAZYvMskjuVo4ADsrhhTCuYWD4gZFQndVBytirpbsHLo2unPSquntazC A==; X-IronPort-AV: E=McAfee;i="6500,9779,10591"; a="304050359" X-IronPort-AV: E=Sophos;i="5.97,219,1669104000"; d="scan'208";a="304050359" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2023 15:27:55 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10591"; a="652092343" X-IronPort-AV: E=Sophos;i="5.97,219,1669104000"; d="scan'208";a="652092343" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.249.174.76]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2023 15:27:53 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Erdem Aktas , James Bottomley , Jiewen Yao , Gerd Hoffmann , Tom Lendacky , Michael Roth Subject: [PATCH V1 1/3] OvmfPkg/CcExitLib: Initialize Status in IoExit Date: Mon, 16 Jan 2023 07:27:37 +0800 Message-Id: <20230115232739.415-2-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: <20230115232739.415-1-min.m.xu@intel.com> References: <20230115232739.415-1-min.m.xu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Min M Xu Status should be initialized otherwise it may return unexpected value. Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Tom Lendacky Cc: Michael Roth Signed-off-by: Min Xu --- OvmfPkg/Library/CcExitLib/CcExitVeHandler.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c index 30d547d5fe55..872f772a5ac8 100644 --- a/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c +++ b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c @@ -105,10 +105,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) { // -- 2.29.2.windows.2