From a92c96551436eaf686d8bfa8212332819a4cc49a Mon Sep 17 00:00:00 2001 From: Ceping Sun Date: Tue, 19 Sep 2023 21:26:16 -0400 Subject: [PATCH] Update TdVtpmReportStatus consistent with spec Signed-off-by: Ceping Sun --- src/protocol/src/report_status/mod.rs | 11 ++++------- src/vtpmtd/src/vtpm/spdm_server.rs | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/protocol/src/report_status/mod.rs b/src/protocol/src/report_status/mod.rs index 601fda6..9e80919 100644 --- a/src/protocol/src/report_status/mod.rs +++ b/src/protocol/src/report_status/mod.rs @@ -18,11 +18,8 @@ pub enum TdVtpmReportStatus { NetworkError = 5, SecureSessionError = 6, MutualAttestationError = 7, - MigPolicyError = 8, - InvalidOperation = 9, - UserTdAlreadyExist = 10, - UserTdNotFound = 11, - ExceedMaxConnection = 12, - ExceedMaxTpmInstance = 13, - InternalError = 0xff, + VtpmMigPolicyError = 8, + VtpmInstanceAlreadyStarted = 9, + VtpmInstanceNotStarted = 0xA, + VtpmTdInternalError = 0xff, } diff --git a/src/vtpmtd/src/vtpm/spdm_server.rs b/src/vtpmtd/src/vtpm/spdm_server.rs index 9c4e187..a7953be 100644 --- a/src/vtpmtd/src/vtpm/spdm_server.rs +++ b/src/vtpmtd/src/vtpm/spdm_server.rs @@ -90,7 +90,7 @@ pub extern "C" fn start_spdm_server() { &[], vtpm_id, rsp_packet.operation(), - TdVtpmReportStatus::InvalidOperation as u8, + TdVtpmReportStatus::InvalidParameter as u8, ); continue; } @@ -102,7 +102,7 @@ pub extern "C" fn start_spdm_server() { &[], vtpm_id, operation as u8, - TdVtpmReportStatus::InvalidOperation as u8, + TdVtpmReportStatus::VtpmInstanceNotStarted as u8, ); continue; }