Hi all, these are my notes on Xen on UEFI taken at the Hackathon. --- At the moment Grub2 on UEFI calls ExitBootServices and put all the boot time information on a multiboot2 structure. However Xen does not support multiboot2 so it cannot parse them. We need to add multiboo2 support to Xen (x86 and ARM). We might want to support Xen being loaded as a Portable Executable by Gummiboot. It shouldn''t be very different from the current way of supporting Xen being booted as a PE by the UEFI loader, the only difference is that Xen is going to get the location of the kernel and initrd from the command line rather than a config file. We need to support this case on ARM too, however the Portable Executable build target is currently x86 specific (funny, isn''t it?). We might have to support RuntimeServices at least in dom0 at the very least to allow the user to read/write the UEFI variables. Do we need to add a set of hypercalls for dom0 to use or can we trap and emulate the calls in Xen?
On Mon, May 20, 2013 at 02:59:53PM +0100, Stefano Stabellini wrote:> Hi all, > these are my notes on Xen on UEFI taken at the Hackathon.Thanks.> At the moment Grub2 on UEFI calls ExitBootServices and put all the boot > time information on a multiboot2 structure. However Xen does not support > multiboot2 so it cannot parse them. > > We need to add multiboo2 support to Xen (x86 and ARM).Currently this is WIP on x86. We agreed with Stefano that I will prepare code platform independent as much as posible. However, at this stage we are not going to disable ExitBootServices() in GRUB2. It should be considered as next step or completly new solution for that issue should be proposed. Anyway, it requiers some changes in GRUB2 which finally should be upstreamed.> We might want to support Xen being loaded as a Portable Executable by > Gummiboot. It shouldn''t be very different from the current way of > supporting Xen being booted as a PE by the UEFI loader, the only > difference is that Xen is going to get the location of the kernel and > initrd from the command line rather than a config file.Right, however, I think that probably we should focus mainly on GRUB2 which is much more common.> We need to support this case on ARM too, however the Portable > Executable build target is currently x86 specific (funny, isn''t it?).What do you mean by that? binutils support for PE or something else?> We might have to support RuntimeServices at least in dom0 at the very > least to allow the user to read/write the UEFI variables.Right.> Do we need to add a set of hypercalls for dom0 to use or can we trap and > emulate the calls in Xen?Probably EFI specific hypercall will be fine. Daniel
>>> On 20.05.13 at 15:59, Stefano Stabellini <stefano.stabellini@eu.citrix.com> wrote: > > We might have to support RuntimeServices at least in dom0 at the very > least to allow the user to read/write the UEFI variables. > Do we need to add a set of hypercalls for dom0 to use or can we trap and > emulate the calls in Xen?These hypercalls are all already in place (xen/arch/x86/efi/runtime.c) and hence would for ARM only need moving to xen/common/efi/, along with some parts of the boot code. Jan
On Tue, May 21, 2013 at 11:12:52AM +0100, Jan Beulich wrote:> >>> On 20.05.13 at 15:59, Stefano Stabellini <stefano.stabellini@eu.citrix.com> wrote: > > > > We might have to support RuntimeServices at least in dom0 at the very > > least to allow the user to read/write the UEFI variables. > > Do we need to add a set of hypercalls for dom0 to use or can we trap and > > emulate the calls in Xen? > > These hypercalls are all already in place (xen/arch/x86/efi/runtime.c) > and hence would for ARM only need moving to xen/common/efi/, > along with some parts of the boot code.Great! I was not sure that all needed stuff was implemented. Daniel
On Mon, 20 May 2013, Daniel Kiper wrote:> > We might want to support Xen being loaded as a Portable Executable by > > Gummiboot. It shouldn''t be very different from the current way of > > supporting Xen being booted as a PE by the UEFI loader, the only > > difference is that Xen is going to get the location of the kernel and > > initrd from the command line rather than a config file. > > Right, however, I think that probably we should focus > mainly on GRUB2 which is much more common.I agree> > We need to support this case on ARM too, however the Portable > > Executable build target is currently x86 specific (funny, isn''t it?). > > What do you mean by that? binutils support for PE or something else?I mean that Xen can only be built as a PE on x86 at the moment