From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by mx.groups.io with SMTP id smtpd.web11.3044.1676490668596553776 for ; Wed, 15 Feb 2023 11:51:08 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@google.com header.s=20210112 header.b=ERNR8KE6; spf=pass (domain: flex--vannapurve.bounces.google.com, ip: 209.85.219.201, mailfrom: 3qzftywokbfqrwjjwlqnrackkcha.ykizarahazgy.cnkqlo.ek@flex--vannapurve.bounces.google.com) Received: by mail-yb1-f201.google.com with SMTP id e191-20020a2537c8000000b009433a21be0dso2252002yba.19 for ; Wed, 15 Feb 2023 11:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=n9K8iL8wP9m21wQbF5oistA8tSirHQWcAP5uIZo6UQo=; b=ERNR8KE6Uflc2rzk25nxAzbZvVwPqTOcT2jUL1ChEYYRGSXHjauRoHQfdxt3QFBAY7 NixAg9PvznHV+BD0K+FoAezvhGWwwAruOZkr4whShunbc4PPIlYIeNAqexQ0FLg8obOH zGDds3zuOHXdRHm+xX4EdcTMptbRDZItzXra+YK25zJfoabzTX20TKy4hKYJND2vzZLG HQbVbbGzYGmpoMDYVre2nl+Wb1DAwH69hSjBDxYfh8pxgaw5Vn+O8DBx7btLePoGcdk/ 88K7sVCYOs679K/I4VJCj+ypPiawKeeCnJImC54DdfgK1uQh8FDuoYSpWh7bnJNNAckr 7/3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=n9K8iL8wP9m21wQbF5oistA8tSirHQWcAP5uIZo6UQo=; b=dr2UvKLW4nUzhS+Hohm8esKpgF5yhl9NzlarN4yto162zJVwkDRWguW6+MXDCjt4cR sya7TvTxkv0YnjNf6SrMcpavM04kBRqakpzMLxArpb2VEkqqykRhvYajAAbDGQGglSwX dzRWAdNXGM2uyBGX4A4te7jcZScbxXaaziGsql68b8nT3ExxOJB8nH8wZMulNriEfin8 FnplMAu0I3k8xVUIEjcY1h1jRA7yZl6h5BkQpGxmBp7wP2ZA/nYtfu/EH+2azefJTSfv rKinaNIitUVf/YPLLcIktPt7CPdY/wgnoZQOSYG89fI7cDcBDstlzfdsTVTsVvz0K67V BLnw== X-Gm-Message-State: AO0yUKUypk9g3tdcbxMO0uDj+TSX5O6Mfs4lVOxpu6EfaNjBXPNKrdti +5URo2JIJ2cxgvzr2MBbbV/zMvbefBxpLkLhnG/xYKt7XduCVnlk45jDsyGApbIaN2r97dz+Wvq Be2C+h9tV7rcbabldAkB9sdL14mpPX9pqR+O7mZNJMcYqvgEkuiVYKYvrwrGAw1vfAG5ccA== X-Google-Smtp-Source: AK7set8SRM+xWcqJOdBPWeVnnkl3r4blE5hiv5c4KaUft2onVjycjRoq5bwvYtQrsM5skJ3YteqeAiW9wJA/CPxX X-Received: from vannapurve2.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:41f8]) (user=vannapurve job=sendgmr) by 2002:a05:6902:18ce:b0:8e3:6aea:973 with SMTP id ck14-20020a05690218ce00b008e36aea0973mr1ybb.4.1676490667245; Wed, 15 Feb 2023 11:51:07 -0800 (PST) Date: Wed, 15 Feb 2023 19:50:42 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.39.1.637.g21b0678d19-goog Message-ID: <20230215195042.1094110-1-vannapurve@google.com> Subject: [V1 PATCH 1/1] MdePkg: TDX: Correct TDCALL_INFO_RETURN_DATA layout From: "Vishal Annapurve" To: devel@edk2.groups.io Cc: michael.d.kinney@intel.com, gaoliming@byosoft.com.cn, zhiguang.liu@intel.com, min.m.xu@intel.com, erdemaktas@google.com, jiewen.yao@intel.com, Vishal Annapurve Content-Type: text/plain; charset="UTF-8" TDCALL_INFO should return num_vcpus as lower 4 bytes of r8 register according to the tdx spec, so reorder num_vcpus and max_vcpus fields to match the spec. Reference: Table 22.210 TDG.VP.INFO output operands https://cdrdv2.intel.com/v1/dl/getContent/733568 Signed-off-by: Vishal Annapurve --- MdePkg/Include/IndustryStandard/Tdx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdePkg/Include/IndustryStandard/Tdx.h b/MdePkg/Include/IndustryStandard/Tdx.h index 81df136184..a17be61353 100644 --- a/MdePkg/Include/IndustryStandard/Tdx.h +++ b/MdePkg/Include/IndustryStandard/Tdx.h @@ -111,8 +111,8 @@ typedef struct { typedef struct { UINT64 Gpaw; UINT64 Attributes; - UINT32 MaxVcpus; UINT32 NumVcpus; + UINT32 MaxVcpus; UINT64 Resv[3]; } TDCALL_INFO_RETURN_DATA; -- 2.39.1.637.g21b0678d19-goog