Skip to contentSkip to conversation

EFI + tboot + Xen

DISCUSSION Daniel Kiper 4 participants 5 messages Apr 14, 2017 – Apr 25, 2017

lore
Share & tools
lore
#0 lore raw

Hey,

Has anybody tried to run EFI + tboot + Xen? I have a feeling that it does not work because tboot shuts down EFI boot services. However, even if it works then efibootmgr is unusable due to lack of EFI runtime services. Do we care? Is it possible to make it work with full blown EFI infrastructure available for Xen?

Daniel

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#1 lore raw
Quoted 9 lines · Daniel Kiper

Hey,

Has anybody tried to run EFI + tboot + Xen? I have a feeling that it does not work because tboot shuts down EFI boot services. However, even if it works then efibootmgr is unusable due to lack of EFI runtime services. Do we care? Is it possible to make it work with full blown EFI infrastructure available for Xen?

Judging by
http://hg.code.sf.net/p/tboot/code/file/9352e6391332/tboot/common/boot.S#l83
it will be grub exiting boot services. tboot needs rather more multiboot2 knowledge before it could participate in a hand-off to Xen while keeping boot services active.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw
Quoted 11 lines · Andrew Cooper
Quoted 9 lines · Daniel Kiper

Hey,

Has anybody tried to run EFI + tboot + Xen? I have a feeling that it does not work because tboot shuts down EFI boot services. However, even if it works then efibootmgr is unusable due to lack of EFI runtime services. Do we care? Is it possible to make it work with full blown EFI infrastructure available for Xen?

Quoted 5 lines

Judging by
http://hg.code.sf.net/p/tboot/code/file/9352e6391332/tboot/common/boot.S#l83
it will be grub exiting boot services. tboot needs rather more multiboot2 knowledge before it could participate in a hand-off to Xen while keeping boot services active.

Sure, it is not a problem. However, I was told that it was (not) done deliberately because we cannot trust EFI due to lack of its measurement. I am not sure it is true or not. I though that somebody played with tboot and Xen and has some knowledge in that area. Anyway, I will investigate this further. However, any knowledge sharing is greatly appreciated.

Daniel

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
Quoted 19 lines · Daniel Kiper
Quoted 13 lines · Andrew Cooper
Quoted 10 lines · Daniel Kiper

Hey,

Has anybody tried to run EFI + tboot + Xen? I have a feeling that it does not work because tboot shuts down EFI boot services. However, even if it works then efibootmgr is unusable due to lack of EFI runtime services. Do we care? Is it possible to make it work with full blown EFI infrastructure available for Xen?

Quoted 5 lines

Judging by
http://hg.code.sf.net/p/tboot/code/file/9352e6391332/tboot/common/boot.S#l83
it will be grub exiting boot services. tboot needs rather more multiboot2 knowledge before it could participate in a hand-off to Xen while keeping boot services active.

Quoted 5 lines

Sure, it is not a problem. However, I was told that it was (not) done deliberately because we cannot trust EFI due to lack of its measurement. I am not sure it is true or not. I though that somebody played with tboot and Xen and has some knowledge in that area. Anyway, I will investigate this further. However, any knowledge sharing is greatly appreciated.

On the OpenXT project, Ross Philipson has an early PoC:
https://github.com/rossphilipson/efi-tboot

From the README:
---
EFI TBOOT is mostly a proof of concept at this point. It is not currently functional. It can be built and installed as an EFI boot loader. It only works in conjunction with Xen at the moment. The current development work is being done on Fedora 25 x64. The status as of March 14, 2017 is:

- EFI TBOOT will boot, but it needs a few key strokes to get going (this is for debugging purposes).
- EFI TBOOT will relocate itself to EFI runtime memory and setup a shared runtime variable with Xen.
- EFI related configuration setup is done as well as standard TBOOT pre- launch configuration.
- Xen is launched and has code to call EFI TBOOT back after EBS.
- EFI TBOOT then does the SENTER successfully in the callback.
- The post launch entry point is reached but the switch back to long mode is not working
---

Rich

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#4 lore raw
Quoted 52 lines · Rich Persaud
Quoted 18 lines · On Apr 14, 2017, at 16:43, Daniel Kiper <[email protected]…
Quoted 11 lines · Andrew Cooper
Quoted 9 lines · Daniel Kiper

Hey,

Has anybody tried to run EFI + tboot + Xen? I have a feeling that it does not work because tboot shuts down EFI boot services. However, even if it works then efibootmgr is unusable due to lack of EFI runtime services. Do we care? Is it possible to make it work with full blown EFI infrastructure available for Xen?

Quoted 5 lines

Judging by
http://hg.code.sf.net/p/tboot/code/file/9352e6391332/tboot/common/boot.S#l83
it will be grub exiting boot services. tboot needs rather more multiboot2 knowledge before it could participate in a hand-off to Xen while keeping boot services active.

Quoted 5 lines

Sure, it is not a problem. However, I was told that it was (not) done deliberately because we cannot trust EFI due to lack of its measurement. I am not sure it is true or not. I though that somebody played with tboot and Xen and has some knowledge in that area. Anyway, I will investigate this further. However, any knowledge sharing is greatly appreciated.

On the OpenXT project, Ross Philipson has an early PoC:
https://github.com/rossphilipson/efi-tboot

From the README:
---

EFI TBOOT is mostly a proof of concept at this point. It is not currently functional. It can be built and installed as an EFI boot loader. It only works in conjunction with Xen at the moment. The current development work is being done on Fedora 25 x64. The status as of March 14, 2017 is:

- EFI TBOOT will boot, but it needs a few key strokes to get going (this is for debugging purposes).

- EFI TBOOT will relocate itself to EFI runtime memory and setup a shared runtime variable with Xen.

- EFI related configuration setup is done as well as standard TBOOT pre- launch configuration.

- Xen is launched and has code to call EFI TBOOT back after EBS.

- EFI TBOOT then does the SENTER successfully in the callback.

Quoted 8 lines

- The post launch entry point is reached but the switch back to long mode is not working

---

Rich

So this project is a proof of concept at the moment. Currently the readme is out of date (I will fix that). The SENTER returns correctly now and rebuilds the world to get back into long mode. It then calls into the post launch function in tboot.c and does a bit more before dying because it is incomplete.

Anyway I will work on fixing the readme with more details on what it is all about.

Signature · 6 lines
Ross Philipson

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel