Skip to content

Conversation

@SergiiDmytruk
Copy link
Member

An upstream fix will be gone on a future rebase. Code improvements and measurement corrections follow. The actual support is added in the penultimate commit, see its commit message for some details. CI has some issues with the latest latest qubes-builderv2 (sudo isn't passwordless in a container which the builder creates), I just pinned its version to an older commit which works.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
@SergiiDmytruk SergiiDmytruk force-pushed the aem-efi-boot branch 3 times, most recently from 4fcdf5b to 274d462 Compare January 17, 2025 15:04
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
…PMR_SIZE

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This is to allow reusing the same code from a different place.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Add boot_params_base field.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Add PSP version and update types for consistency.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
To prevent measurements from changing when the only thing that has
changed is some address.  Addresses can vary due to bootloader, firmware
or user doing something differently or just if GRUB gets bigger in size
due to inclusion of more modules and ends up offsetting newly allocated
memory.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
@SergiiDmytruk SergiiDmytruk changed the base branch from aem-staging-18-11-24 to aem-next January 25, 2025 23:13
@SergiiDmytruk
Copy link
Member Author

In addition to force-pushing changes (some of them are new for this PR) I changed the target branch to deal with 4.17.4 (which builder calls 4.17.5 for some reason) instead of staging. This is because Xen staging has different ABI which can't be used on Qubes OS 4.2.

@SergiiDmytruk SergiiDmytruk force-pushed the aem-efi-boot branch 2 times, most recently from 3588c76 to 9eec232 Compare February 11, 2025 18:03
@SergiiDmytruk SergiiDmytruk force-pushed the aem-efi-boot branch 2 times, most recently from faa5bdb to 9c6c3cb Compare February 16, 2025 18:50
@macpijan
Copy link
Member

macpijan commented Feb 18, 2025

@miczyg1 all your threads are resolved here, can you please approve if you have no more comments?

@miczyg1
Copy link

miczyg1 commented Feb 19, 2025

@miczyg1 all your threads are resolved here, can you please approve if you have no more comments?

I can but there are also @krystian-hebel threads unresolved.

@macpijan
Copy link
Member

I am aware, @krystian-hebel will do his part as well.

@miczyg1
Copy link

miczyg1 commented Feb 19, 2025

Also, I only tested the legacy boot path of this code and it didn't work so I am not convinced to give approve yet.

Copy link

@miczyg1 miczyg1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@macpijan told we will be looking into legacy boot later too. For now I approve my review being addressed.

When running on an EFI-enabled system, Xen needs to have access to Boot
Services in order to initialize itself properly and reach a state in
which a Dom0 kernel can operate without issues.

This means that DRTM must be started in the middle of Xen's
initialization process.  This effect is achieved via a callback into
bootloader (GRUB) which is responsible for initiating DRTM and
continuing Xen's initialization process.  The latter is achieved by
branching in Slaunch entry point on a flag to switch back into long mode
and calling the same function which Xen would execute as the next step
without DRTM.

Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
@krystian-hebel krystian-hebel merged commit 1278ae8 into aem-next Feb 19, 2025
1 check passed
@krystian-hebel krystian-hebel deleted the aem-efi-boot branch February 19, 2025 20:20
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.

5 participants