Date   

RFC: EXT4 filesystem driver

Pedro Falcato
 

EXT4 (fourth extended filesystem) is a filesystem developed for Linux
that has been in wide use (desktops, servers, smartphones) since 2008.

The Ext4Pkg implements the Simple File System Protocol for a partition
that is formatted with the EXT4 file system. This allows UEFI Drivers,
UEFI Applications, UEFI OS Loaders, and the UEFI Shell to access files
on an EXT4 partition and supports booting a UEFI OS Loader from an
EXT4 partition.
This project is one of the TianoCore Google Summer of Code projects.

Right now, Ext4Pkg only contains a single member, Ext4Dxe, which is a
UEFI driver that consumes Block I/O, Disk I/O and (optionally) Disk
I/O 2 Protocols, and produces the Simple File System protocol. It
allows mounting ext4 filesystems exclusively.

Brief overhead of EXT4:
Layout of an EXT2/3/4 filesystem:
(note: this driver has been developed using
https://www.kernel.org/doc/html/latest/filesystems/ext4/index.html as
documentation).

An ext2/3/4 filesystem (here on out referred to as simply an ext4 filesystem,
due to the similarities) is composed of various concepts:

1) Superblock
The superblock is the structure near (1024 bytes offset from the start)
the start of the partition, and describes the filesystem in general.
Here, we get to know the size of the filesystem's blocks, which features
it supports or not, whether it's been cleanly unmounted, how many blocks
we have, etc.

2) Block groups
EXT4 filesystems are divided into block groups, and each block group covers
s_blocks_per_group(8 * Block Size) blocks. Each block group has an
associated block group descriptor; these are present directly after the
superblock. Each block group descriptor contains the location of the
inode table, and the inode and block bitmaps (note these bitmaps are only
a block long, which gets us the 8 * Block Size formula covered previously).

3) Blocks
The ext4 filesystem is divided into blocks, of size s_log_block_size ^ 1024.
Blocks can be allocated using individual block groups's bitmaps. Note
that block 0 is invalid and its presence on extents/block tables means
it's part of a file hole, and that particular location must be read as
a block full of zeros.

4) Inodes
The ext4 filesystem divides files/directories into inodes (originally
index nodes). Each file/socket/symlink/directory/etc (here on out referred
to as a file, since there is no distinction under the ext4 filesystem) is
stored as a /nameless/ inode, that is stored in some block group's inode
table. Each inode has s_inode_size size (or GOOD_OLD_INODE_SIZE if it's
an old filesystem), and holds various metadata about the file. Since the
largest inode structure right now is ~160 bytes, the rest of the inode
contains inline extended attributes. Inodes' data is stored using either
data blocks (under ext2/3) or extents (under ext4).

5) Extents
Ext4 inodes store data in extents. These let N contiguous logical blocks
that are represented by N contiguous physical blocks be represented by a
single extent structure, which minimizes filesystem metadata bloat and
speeds up block mapping (particularly due to the fact that high-quality
ext4 implementations like linux's try /really/ hard to make the file
contiguous, so it's common to have files with almost 0 fragmentation).
Inodes that use extents store them in a tree, and the top of the tree
is stored on i_data. The tree's leaves always start with an
EXT4_EXTENT_HEADER and contain EXT4_EXTENT_INDEX on eh_depth != 0 and
EXT4_EXTENT on eh_depth = 0; these entries are always sorted by logical
block.

6) Directories
Ext4 directories are files that store name -> inode mappings for the
logical directory; this is where files get their names, which means ext4
inodes do not themselves have names, since they can be linked (present)
multiple times with different names. Directories can store entries in two
different ways:
1) Classical linear directories: They store entries as a mostly-linked
mostly-list of EXT4_DIR_ENTRY.
2) Hash tree directories: These are used for larger directories, with
hundreds of entries, and are designed in a backwards-compatible way.
These are not yet implemented in the Ext4Dxe driver.

7) Journal
Ext3/4 filesystems have a journal to help protect the filesystem against
system crashes. This is not yet implemented in Ext4Dxe but is described
in detail in the Linux kernel's documentation.

The EDK2 implementation of ext4 is based only on the public documentation
available at https://www.kernel.org/doc/html/latest/filesystems/ext4/index.html
and
the FreeBSD ext2fs driver (available at
https://github.com/freebsd/freebsd-src/tree/main/sys/fs/ext2fs,
BSD-2-Clause-FreeBSD licensed). It is licensed as
SPDX-License-Identifier: BSD-2-Clause-Patent.

After a brief discussion with the community, the proposed package
location is edk2-platform/Features/Ext4Pkg
(relevant discussion: https://edk2.groups.io/g/devel/topic/83060185).

I was the main contributor and I would like to maintain the package in
the future, if possible.

Current limitations:
1) The Ext4Dxe driver is, at the moment, read-only.
2) The Ext4Dxe driver at the moment cannot mount older (ext2/3)
filesystems. Ensuring compatibility with
those may not be a bad idea.

I intend to test the package using the UEFI SCTs present in edk2-test,
and implement any other needed unit tests myself using the already
available unit test framework. I also intend to (privately) fuzz the
UEFI driver with bad/unusual disk images, to improve the security and
reliability of the driver.

In the future, ext4 write support should be added so edk2 has a
fully-featured RW ext4 driver. There could also be a focus on
supporting the older ext4-like filesystems, as I mentioned in the
limitations, but that is open for discussion.

The driver's handling of unclean unmounting through forced shutdown is unclear.
Is there a position in edk2 on how to handle such cases? I don't think
FAT32 has a "this filesystem is/was dirty" and even though it seems to
me that stopping a system from booting/opening the partition because
"we may find some tiny irregularities" is not the best course of
action, I can't find a clear answer.

The driver also had to add implementations of CRC32C and CRC16, and
after talking with my mentor we quickly reached the conclusion that
these may be good candidates for inclusion in MdePkg. We also
discussed moving the Ucs2 <-> Utf8 conversion library in RedfishPkg
(BaseUcs2Utf8Lib) into MdePkg as well. Any comments?

Feel free to ask any questions you may find relevant.

Best Regards,

Pedro Falcato


回复: 回复: 回复: [edk2-rfc] release candidate tags

gaoliming
 

There is no other comment for this proposal. I will send it to edk2 devel mail list to collect the feedback.

Thanks
Liming

-----邮件原件-----
发件人: rfc@edk2.groups.io <rfc@edk2.groups.io> 代表 Laszlo Ersek
发送时间: 2021年6月29日 16:23
收件人: rfc@edk2.groups.io; gaoliming@...
主题: Re: 回复: 回复: [edk2-rfc] release candidate tags

On 06/29/21 04:12, gaoliming wrote:
Laszlo:
OK. I give the new proposed date for the release planning. SFF will be
shorten to 5 days. HFF will be extended to 14 days.

Date (00:00:00 UTC-8) Description
2021-05-28 Beginning of development
2021-08-09 Soft Feature Freeze
2021-08-13 Hard Feature Freeze
2021-08-27 Release
Thank you. A shorter SFF should not be a problem, as we use it anyway
only for merging previously reviewed feature patch sets.

I hope other community members are OK with this as well.

Thanks!
Laszlo


Thanks
Liming
-----邮件原件-----
发件人: rfc@edk2.groups.io <rfc@edk2.groups.io> 代表 Laszlo Ersek
发送时间: 2021年6月28日 22:19
收件人: gaoliming <gaoliming@...>; rfc@edk2.groups.io
主题: Re: 回复: [edk2-rfc] release candidate tags

On 06/25/21 04:11, gaoliming wrote:
Laszlo:
I understand this release requirement. Now, we have Feature Planning
Freeze (1WW), Soft Feature Freeze (1WW) and Hard Feature Freeze (5
days). I
would propose to remove Feature Planning Freeze, keep Soft Feature
Freeze
(1WW), and extend Hard Feature Freeze (1week and 5 days). For Q3 stable
tag, new planning will be like the below.

Date (00:00:00 UTC-8) Description
2021-05-28 Beginning of development
2021-08-09 Soft Feature Freeze
2021-08-16 Hard Feature Freeze
2021-08-27 Release
I haven't even been aware of the "planning freeze". I think we can
remove it.

Regarding the HFF, I'd really suggest / request 14 calendar days.

Thanks
Laszlo






Thanks
Liming
-----邮件原件-----
发件人: rfc@edk2.groups.io <rfc@edk2.groups.io> 代表 Laszlo Ersek
发送时间: 2021年6月22日 18:24
收件人: rfc@edk2.groups.io
抄送: Liming Gao (Byosoft address) <gaoliming@...>
主题: [edk2-rfc] release candidate tags

Hi,

(1) I'm proposing an extension to the soft feature freeze and hard
feature freeze announcements:


https://github.com/tianocore/tianocore.github.io/wiki/SoftFeatureFreeze#an
nouncing-the-soft-feature-freeze

https://github.com/tianocore/tianocore.github.io/wiki/HardFeatureFreeze#a
nnouncing-the-hard-feature-freeze

as follows:

When the SFF is announced, the Release Manager should please tag the
then-HEAD commit of the "master" branch with a Release Candidate tag
of
the form

edk2-stableYYYYMM-rc0

When the HFF is announced, the Release Manager should please tag the
then-HEAD commit of the "master" branch with a Release Candidate tag
of
the form

edk2-stableYYYYMM-rc1

Note that a single commit may bear multiple tags in the end; for
example, if there are no fixes merged between the HFF announcement
and
the actual release, then the final commit would bear both tags

edk2-stableYYYYMM-rc1
edk2-stableYYYYMM


The purpose of the Release Candidate tags is to coordinate pre-release
testing between consumers (downstreams) of edk2. Concentrated
pre-release testing is useful because it helps downstreams (a) identify
issues against a common base and (b) contribute upstream bugfixes still
in time for the actual release.


(2) Relatedly, I'm proposing that the Hard Feature Freeze never be
shorter than 2 calendar weeks.

Background: if I recall correctly, the Hard Feature Freeze for
edk2-stable202105 was 4 days. That's not enough for the
above-described,
downstream, pre-release testing. In my opinion, two calendar weeks are
sensible for the "finishing touches" on the release.

I'm not asking for an extended Soft Feature Freeze. I reckon that most
downstreams will want to start their pre-release integration and testing
at the rc1 tag. Between the rc0 and rc1 tags (that is, during the Soft
Feature Freeze), features reviewed previously may still be merged, and
those have a higher chance to invalidate downstream testing performed
earlier. So the "real" testing will likely commence at rc1, and so the
period we'd extend to 2 calendar weeks should be the Hard Feature
Freeze.

(I'm not expressing the new period length in "business days", as the
definition of those varies around the world, and over time.)

Thanks,
Laszlo


















Re: [edk2-devel] RFC: design review for TDVF in OVMF

Min Xu <min.m.xu@...>
 

Thanks much everyone who attended 2 sessions of TDVF design review meeting
and lots of valuable comments and feedbacks received. These 2 meetings were
recorded and now uploaded to below link:
Session 1:
https://drive.google.com/file/d/100__tNVe5erNzExySq2SJOprvBN7zz8u/view?usp=sharing
Session 2:
https://drive.google.com/file/d/1aDvtLhLxzniOISljXwjZH0YT_m7EBn8b/view?usp=sharing

Thank you!
Min


Re: 回复: 回复: [edk2-rfc] release candidate tags

Laszlo Ersek
 

On 06/29/21 04:12, gaoliming wrote:
Laszlo:
OK. I give the new proposed date for the release planning. SFF will be shorten to 5 days. HFF will be extended to 14 days.

Date (00:00:00 UTC-8) Description
2021-05-28 Beginning of development
2021-08-09 Soft Feature Freeze
2021-08-13 Hard Feature Freeze
2021-08-27 Release
Thank you. A shorter SFF should not be a problem, as we use it anyway
only for merging previously reviewed feature patch sets.

I hope other community members are OK with this as well.

Thanks!
Laszlo


Thanks
Liming
-----邮件原件-----
发件人: rfc@edk2.groups.io <rfc@edk2.groups.io> 代表 Laszlo Ersek
发送时间: 2021年6月28日 22:19
收件人: gaoliming <gaoliming@...>; rfc@edk2.groups.io
主题: Re: 回复: [edk2-rfc] release candidate tags

On 06/25/21 04:11, gaoliming wrote:
Laszlo:
I understand this release requirement. Now, we have Feature Planning
Freeze (1WW), Soft Feature Freeze (1WW) and Hard Feature Freeze (5 days). I
would propose to remove Feature Planning Freeze, keep Soft Feature Freeze
(1WW), and extend Hard Feature Freeze (1week and 5 days). For Q3 stable
tag, new planning will be like the below.

Date (00:00:00 UTC-8) Description
2021-05-28 Beginning of development
2021-08-09 Soft Feature Freeze
2021-08-16 Hard Feature Freeze
2021-08-27 Release
I haven't even been aware of the "planning freeze". I think we can
remove it.

Regarding the HFF, I'd really suggest / request 14 calendar days.

Thanks
Laszlo






Thanks
Liming
-----邮件原件-----
发件人: rfc@edk2.groups.io <rfc@edk2.groups.io> 代表 Laszlo Ersek
发送时间: 2021年6月22日 18:24
收件人: rfc@edk2.groups.io
抄送: Liming Gao (Byosoft address) <gaoliming@...>
主题: [edk2-rfc] release candidate tags

Hi,

(1) I'm proposing an extension to the soft feature freeze and hard
feature freeze announcements:


https://github.com/tianocore/tianocore.github.io/wiki/SoftFeatureFreeze#an
nouncing-the-soft-feature-freeze

https://github.com/tianocore/tianocore.github.io/wiki/HardFeatureFreeze#a
nnouncing-the-hard-feature-freeze

as follows:

When the SFF is announced, the Release Manager should please tag the
then-HEAD commit of the "master" branch with a Release Candidate tag of
the form

edk2-stableYYYYMM-rc0

When the HFF is announced, the Release Manager should please tag the
then-HEAD commit of the "master" branch with a Release Candidate tag of
the form

edk2-stableYYYYMM-rc1

Note that a single commit may bear multiple tags in the end; for
example, if there are no fixes merged between the HFF announcement and
the actual release, then the final commit would bear both tags

edk2-stableYYYYMM-rc1
edk2-stableYYYYMM


The purpose of the Release Candidate tags is to coordinate pre-release
testing between consumers (downstreams) of edk2. Concentrated
pre-release testing is useful because it helps downstreams (a) identify
issues against a common base and (b) contribute upstream bugfixes still
in time for the actual release.


(2) Relatedly, I'm proposing that the Hard Feature Freeze never be
shorter than 2 calendar weeks.

Background: if I recall correctly, the Hard Feature Freeze for
edk2-stable202105 was 4 days. That's not enough for the above-described,
downstream, pre-release testing. In my opinion, two calendar weeks are
sensible for the "finishing touches" on the release.

I'm not asking for an extended Soft Feature Freeze. I reckon that most
downstreams will want to start their pre-release integration and testing
at the rc1 tag. Between the rc0 and rc1 tags (that is, during the Soft
Feature Freeze), features reviewed previously may still be merged, and
those have a higher chance to invalidate downstream testing performed
earlier. So the "real" testing will likely commence at rc1, and so the
period we'd extend to 2 calendar weeks should be the Hard Feature
Freeze.

(I'm not expressing the new period length in "business days", as the
definition of those varies around the world, and over time.)

Thanks,
Laszlo















回复: 回复: [edk2-rfc] release candidate tags

gaoliming
 

Laszlo:
OK. I give the new proposed date for the release planning. SFF will be shorten to 5 days. HFF will be extended to 14 days.

Date (00:00:00 UTC-8) Description
2021-05-28 Beginning of development
2021-08-09 Soft Feature Freeze
2021-08-13 Hard Feature Freeze
2021-08-27 Release

Thanks
Liming

-----邮件原件-----
发件人: rfc@edk2.groups.io <rfc@edk2.groups.io> 代表 Laszlo Ersek
发送时间: 2021年6月28日 22:19
收件人: gaoliming <gaoliming@...>; rfc@edk2.groups.io
主题: Re: 回复: [edk2-rfc] release candidate tags

On 06/25/21 04:11, gaoliming wrote:
Laszlo:
I understand this release requirement. Now, we have Feature Planning
Freeze (1WW), Soft Feature Freeze (1WW) and Hard Feature Freeze (5 days). I
would propose to remove Feature Planning Freeze, keep Soft Feature Freeze
(1WW), and extend Hard Feature Freeze (1week and 5 days). For Q3 stable
tag, new planning will be like the below.

Date (00:00:00 UTC-8) Description
2021-05-28 Beginning of development
2021-08-09 Soft Feature Freeze
2021-08-16 Hard Feature Freeze
2021-08-27 Release
I haven't even been aware of the "planning freeze". I think we can
remove it.

Regarding the HFF, I'd really suggest / request 14 calendar days.

Thanks
Laszlo






Thanks
Liming
-----邮件原件-----
发件人: rfc@edk2.groups.io <rfc@edk2.groups.io> 代表 Laszlo Ersek
发送时间: 2021年6月22日 18:24
收件人: rfc@edk2.groups.io
抄送: Liming Gao (Byosoft address) <gaoliming@...>
主题: [edk2-rfc] release candidate tags

Hi,

(1) I'm proposing an extension to the soft feature freeze and hard
feature freeze announcements:


https://github.com/tianocore/tianocore.github.io/wiki/SoftFeatureFreeze#an
nouncing-the-soft-feature-freeze

https://github.com/tianocore/tianocore.github.io/wiki/HardFeatureFreeze#a
nnouncing-the-hard-feature-freeze

as follows:

When the SFF is announced, the Release Manager should please tag the
then-HEAD commit of the "master" branch with a Release Candidate tag of
the form

edk2-stableYYYYMM-rc0

When the HFF is announced, the Release Manager should please tag the
then-HEAD commit of the "master" branch with a Release Candidate tag of
the form

edk2-stableYYYYMM-rc1

Note that a single commit may bear multiple tags in the end; for
example, if there are no fixes merged between the HFF announcement and
the actual release, then the final commit would bear both tags

edk2-stableYYYYMM-rc1
edk2-stableYYYYMM


The purpose of the Release Candidate tags is to coordinate pre-release
testing between consumers (downstreams) of edk2. Concentrated
pre-release testing is useful because it helps downstreams (a) identify
issues against a common base and (b) contribute upstream bugfixes still
in time for the actual release.


(2) Relatedly, I'm proposing that the Hard Feature Freeze never be
shorter than 2 calendar weeks.

Background: if I recall correctly, the Hard Feature Freeze for
edk2-stable202105 was 4 days. That's not enough for the above-described,
downstream, pre-release testing. In my opinion, two calendar weeks are
sensible for the "finishing touches" on the release.

I'm not asking for an extended Soft Feature Freeze. I reckon that most
downstreams will want to start their pre-release integration and testing
at the rc1 tag. Between the rc0 and rc1 tags (that is, during the Soft
Feature Freeze), features reviewed previously may still be merged, and
those have a higher chance to invalidate downstream testing performed
earlier. So the "real" testing will likely commence at rc1, and so the
period we'd extend to 2 calendar weeks should be the Hard Feature
Freeze.

(I'm not expressing the new period length in "business days", as the
definition of those varies around the world, and over time.)

Thanks,
Laszlo









Re: 回复: [edk2-rfc] release candidate tags

Laszlo Ersek
 

On 06/25/21 04:11, gaoliming wrote:
Laszlo:
I understand this release requirement. Now, we have Feature Planning Freeze (1WW), Soft Feature Freeze (1WW) and Hard Feature Freeze (5 days). I would propose to remove Feature Planning Freeze, keep Soft Feature Freeze (1WW), and extend Hard Feature Freeze (1week and 5 days). For Q3 stable tag, new planning will be like the below.

Date (00:00:00 UTC-8) Description
2021-05-28 Beginning of development
2021-08-09 Soft Feature Freeze
2021-08-16 Hard Feature Freeze
2021-08-27 Release
I haven't even been aware of the "planning freeze". I think we can
remove it.

Regarding the HFF, I'd really suggest / request 14 calendar days.

Thanks
Laszlo






Thanks
Liming
-----邮件原件-----
发件人: rfc@edk2.groups.io <rfc@edk2.groups.io> 代表 Laszlo Ersek
发送时间: 2021年6月22日 18:24
收件人: rfc@edk2.groups.io
抄送: Liming Gao (Byosoft address) <gaoliming@...>
主题: [edk2-rfc] release candidate tags

Hi,

(1) I'm proposing an extension to the soft feature freeze and hard
feature freeze announcements:


https://github.com/tianocore/tianocore.github.io/wiki/SoftFeatureFreeze#an
nouncing-the-soft-feature-freeze

https://github.com/tianocore/tianocore.github.io/wiki/HardFeatureFreeze#a
nnouncing-the-hard-feature-freeze

as follows:

When the SFF is announced, the Release Manager should please tag the
then-HEAD commit of the "master" branch with a Release Candidate tag of
the form

edk2-stableYYYYMM-rc0

When the HFF is announced, the Release Manager should please tag the
then-HEAD commit of the "master" branch with a Release Candidate tag of
the form

edk2-stableYYYYMM-rc1

Note that a single commit may bear multiple tags in the end; for
example, if there are no fixes merged between the HFF announcement and
the actual release, then the final commit would bear both tags

edk2-stableYYYYMM-rc1
edk2-stableYYYYMM


The purpose of the Release Candidate tags is to coordinate pre-release
testing between consumers (downstreams) of edk2. Concentrated
pre-release testing is useful because it helps downstreams (a) identify
issues against a common base and (b) contribute upstream bugfixes still
in time for the actual release.


(2) Relatedly, I'm proposing that the Hard Feature Freeze never be
shorter than 2 calendar weeks.

Background: if I recall correctly, the Hard Feature Freeze for
edk2-stable202105 was 4 days. That's not enough for the above-described,
downstream, pre-release testing. In my opinion, two calendar weeks are
sensible for the "finishing touches" on the release.

I'm not asking for an extended Soft Feature Freeze. I reckon that most
downstreams will want to start their pre-release integration and testing
at the rc1 tag. Between the rc0 and rc1 tags (that is, during the Soft
Feature Freeze), features reviewed previously may still be merged, and
those have a higher chance to invalidate downstream testing performed
earlier. So the "real" testing will likely commence at rc1, and so the
period we'd extend to 2 calendar weeks should be the Hard Feature
Freeze.

(I'm not expressing the new period length in "business days", as the
definition of those varies around the world, and over time.)

Thanks,
Laszlo






回复: [edk2-rfc] release candidate tags

gaoliming
 

Laszlo:
I understand this release requirement. Now, we have Feature Planning Freeze (1WW), Soft Feature Freeze (1WW) and Hard Feature Freeze (5 days). I would propose to remove Feature Planning Freeze, keep Soft Feature Freeze (1WW), and extend Hard Feature Freeze (1week and 5 days). For Q3 stable tag, new planning will be like the below.

Date (00:00:00 UTC-8) Description
2021-05-28 Beginning of development
2021-08-09 Soft Feature Freeze
2021-08-16 Hard Feature Freeze
2021-08-27 Release

Thanks
Liming

-----邮件原件-----
发件人: rfc@edk2.groups.io <rfc@edk2.groups.io> 代表 Laszlo Ersek
发送时间: 2021年6月22日 18:24
收件人: rfc@edk2.groups.io
抄送: Liming Gao (Byosoft address) <gaoliming@...>
主题: [edk2-rfc] release candidate tags

Hi,

(1) I'm proposing an extension to the soft feature freeze and hard
feature freeze announcements:


https://github.com/tianocore/tianocore.github.io/wiki/SoftFeatureFreeze#an
nouncing-the-soft-feature-freeze

https://github.com/tianocore/tianocore.github.io/wiki/HardFeatureFreeze#a
nnouncing-the-hard-feature-freeze

as follows:

When the SFF is announced, the Release Manager should please tag the
then-HEAD commit of the "master" branch with a Release Candidate tag of
the form

edk2-stableYYYYMM-rc0

When the HFF is announced, the Release Manager should please tag the
then-HEAD commit of the "master" branch with a Release Candidate tag of
the form

edk2-stableYYYYMM-rc1

Note that a single commit may bear multiple tags in the end; for
example, if there are no fixes merged between the HFF announcement and
the actual release, then the final commit would bear both tags

edk2-stableYYYYMM-rc1
edk2-stableYYYYMM


The purpose of the Release Candidate tags is to coordinate pre-release
testing between consumers (downstreams) of edk2. Concentrated
pre-release testing is useful because it helps downstreams (a) identify
issues against a common base and (b) contribute upstream bugfixes still
in time for the actual release.


(2) Relatedly, I'm proposing that the Hard Feature Freeze never be
shorter than 2 calendar weeks.

Background: if I recall correctly, the Hard Feature Freeze for
edk2-stable202105 was 4 days. That's not enough for the above-described,
downstream, pre-release testing. In my opinion, two calendar weeks are
sensible for the "finishing touches" on the release.

I'm not asking for an extended Soft Feature Freeze. I reckon that most
downstreams will want to start their pre-release integration and testing
at the rc1 tag. Between the rc0 and rc1 tags (that is, during the Soft
Feature Freeze), features reviewed previously may still be merged, and
those have a higher chance to invalidate downstream testing performed
earlier. So the "real" testing will likely commence at rc1, and so the
period we'd extend to 2 calendar weeks should be the Hard Feature
Freeze.

(I'm not expressing the new period length in "business days", as the
definition of those varies around the world, and over time.)

Thanks,
Laszlo





Re: [edk2-devel] RFC: design review for TDVF in OVMF

Min Xu <min.m.xu@...>
 

On 06/24/2021 8:36 AM, James Bottomley wrote:
On Thu, 2021-06-24 at 00:24 +0000, Min Xu wrote:
On 06/22/2021 9:39 PM, Laszlo wrote:
I should clarify: the relevant part of my preference is not that
"IntelTdx.dsc"
contain the *complete* TDVF feature set. The relevant part (for me)
is that "OvmfPkgX64.dsc" *not* be over-complicated for the sake of
TDX, even considering only the "basic" TDVF feature set. It's fine
to implement TDX in two stages ("basic" and "complete"); my point is
that even "basic"
should not over-
complicate "OvmfPkgX64.dsc".
Thanks much for the comments and we don't want to make OvmfPkgX64.dsc
over-complicated either.
We have updated the design slides to V0.95 and Slides 6-15 are
discussing the Config-A and Config-B.
https://edk2.groups.io/g/devel/files/Designs/2021/0611/TDVF_Design_Rev
iew%28v0.95%29.pptx
Your comment is always welcome!
The mailing list still won't give me that file, can you update it in the bugzilla:

https://bugzilla.tianocore.org/show_bug.cgi?id=3429

As well, please?
Sure. TDVF Design Review v0.95 is uploaded to
https://bugzilla.tianocore.org/show_bug.cgi?id=3429
Thanks
Min


Re: [edk2-devel] RFC: design review for TDVF in OVMF

James Bottomley <jejb@...>
 

On Thu, 2021-06-24 at 00:24 +0000, Min Xu wrote:
On 06/22/2021 9:39 PM, Laszlo wrote:
I should clarify: the relevant part of my preference is not that
"IntelTdx.dsc"
contain the *complete* TDVF feature set. The relevant part (for me)
is that
"OvmfPkgX64.dsc" *not* be over-complicated for the sake of TDX,
even
considering only the "basic" TDVF feature set. It's fine to
implement TDX in two
stages ("basic" and "complete"); my point is that even "basic"
should not over-
complicate "OvmfPkgX64.dsc".
Thanks much for the comments and we don't want to make OvmfPkgX64.dsc
over-complicated either.
We have updated the design slides to V0.95 and Slides 6-15 are
discussing the
Config-A and Config-B.
https://edk2.groups.io/g/devel/files/Designs/2021/0611/TDVF_Design_Review%28v0.95%29.pptx
Your comment is always welcome!
The mailing list still won't give me that file, can you update it in
the bugzilla:

https://bugzilla.tianocore.org/show_bug.cgi?id=3429

As well, please?

Thanks,

James


Re: [edk2-devel] RFC: design review for TDVF in OVMF

Min Xu <min.m.xu@...>
 

On 06/22/2021 9:39 PM, Laszlo wrote:

I should clarify: the relevant part of my preference is not that "IntelTdx.dsc"
contain the *complete* TDVF feature set. The relevant part (for me) is that
"OvmfPkgX64.dsc" *not* be over-complicated for the sake of TDX, even
considering only the "basic" TDVF feature set. It's fine to implement TDX in two
stages ("basic" and "complete"); my point is that even "basic" should not over-
complicate "OvmfPkgX64.dsc".
Thanks much for the comments and we don't want to make OvmfPkgX64.dsc
over-complicated either.
We have updated the design slides to V0.95 and Slides 6-15 are discussing the
Config-A and Config-B.
https://edk2.groups.io/g/devel/files/Designs/2021/0611/TDVF_Design_Review%28v0.95%29.pptx
Your comment is always welcome!

Thanks!
Min


Re: [edk2-devel] RFC: design review for TDVF in OVMF

Laszlo Ersek
 

On 06/23/21 04:44, Xu, Min M wrote:
On 06/22/2021 9:35 PM, Laszlo wrote:

For example, as I stated earlier, "OvmfPkg/AcpiPlatformDxe" is a
driver where I'd like to see zero changes, for either SEV or TDX. If
the TD Mailbox location has to be reported to the OS via the MADT,
and QEMU cannot (or must not) populate that field in the MADT, then a
separate, TDX-specific edk2 driver should locate the MADT (installed
technically by "OvmfPkg/AcpiPlatformDxe", earlier), and update the
field.
We have updated the design of AcpiPlatformDxe. Please see the slides
in below link.
https://edk2.groups.io/g/devel/files/Designs/2021/0611/TDVF_Design_Review-AcpiPlatformDxe.pptx
Thanks, let me mark this with [1].


Because MailboxAddress in MADT table is determined in runtime in Tdx,
so we separate the update of the MADT table in TdxDxe driver and keep
AcpiPlatformDxe clean and shim.
I've now read

4.3.4 AP information reporting from TDVF to OS

from

https://software.intel.com/content/dam/develop/external/us/en/documents/tdx-virtual-firmware-design-guide-rev-1.pdf

That section does not go into much detail about the expected MADT
updates / entries.

I've also checked the various MADT subtable types here:

https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#interrupt-controller-structure-types

It seems that the TDVF spec speaks about subtable type 0 (Processor
Local APIC):

https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#processor-local-apic-structure

I've also checked "acpidump -b; iasl -d" in a normal guest, to remind
myself of the actual MADT contents that QEMU currently generates. I see
minimally the following subtable types:

Subtable Type : 00 [Processor Local APIC]
Subtable Type : 01 [I/O APIC]
Subtable Type : 02 [Interrupt Source Override]
Subtable Type : 04 [Local APIC NMI]

Thus, the TDVF spec creates the extremely unfortunate situation where
subtables of types different from 0 are expected from QEMU, but
subtables of type 0 are expected from the firmware.

In this case, QEMU should likely not populate the MADT with any LAPIC (=
type 0) subtables. Then, Option-3 from slide#5 in [1] (uninstalling the
MADT, *extending* the MADT with LAPIC subtables, installing the new
MADT) seems relatively workable.

(

Note that uninstalling an ACPI table (with EFI_ACPI_TABLE_PROTOCOL)
that was installed by a different driver previously requires the use
of EFI_ACPI_SDT_PROTOCOL. That's because the TableKey parameter taken
by EFI_ACPI_TABLE_PROTOCOL.UninstallAcpiTable() is only available from
EFI_ACPI_TABLE_PROTOCOL.InstallAcpiTable() -- which the TDX driver
will not have called --, or from EFI_ACPI_SDT_PROTOCOL.GetAcpiTable().

EFI_ACPI_SDT_PROTOCOL.RegisterNotify() also exists, but it should be
avoided. It should not be used to immediately modify or replace the
MADT as soon as the MADT appears. That's because, upon encountering an
error, OvmfPkg/AcpiPlatformDxe rolls back all tables it installed up
to the error. It wouldn't be great if the rollback attempted to remove
a different MADT than what was installed.

)


Another approach (which sounds quite horrible) might be for QEMU to
pre-populate the MADT with just the right *count* of LAPIC subtables,
and then the TDX driver would patch the MADT *in-place* with the proper
LAPIC subtable contents (and then re-checksum the table manually). This
sounds horrible indeed.


Modifying the InstallAcpiTables() function in OvmfPkg/AcpiPlatformDxe,
so that it install a custom NULL protocol when InstallQemuFwCfgTables()
succeeds, seems tolerable. (In order to trigger the TdxDxe driver's MADT
patching.) However, I don't understand the following comment from
slide#5:

Open: This method is not practicable if parameters cannot be
transferred when trigger the notify function.
What parameters are we talking about here? The TDVF design guide speaks
about TD_VCPU_INFO_HOB, regarding the information required for filling
in the LAPIC entries in the MADT. But the same HOB should be available
to the TDX DXE driver too.


It would be much better if TDX specific code were added to QEMU that
prevented the generation of the MADT altogether, when running a TDX
guest. Then the firmware would fully own the MADT, and the TDX DXE
driver would only have to wait for the availability of
EFI_ACPI_TABLE_PROTOCOL (simple depex). In this case, of course, the TDX
driver would be responsible for all other subtable types too, not just
type 0 (LAPIC).


