Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TEST] OvmfPkg: Update for TDVF #5640

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sunceping
Copy link
Contributor

No description provided.

@sunceping sunceping force-pushed the disableS3intdvf.v1 branch 3 times, most recently from 0c78aca to ffca56b Compare May 9, 2024 01:46
@sunceping sunceping force-pushed the disableS3intdvf.v1 branch 2 times, most recently from e7c6e6c to 68ebb65 Compare May 29, 2024 08:47
Refer to the section 2.1 of tdx-virtual-firmware-design-guide spec,
APCI S3 is not support in Tdx-Guest.

Therefore, TDVF should not read the S3 status via fw_cfg and always
set it to unsupported.

Refernce:
spec: https://cdrdv2.intel.com/v1/dl/getContent/733585

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
In the current code, TDVF reads the PcdSetNxForStack value via fw_cfg
but does not use it and overwrites it with a fixed value.

To reduce the invalid reads and extra logic code, TDVF should not read
the value via fw_cfg and remove the extra code.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
Currently, TDVF gets LowMemory and FistNonAddress from the e820tables
via fw_cfg, while TD-Hob can also provide LowMemory and FistNonAddress.

From the security perspective, e820tables is the externa data from VMM
and is untrusted data, while TdHob is trusted data since it was measured
in early phase by TDVF.

Therefor TDVF should use TdHob to instead of e820table for the memory info.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
Refer to the comments"This happens on (virtual) AMD machines
with 1TB address space " in PlatformReservationConflictCB,
it will not take effect in TDVF and should not be invoked.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant