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

docs/meeting-minutes: Add notes from January TrenchBoot AEM meeting #22

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

miczyg1
Copy link
Contributor

@miczyg1 miczyg1 commented Jan 25, 2023

Signed-off-by: Michał Żygowski [email protected]

@miczyg1 miczyg1 requested a review from dpsmith January 25, 2023 16:04
Signed-off-by: Michał Żygowski <[email protected]>
Comment on lines +30 to +32
- Xen efi needs fixing in order to work without Xen's efi-stub, so it would be
better to follow Linux's approach of jumping into Xen and Xen calling out to
slstub
Copy link

Choose a reason for hiding this comment

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

Currently, Xen's EFI code (like linux) depends on being able to use boot services, and expects to call EBS itself.

Previously, we had a plan to try and make Xen able to boot without access to boot services. And while this is still a good idea, the point I was trying to make is that because we must support boot services for Linux efi-stub, using the same approach in Xen would be a less invasive change overall, and therefore easier to upstream.

i.e. "making Xen work without boot services" can (and should) now be orthogonal to "making Xen work with trenchboot".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, initially we wanted to get rid of UEFI completely in Xen, but given the new approach of booting Linux with TrenchBoot, it doesn't make much sense to pursue deUEFIcation anymore. This is what I understood too. Do you request any change in the file @andyhhp ?

Copy link
Member

Choose a reason for hiding this comment

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

I'm suggesting another approach:

That way there would be no difference in Xen code between UEFI and legacy boot at all.

Copy link

Choose a reason for hiding this comment

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

"Xen efi needs fixing in order to work without Xen's efi-stub," doesn't really parse IMO. We don't really have an efi-stub like Linux does. We've just got a bit of code which is compiled to MSABI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@andyhhp so, could you please suggest how this sentence should look like?

Also what do you think about @krystian-hebel approach?

- AP wakeup developed during the Qubes OS AEM PoC in Xen hypervisor kernel is
still valid and will be needed in the most recent approach as well
- for legacy boot module will have to be placed in memory by GRUB but GRUB will
also construct the input table and call SENTER/SKINIT
Copy link

Choose a reason for hiding this comment

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

Upstream, I'm only aware of support for AP booting after SKINIT. And even then, "won't crash if booted like this", and not really "PoC of working trenchboot" quality. I don't recall any patches for the Intel SENTER support.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@andyhhp true, there were no patches yet. We still are putting things together and just a few days ago, we finished the whole integration and verification. What I meant here, is that the work we did for AP bring up after SENTER will be needed for both UEFI and legacy boot mode. The patch set shall be sent when new get everything rebase onto most recent boot protocol. Does that approach sounds good to you @andyhhp ?

- boot into Xen
- search for SRT table and look for SL module
- take measurement of Xen at the end of reinitialization by calling DRTM (right
before jump to Dom0) so that the measurement will be stable
Copy link

Choose a reason for hiding this comment

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

"at the end of boot" and by delaying the dynamic launch until after we're done making boot-time modifications to Xen's .text/etc.

Also, somewhere we need to say that this doesn't cope with livepatching yet, but we've decided that we can exclude livepatching support from a v1 implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed

coming back from S3. It is still valid to measure Dom0 on initial boot to
ensure that the correct dom0 kernel is used to start the system. For Dom0 do
external inspection of LKRG (future), for now Dom0 is not that relevant to be
measured according to Daniel and Andrew
Copy link

Choose a reason for hiding this comment

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

I think what I meant was that, because the measurement of dom0 is largely meaningless, we should exclude it from v1.

Even just getting a meaningful measurement of Xen on S3 resume puts Trenchboot in a far superior position compared to Tboot.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed

@pietrushnic
Copy link
Member

@krystian-hebel you review IMO is not mendatory I just wanted to make sure you get notifications with @andyhhp comments.

@pietrushnic
Copy link
Member

@andyhhp any chance you could look at @miczyg1 fixes and if we can merge this PR?

@SergiiDmytruk
Copy link
Member

Cleanup: this PR is stuck for a long time. @andyhhp, ping.

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.

6 participants