If all else fails, you can also copy "OvmfPkg/AcpiPlatformDxe" to
"OvmfPkg/TdxAcpiPlatformDxe", and customize it in any way (e.g. as
described on slides #3 and #4 [1]; Options 1 and 2). In this case,
TdxAcpiPlatformDxe would only be used in "IntelTdx.dsc", not the
pre-existent OvmfPkg*.dsc files.


Summary:

- Options 1 and 2 from [1] are not acceptable for
OvmfPkg/AcpiPlatformDxe.

- Option 3 from [1] is acceptable for OvmfPkg/AcpiPlatformDxe with a
custom NULL protocol instance, but:

- I don't understand the "parameter passing problem".

- How exactly the TdxDxe driver implements the MADT update (or
replacement) remains a question, impacting even QEMU (as QEMU and
TdxDxe must not fight for ownership over the LAPIC subtables). Some
possibilities are:

- stop QEMU from generating the MADT, make TdxDxe own the MADT fully;

- stop QEMU from generating LAPIC subtables;

- make QEMU generate the right number of dummy MADT entries;

- don't touch QEMU, but filter out its LAPIC subtables in TdxDxe.

- Options 1 and 2 from [1] are acceptable for a detached / distinct
driver called "OvmfPkg/TdxAcpiPlatformDxe", but this driver could only
be used in "IntelTdx.dsc".

Thanks
Laszlo


Re: [edk2-devel] RFC: design review for TDVF in OVMF

Min Xu <min.m.xu@...>
 

On 06/22/2021 9:35 PM, Laszlo wrote:
Hi,

On 06/11/21 08:37, Xu, Min M wrote:
In today's TianoCore Design Meeting we reviewed the Overview Section
(from slide 1 to 20). Thanks much for the valuable feedbacks and comments.
The meeting minutes will be sent out soon.

To address the concerns of the *one binary* solution in previous
discussion, we propose 2 Configurations for TDVF to upstream. (slide 6
- 8)



Config-A:

* Merge the *basic* TDVF feature to existing OvmfX64Pkg.dsc. (Align
with existing SEV)
* Threat model: VMM is NOT out of TCB. (We don't make things worse.)
* The OvmfX64Pkg.dsc includes SEV/TDX/normal OVMF basic boot
capability. The final binary can run on SEV/TDX/normal OVMF
* No changes to existing OvmfPkgX64 image layout.
* No need to add additional security features if they do not exist today
* No need to remove features if they exist today.
* RTMR is not supported
* PEI phase is NOT skipped in either Td or Non-Td
(so this is "Config-A / Option B", per slide 9 in the v0.9 slide deck)
Yes, in Config-A we chose to follow the standard EDK2 flow (SEC -> PEI -> DXE -> BDS)
So that the changes in Config-A is not too intrusive.





Config-B:

* Add a standalone IntelTdx.dsc to a TDX specific directory for a *full*
feature TDVF. (Align with existing SEV)
* Threat model: VMM is out of TCB. (We need necessary change to
prevent attack from VMM)
* IntelTdx.dsc includes TDX/normal OVMF basic boot capability. The final
binary can run on TDX/normal OVMF
* It might eventually merge with AmdSev.dsc, but NOT at this point of
time. And we don't know when it will happen. We need sync with AMD in
the community, after both of us think the solutions are mature to merge.
* Need to add necessary security feature as mandatory requirement,
such as RTMR based Trusted Boot support
* Need to remove unnecessary attack surfaces, such as network stack.
After reading the above, and checking slides 6 through 10 of the v0.9 slide
deck:

- I prefer Config-B (IntelTdx.dsc).

This is in accordance with what I wrote earlier about "OvmfPkgX64.dsc"
maintainability and regressions.

Additionally (given that a full-featured TDVF is the ultimate goal), I see the
advance from "Config-A / option B" to "Config-B" a lot less
*incremental* than the step from "OvmfPkgX64.dsc" to "AmdSev.dsc" was.

Put differently, I think that any TDX work targeted at "OvmfPkgX64.dsc"
is going to prove less useful for the final "IntelTdx.dsc" than how reusable
SEV work from "OvmfPkgX64.dsc" did for "AmdSev.dsc".

Put yet differently, I'm concerned that a part of the TDX work for
"OvmfPkgX64.dsc" might be a waste, with an eye towards the ultimate TDVF
feature set ("IntelTdx.dsc").
Actually Config-A and Config-B share some common (or basic) TDX features,
for example, the ResetVector, Memory Accept in SEC phase, IoMMU/DMA in
DXE phase, and the base IoLib, etc.
Config-A supports the basic Tdx features (except the security features).
Config-B supports the full set of Tdx features.


- I could (very cautiously) live with "Config-A / option B" as the initial
approach. However, we'de have to be ready to make the full split (the
switch-over to "IntelTdx.dsc") at *any point* during development, in case
something turns out to be too intrusive. (And yes, "too intrusive" is
subjective.)
Yes, we will always keep in mind the maintainability and regressions about
"OvmfPkgX64.dsc". So as the initial approach, only the basic Tdx features will
be included in Config-A.

By this I mean that any particular patch towards "Config-A / option B"
could cause me to ask, "please create IntelTdx.dsc now". Note that the later
we make the switch the more painful it could be (= the more invested in
"OvmfPkgX64.dsc" we could be, at that point).
Yes we will submit the patch for Config-B when any particular patch towards
"Config-A", so that we will not have a big surprise in the future.
Thanks!
Min


Re: [edk2-devel] RFC: design review for TDVF in OVMF

Min Xu <min.m.xu@...>
 

On 06/22/2021 9:35 PM, Laszlo wrote:

For example, as I stated earlier, "OvmfPkg/AcpiPlatformDxe" is a driver where
I'd like to see zero changes, for either SEV or TDX. If the TD Mailbox location has
to be reported to the OS via the MADT, and QEMU cannot (or must not)
populate that field in the MADT, then a separate, TDX-specific edk2 driver should
locate the MADT (installed technically by "OvmfPkg/AcpiPlatformDxe", earlier),
and update the field.
We have updated the design of AcpiPlatformDxe. Please see the slides in below link.
https://edk2.groups.io/g/devel/files/Designs/2021/0611/TDVF_Design_Review-AcpiPlatformDxe.pptx

Because MailboxAddress in MADT table is determined in runtime in Tdx, so we
separate the update of the MADT table in TdxDxe driver and keep AcpiPlatformDxe clean
and shim.


Thanks,
Laszlo
Thanks
Min


Re: [edk2-devel] RFC: design review for TDVF in OVMF

Laszlo Ersek
 

On 06/22/21 15:34, Laszlo Ersek wrote:
Hi,

On 06/11/21 08:37, Xu, Min M wrote:
In today's TianoCore Design Meeting we reviewed the Overview Section (from slide 1 to 20). Thanks much for the valuable feedbacks and comments. The meeting minutes will be sent out soon.

To address the concerns of the *one binary* solution in previous discussion, we propose 2 Configurations for TDVF to upstream. (slide 6 - 8)



Config-A:

* Merge the *basic* TDVF feature to existing OvmfX64Pkg.dsc. (Align with existing SEV)
* Threat model: VMM is NOT out of TCB. (We don't make things worse.)
* The OvmfX64Pkg.dsc includes SEV/TDX/normal OVMF basic boot capability. The final binary can run on SEV/TDX/normal OVMF
* No changes to existing OvmfPkgX64 image layout.
* No need to add additional security features if they do not exist today
* No need to remove features if they exist today.
* RTMR is not supported
* PEI phase is NOT skipped in either Td or Non-Td
(so this is "Config-A / Option B", per slide 9 in the v0.9 slide deck)




Config-B:

* Add a standalone IntelTdx.dsc to a TDX specific directory for a *full* feature TDVF. (Align with existing SEV)
* Threat model: VMM is out of TCB. (We need necessary change to prevent attack from VMM)
* IntelTdx.dsc includes TDX/normal OVMF basic boot capability. The final binary can run on TDX/normal OVMF
* It might eventually merge with AmdSev.dsc, but NOT at this point of time. And we don't know when it will happen. We need sync with AMD in the community, after both of us think the solutions are mature to merge.
* Need to add necessary security feature as mandatory requirement, such as RTMR based Trusted Boot support
* Need to remove unnecessary attack surfaces, such as network stack.
After reading the above, and checking slides 6 through 10 of the v0.9
slide deck:

- I prefer Config-B (IntelTdx.dsc).
I should clarify: the relevant part of my preference is not that
"IntelTdx.dsc" contain the *complete* TDVF feature set. The relevant
part (for me) is that "OvmfPkgX64.dsc" *not* be over-complicated for the
sake of TDX, even considering only the "basic" TDVF feature set. It's
fine to implement TDX in two stages ("basic" and "complete"); my point
is that even "basic" should not over-complicate "OvmfPkgX64.dsc".

Thanks
Laszlo



This is in accordance with what I wrote earlier about "OvmfPkgX64.dsc"
maintainability and regressions.

Additionally (given that a full-featured TDVF is the ultimate goal), I
see the advance from "Config-A / option B" to "Config-B" a lot less
*incremental* than the step from "OvmfPkgX64.dsc" to "AmdSev.dsc" was.

Put differently, I think that any TDX work targeted at "OvmfPkgX64.dsc"
is going to prove less useful for the final "IntelTdx.dsc" than how
reusable SEV work from "OvmfPkgX64.dsc" did for "AmdSev.dsc".

Put yet differently, I'm concerned that a part of the TDX work for
"OvmfPkgX64.dsc" might be a waste, with an eye towards the ultimate TDVF
feature set ("IntelTdx.dsc").


- I could (very cautiously) live with "Config-A / option B" as the
initial approach. However, we'de have to be ready to make the full split
(the switch-over to "IntelTdx.dsc") at *any point* during development,
in case something turns out to be too intrusive. (And yes, "too
intrusive" is subjective.)

By this I mean that any particular patch towards "Config-A / option B"
could cause me to ask, "please create IntelTdx.dsc now". Note that the
later we make the switch the more painful it could be (= the more
invested in "OvmfPkgX64.dsc" we could be, at that point).

For example, as I stated earlier, "OvmfPkg/AcpiPlatformDxe" is a driver
where I'd like to see zero changes, for either SEV or TDX. If the TD
Mailbox location has to be reported to the OS via the MADT, and QEMU
cannot (or must not) populate that field in the MADT, then a separate,
TDX-specific edk2 driver should locate the MADT (installed technically
by "OvmfPkg/AcpiPlatformDxe", earlier), and update the field.

Thanks,
Laszlo

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Min Xu
Sent: Friday, June 11, 2021 6:30 AM
To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@...>; rfc@edk2.groups.io
Cc: jejb@...; Laszlo Ersek <lersek@...>; Brijesh Singh <brijesh.singh@...>; Tom Lendacky <thomas.lendacky@...>; erdemaktas@...; cho@...; bret.barkelew@...; Jon Lange <jlange@...>; Karen Noel <knoel@...>; Paolo Bonzini <pbonzini@...>; Nathaniel McCallum <npmccallum@...>; Dr. David Alan Gilbert <dgilbert@...>; Ademar de Souza Reis Jr. <areis@...>
Subject: Re: [edk2-rfc] [edk2-devel] RFC: design review for TDVF in OVMF

Hi, All
Thanks much for the valuable comments and discussion about the design.
We have updated the slides (v0.9) in below link. If some comments or concerns are not answered/addressed in the new slides, please don't hesitate to tell us. We do want to answer/address all the comments/concerns. But to be honest it is a rather complicated one and we appreciate your feedbacks.
https://edk2.groups.io/g/devel/files/Designs/2021/0611/TDVF_Design_Review%28v0.9%29.pptx

Thanks much!

Xu Min


From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Yao, Jiewen
Sent: Thursday, June 3, 2021 9:51 PM
To: rfc@edk2.groups.io<mailto:rfc@edk2.groups.io>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: jejb@...<mailto:jejb@...>; Laszlo Ersek <lersek@...<mailto:lersek@...>>; Brijesh Singh <brijesh.singh@...<mailto:brijesh.singh@...>>; Tom Lendacky <thomas.lendacky@...<mailto:thomas.lendacky@...>>; erdemaktas@...<mailto:erdemaktas@...>; cho@...<mailto:cho@...>; bret.barkelew@...<mailto:bret.barkelew@...>; Jon Lange <jlange@...<mailto:jlange@...>>; Karen Noel <knoel@...<mailto:knoel@...>>; Paolo Bonzini <pbonzini@...<mailto:pbonzini@...>>; Nathaniel McCallum <npmccallum@...<mailto:npmccallum@...>>; Dr. David Alan Gilbert <dgilbert@...<mailto:dgilbert@...>>; Ademar de Souza Reis Jr. <areis@...<mailto:areis@...>>
Subject: [edk2-rfc] [edk2-devel] RFC: design review for TDVF in OVMF

Hi, All
We plan to do a design review for TDVF in OVMF package.


The TDVF Design slides for TinaoCore Design Review Meeting (Jun 11) is now available in blow link: https://edk2.groups.io/g/devel/files/Designs/2021/0611.

The Bugzilla is https://bugzilla.tianocore.org/show_bug.cgi?id=3429



You can have an offline review first. You comments will be warmly welcomed and we will continuously update the slides based on the feedbacks.



Thank you

Yao Jiewen







Re: [edk2-devel] RFC: design review for TDVF in OVMF

Laszlo Ersek
 

Hi,

On 06/11/21 08:37, Xu, Min M wrote:
In today's TianoCore Design Meeting we reviewed the Overview Section (from slide 1 to 20). Thanks much for the valuable feedbacks and comments. The meeting minutes will be sent out soon.

To address the concerns of the *one binary* solution in previous discussion, we propose 2 Configurations for TDVF to upstream. (slide 6 - 8)



Config-A:

* Merge the *basic* TDVF feature to existing OvmfX64Pkg.dsc. (Align with existing SEV)
* Threat model: VMM is NOT out of TCB. (We don't make things worse.)
* The OvmfX64Pkg.dsc includes SEV/TDX/normal OVMF basic boot capability. The final binary can run on SEV/TDX/normal OVMF
* No changes to existing OvmfPkgX64 image layout.
* No need to add additional security features if they do not exist today
* No need to remove features if they exist today.
* RTMR is not supported
* PEI phase is NOT skipped in either Td or Non-Td
(so this is "Config-A / Option B", per slide 9 in the v0.9 slide deck)




Config-B:

* Add a standalone IntelTdx.dsc to a TDX specific directory for a *full* feature TDVF. (Align with existing SEV)
* Threat model: VMM is out of TCB. (We need necessary change to prevent attack from VMM)
* IntelTdx.dsc includes TDX/normal OVMF basic boot capability. The final binary can run on TDX/normal OVMF
* It might eventually merge with AmdSev.dsc, but NOT at this point of time. And we don't know when it will happen. We need sync with AMD in the community, after both of us think the solutions are mature to merge.
* Need to add necessary security feature as mandatory requirement, such as RTMR based Trusted Boot support
* Need to remove unnecessary attack surfaces, such as network stack.
After reading the above, and checking slides 6 through 10 of the v0.9
slide deck:

- I prefer Config-B (IntelTdx.dsc).

This is in accordance with what I wrote earlier about "OvmfPkgX64.dsc"
maintainability and regressions.

Additionally (given that a full-featured TDVF is the ultimate goal), I
see the advance from "Config-A / option B" to "Config-B" a lot less
*incremental* than the step from "OvmfPkgX64.dsc" to "AmdSev.dsc" was.

Put differently, I think that any TDX work targeted at "OvmfPkgX64.dsc"
is going to prove less useful for the final "IntelTdx.dsc" than how
reusable SEV work from "OvmfPkgX64.dsc" did for "AmdSev.dsc".

Put yet differently, I'm concerned that a part of the TDX work for
"OvmfPkgX64.dsc" might be a waste, with an eye towards the ultimate TDVF
feature set ("IntelTdx.dsc").


- I could (very cautiously) live with "Config-A / option B" as the
initial approach. However, we'de have to be ready to make the full split
(the switch-over to "IntelTdx.dsc") at *any point* during development,
in case something turns out to be too intrusive. (And yes, "too
intrusive" is subjective.)

By this I mean that any particular patch towards "Config-A / option B"
could cause me to ask, "please create IntelTdx.dsc now". Note that the
later we make the switch the more painful it could be (= the more
invested in "OvmfPkgX64.dsc" we could be, at that point).

For example, as I stated earlier, "OvmfPkg/AcpiPlatformDxe" is a driver
where I'd like to see zero changes, for either SEV or TDX. If the TD
Mailbox location has to be reported to the OS via the MADT, and QEMU
cannot (or must not) populate that field in the MADT, then a separate,
TDX-specific edk2 driver should locate the MADT (installed technically
by "OvmfPkg/AcpiPlatformDxe", earlier), and update the field.

Thanks,
Laszlo

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Min Xu
Sent: Friday, June 11, 2021 6:30 AM
To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@...>; rfc@edk2.groups.io
Cc: jejb@...; Laszlo Ersek <lersek@...>; Brijesh Singh <brijesh.singh@...>; Tom Lendacky <thomas.lendacky@...>; erdemaktas@...; cho@...; bret.barkelew@...; Jon Lange <jlange@...>; Karen Noel <knoel@...>; Paolo Bonzini <pbonzini@...>; Nathaniel McCallum <npmccallum@...>; Dr. David Alan Gilbert <dgilbert@...>; Ademar de Souza Reis Jr. <areis@...>
Subject: Re: [edk2-rfc] [edk2-devel] RFC: design review for TDVF in OVMF

Hi, All
Thanks much for the valuable comments and discussion about the design.
We have updated the slides (v0.9) in below link. If some comments or concerns are not answered/addressed in the new slides, please don't hesitate to tell us. We do want to answer/address all the comments/concerns. But to be honest it is a rather complicated one and we appreciate your feedbacks.
https://edk2.groups.io/g/devel/files/Designs/2021/0611/TDVF_Design_Review%28v0.9%29.pptx

Thanks much!

Xu Min


From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Yao, Jiewen
Sent: Thursday, June 3, 2021 9:51 PM
To: rfc@edk2.groups.io<mailto:rfc@edk2.groups.io>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: jejb@...<mailto:jejb@...>; Laszlo Ersek <lersek@...<mailto:lersek@...>>; Brijesh Singh <brijesh.singh@...<mailto:brijesh.singh@...>>; Tom Lendacky <thomas.lendacky@...<mailto:thomas.lendacky@...>>; erdemaktas@...<mailto:erdemaktas@...>; cho@...<mailto:cho@...>; bret.barkelew@...<mailto:bret.barkelew@...>; Jon Lange <jlange@...<mailto:jlange@...>>; Karen Noel <knoel@...<mailto:knoel@...>>; Paolo Bonzini <pbonzini@...<mailto:pbonzini@...>>; Nathaniel McCallum <npmccallum@...<mailto:npmccallum@...>>; Dr. David Alan Gilbert <dgilbert@...<mailto:dgilbert@...>>; Ademar de Souza Reis Jr. <areis@...<mailto:areis@...>>
Subject: [edk2-rfc] [edk2-devel] RFC: design review for TDVF in OVMF

Hi, All
We plan to do a design review for TDVF in OVMF package.


The TDVF Design slides for TinaoCore Design Review Meeting (Jun 11) is now available in blow link: https://edk2.groups.io/g/devel/files/Designs/2021/0611.

The Bugzilla is https://bugzilla.tianocore.org/show_bug.cgi?id=3429



You can have an offline review first. You comments will be warmly welcomed and we will continuously update the slides based on the feedbacks.



Thank you

Yao Jiewen







release candidate tags

Laszlo Ersek
 

Hi,

(1) I'm proposing an extension to the soft feature freeze and hard
feature freeze announcements:

https://github.com/tianocore/tianocore.github.io/wiki/SoftFeatureFreeze#announcing-the-soft-feature-freeze
https://github.com/tianocore/tianocore.github.io/wiki/HardFeatureFreeze#announcing-the-hard-feature-freeze

as follows:

When the SFF is announced, the Release Manager should please tag the
then-HEAD commit of the "master" branch with a Release Candidate tag of
the form

edk2-stableYYYYMM-rc0

When the HFF is announced, the Release Manager should please tag the
then-HEAD commit of the "master" branch with a Release Candidate tag of
the form

edk2-stableYYYYMM-rc1

Note that a single commit may bear multiple tags in the end; for
example, if there are no fixes merged between the HFF announcement and
the actual release, then the final commit would bear both tags

edk2-stableYYYYMM-rc1
edk2-stableYYYYMM


The purpose of the Release Candidate tags is to coordinate pre-release
testing between consumers (downstreams) of edk2. Concentrated
pre-release testing is useful because it helps downstreams (a) identify
issues against a common base and (b) contribute upstream bugfixes still
in time for the actual release.


(2) Relatedly, I'm proposing that the Hard Feature Freeze never be
shorter than 2 calendar weeks.

Background: if I recall correctly, the Hard Feature Freeze for
edk2-stable202105 was 4 days. That's not enough for the above-described,
downstream, pre-release testing. In my opinion, two calendar weeks are
sensible for the "finishing touches" on the release.

I'm not asking for an extended Soft Feature Freeze. I reckon that most
downstreams will want to start their pre-release integration and testing
at the rc1 tag. Between the rc0 and rc1 tags (that is, during the Soft
Feature Freeze), features reviewed previously may still be merged, and
those have a higher chance to invalidate downstream testing performed
earlier. So the "real" testing will likely commence at rc1, and so the
period we'd extend to 2 calendar weeks should be the Hard Feature
Freeze.

(I'm not expressing the new period length in "business days", as the
definition of those varies around the world, and over time.)

Thanks,
Laszlo


Openssl update 1.1.1k

Geer, Ken (EXL)
 

First, thank you I noticed the recent update to OpenSSL 1.1.1 recently. Of course they already have more fixes that can be picked up. Most will not impact secure boot, but for those that use the library it will be good to update..
• CVE-2021-3449 (Fixed in 1.1.1k)
• CVE-2021-3450 (Fixed in 1.1.1k)
• CVE-29290-1971 (Fixed in 1.1.1j)
• CVE-2021-23840 (Fixed in 1.1.1j)
• CVE-2021-23841 (Fixed in 1.1.1j)


Re: [edk2-devel] RFC: design review for TDVF in OVMF

Min Xu <min.m.xu@...>
 

In today's TianoCore Design Meeting we reviewed the Overview Section (from slide 1 to 20). Thanks much for the valuable feedbacks and comments. The meeting minutes will be sent out soon.

To address the concerns of the *one binary* solution in previous discussion, we propose 2 Configurations for TDVF to upstream. (slide 6 - 8)



Config-A:

* Merge the *basic* TDVF feature to existing OvmfX64Pkg.dsc. (Align with existing SEV)
* Threat model: VMM is NOT out of TCB. (We don't make things worse.)
* The OvmfX64Pkg.dsc includes SEV/TDX/normal OVMF basic boot capability. The final binary can run on SEV/TDX/normal OVMF
* No changes to existing OvmfPkgX64 image layout.
* No need to add additional security features if they do not exist today
* No need to remove features if they exist today.
* RTMR is not supported
* PEI phase is NOT skipped in either Td or Non-Td



Config-B:

* Add a standalone IntelTdx.dsc to a TDX specific directory for a *full* feature TDVF. (Align with existing SEV)
* Threat model: VMM is out of TCB. (We need necessary change to prevent attack from VMM)
* IntelTdx.dsc includes TDX/normal OVMF basic boot capability. The final binary can run on TDX/normal OVMF
* It might eventually merge with AmdSev.dsc, but NOT at this point of time. And we don't know when it will happen. We need sync with AMD in the community, after both of us think the solutions are mature to merge.
* Need to add necessary security feature as mandatory requirement, such as RTMR based Trusted Boot support
* Need to remove unnecessary attack surfaces, such as network stack.


From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Min Xu
Sent: Friday, June 11, 2021 6:30 AM
To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@...>; rfc@edk2.groups.io
Cc: jejb@...; Laszlo Ersek <lersek@...>; Brijesh Singh <brijesh.singh@...>; Tom Lendacky <thomas.lendacky@...>; erdemaktas@...; cho@...; bret.barkelew@...; Jon Lange <jlange@...>; Karen Noel <knoel@...>; Paolo Bonzini <pbonzini@...>; Nathaniel McCallum <npmccallum@...>; Dr. David Alan Gilbert <dgilbert@...>; Ademar de Souza Reis Jr. <areis@...>
Subject: Re: [edk2-rfc] [edk2-devel] RFC: design review for TDVF in OVMF

Hi, All
Thanks much for the valuable comments and discussion about the design.
We have updated the slides (v0.9) in below link. If some comments or concerns are not answered/addressed in the new slides, please don't hesitate to tell us. We do want to answer/address all the comments/concerns. But to be honest it is a rather complicated one and we appreciate your feedbacks.
https://edk2.groups.io/g/devel/files/Designs/2021/0611/TDVF_Design_Review%28v0.9%29.pptx

Thanks much!

Xu Min


From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Yao, Jiewen
Sent: Thursday, June 3, 2021 9:51 PM
To: rfc@edk2.groups.io<mailto:rfc@edk2.groups.io>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: jejb@...<mailto:jejb@...>; Laszlo Ersek <lersek@...<mailto:lersek@...>>; Brijesh Singh <brijesh.singh@...<mailto:brijesh.singh@...>>; Tom Lendacky <thomas.lendacky@...<mailto:thomas.lendacky@...>>; erdemaktas@...<mailto:erdemaktas@...>; cho@...<mailto:cho@...>; bret.barkelew@...<mailto:bret.barkelew@...>; Jon Lange <jlange@...<mailto:jlange@...>>; Karen Noel <knoel@...<mailto:knoel@...>>; Paolo Bonzini <pbonzini@...<mailto:pbonzini@...>>; Nathaniel McCallum <npmccallum@...<mailto:npmccallum@...>>; Dr. David Alan Gilbert <dgilbert@...<mailto:dgilbert@...>>; Ademar de Souza Reis Jr. <areis@...<mailto:areis@...>>
Subject: [edk2-rfc] [edk2-devel] RFC: design review for TDVF in OVMF

Hi, All
We plan to do a design review for TDVF in OVMF package.


The TDVF Design slides for TinaoCore Design Review Meeting (Jun 11) is now available in blow link: https://edk2.groups.io/g/devel/files/Designs/2021/0611.

The Bugzilla is https://bugzilla.tianocore.org/show_bug.cgi?id=3429



You can have an offline review first. You comments will be warmly welcomed and we will continuously update the slides based on the feedbacks.



Thank you

Yao Jiewen


Re: [edk2-devel] RFC: design review for TDVF in OVMF

James Bottomley <jejb@...>
 

On Thu, 2021-06-10 at 21:38 -0400, James Bottomley wrote:
On Fri, 2021-06-11 at 01:36 +0000, Yao, Jiewen wrote:
Hi James.
I attached the invitation and copied all content below:

==================================
## TOPIC

1. NA

For more info, see here: https://www.tianocore.org/design-meeting/

---
## Microsoft Teams meeting

### Join on your computer or mobile app

[Click here to join the meeting](
https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTNmZTNhMWEtOWQwNi00ZTdkLWI5NDgtYTFmYjNkOWI0ZDg4%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%2255d36a50-78be-4ced-bc27-3d06c576cc19%22%7d
)
Apparently it's not possible to join from a web browser: is there a
dial in?
In the absence of a dial in, I'll view the recording. I did most of my
comments in the email thread anyway and I'll be boarding my next flight
soon.

However, next time can we hold meetings with usable web based meeting
technologies, like zoom or webex? It's not feasible to demand
downloading gigabytes of app from a remote location ... even when it
works, which this one doesn't seem to do: the app download just keeps
going back to the meeting screen.

Thanks,

James


Re: [edk2-devel] RFC: design review for TDVF in OVMF

James Bottomley <jejb@...>
 

On Fri, 2021-06-11 at 01:36 +0000, Yao, Jiewen wrote:
Hi James.
I attached the invitation and copied all content below:

==================================
## TOPIC

1. NA

For more info, see here: https://www.tianocore.org/design-meeting/

---
## Microsoft Teams meeting

### Join on your computer or mobile app

[Click here to join the meeting](
https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTNmZTNhMWEtOWQwNi00ZTdkLWI5NDgtYTFmYjNkOWI0ZDg4%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%2255d36a50-78be-4ced-bc27-3d06c576cc19%22%7d
)
Apparently it's not possible to join from a web browser: is there a
dial in?

James

101 - 120 of 786