From: Rich Persaud Subject: Re: EFI + tboot + Xen Date: Mon, 17 Apr 2017 18:05:22 -0400 Message-ID: <442F23AC-78BA-4568-A12A-9B8F3F87329E@gmail.com> References: <20170414145433.GU16658@olila.local.net-space.pl> <9e3afa8c-e00d-64e0-61c8-9d6166cf797b@citrix.com> <20170414204329.GV16658@olila.local.net-space.pl> Mime-Version: 1.0 (1.0) Content-Type: multipart/mixed; boundary="===============0629081749606822697==" Return-path: In-Reply-To: <20170414204329.GV16658@olila.local.net-space.pl> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Daniel Kiper Cc: Andrew Cooper , Ross Philipson , jbeulich@suse.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============0629081749606822697== Content-Type: multipart/alternative; boundary=Apple-Mail-32877452-2C22-4105-B2B9-0DED39702CF8 Content-Transfer-Encoding: 7bit --Apple-Mail-32877452-2C22-4105-B2B9-0DED39702CF8 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable On Apr 14, 2017, at 16:43, Daniel Kiper wrote: >=20 >> On Fri, Apr 14, 2017 at 04:17:54PM +0100, Andrew Cooper wrote: >>> On 14/04/2017 15:54, Daniel Kiper wrote: >>> Hey, >>>=20 >>> 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? >>=20 >> 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. >=20 > 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 =46rom the README: --- EFI TBOOT is mostly a proof of concept at this point. It is not currently fu= nctional. 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 bein= g done on Fedora 25 x64. The status as of March 14, 2017 is:=20 - EFI TBOOT will boot, but it needs a few key strokes to get going (this is f= or debugging purposes).=20 - EFI TBOOT will relocate itself to EFI runtime memory and setup a shared ru= ntime variable with Xen.=20 - EFI related configuration setup is done as well as standard TBOOT pre- lau= nch configuration.=20 - Xen is launched and has code to call EFI TBOOT back after EBS.=20 - EFI TBOOT then does the SENTER successfully in the callback.=20 - The post launch entry point is reached but the switch back to long mode is= not working --- Rich= --Apple-Mail-32877452-2C22-4105-B2B9-0DED39702CF8 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Apr 14, 2017, at 16:43, D= aniel Kiper <daniel.kiper@orac= le.com> wrote:

On Fri, Apr 14, 2017 at 04:17:54PM +0100, Andrew Cooper wrote:
=
On 14/04/2017 15:54, Daniel Kiper wrote:
Hey,

Has anybody tried to run EFI + t= boot + 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 l= ack of EFI runtime services. Do we care?
Is it possible to= make it work with full blown
EFI infrastructure available= for Xen?

Judging by<= br>
http://hg.code.= sf.net/p/tboot/code/file/9352e6391332/tboot/common/boot.S#l83
=
it will be grub exiting boot se= rvices.  tboot needs rather more
multiboot2 knowledge before it could participate in a hand-= off to Xen
while keep= ing 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 measuremen= t.
I am not sure it is true or not. I though that somebody p= layed with tboot
and Xen and has some knowledge in that area= . Anyway, I will investigate
this further. However, any know= ledge sharing is greatly appreciated.

= On the OpenXT project, Ross Philipson has an early PoC:

=46rom the README:
---
EFI T=
BOOT 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 wor=
ks
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 w= ill boot, but it needs a few key strokes to get going (this is for debugging purposes). 
<=
font face=3D"UICTFontTextStyleTallBody">- EFI TBOOT will relocate itself t=
o EFI runtime memory and setup a shared
   runtime variable with Xen. 
=
- EFI related configuration setu=
p is done as well as standard TBOOT pre-
   launch configuration. 
- Xen is launched and has code to call E=
FI TBOOT back after EBS. 
- EFI TBOOT then does the SENTER succes=
sfully in the callback. 
- The post launch entry point is reache=
d but the switch back to long mode
   is not working
---

Rich
= --Apple-Mail-32877452-2C22-4105-B2B9-0DED39702CF8-- --===============0629081749606822697== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============0629081749606822697==--