* Xen, EFI and kexec
@ 2016-11-09 14:13 Sylvain Munaut
2016-11-09 16:24 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 3+ messages in thread
From: Sylvain Munaut @ 2016-11-09 14:13 UTC (permalink / raw)
To: xen-devel@lists.xen.org
Hi,
A bit of background: What I'm currently trying to do is to network
boot a first linux image in EFI mode (using UEFI network boot), then
from that image, kexec into Xen in EFI mode as well.
It's not working.
When you kexec into another linux in EFI mode, kexec actually passes
some more infos to the kernel to allow it to use EFI mode properly.
IIUC Linux also maps the various EFI ranges at deterministic addresses
because the seting up EFI virtual address mode is only allowed once
per boot and so both the old and new kernel have to use the same
mappings.
I have seen the patch series by Daniel Kiper to add support for
multiboot2 protocol and EFI support for it. This seems like a good
step toward what I'd like to do. Adding multiboot2 support to kexec
user tools seems like something I could do. This should allow Xen to
get the info it needs.
However I don't think that'll be sufficient.
By the time kexec will launch Xen, the first kernel will have done an
"ExitBootServices". And looking at Daniel's patch, that seems to be an
issue.
I'm also not sure if the EFI virtual address mode will be an issue or
not yet. (i.e. Xen uses the physical address mode, but is that usable
after the first linux setup the virtual mode).
Is there anything else I overlooked that will be an issue ?
Is this a use case worth supporting ? (Obviously I think so, but I'm biased :p)
And if I'm looking at it the wrong way, what way should I be looking at it ?
Cheers,
Sylvain Munaut
PS: I'm currently making my way through the 2000+ pages of the EFI
specs so I probably got some things wrong above ...
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Xen, EFI and kexec
2016-11-09 14:13 Xen, EFI and kexec Sylvain Munaut
@ 2016-11-09 16:24 ` Konrad Rzeszutek Wilk
2016-11-10 11:23 ` Daniel Kiper
0 siblings, 1 reply; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-11-09 16:24 UTC (permalink / raw)
To: Sylvain Munaut, daniel.kiper; +Cc: xen-devel@lists.xen.org
On Wed, Nov 09, 2016 at 03:13:16PM +0100, Sylvain Munaut wrote:
> Hi,
>
>
> A bit of background: What I'm currently trying to do is to network
> boot a first linux image in EFI mode (using UEFI network boot), then
> from that image, kexec into Xen in EFI mode as well.
>
> It's not working.
>
> When you kexec into another linux in EFI mode, kexec actually passes
> some more infos to the kernel to allow it to use EFI mode properly.
> IIUC Linux also maps the various EFI ranges at deterministic addresses
> because the seting up EFI virtual address mode is only allowed once
> per boot and so both the old and new kernel have to use the same
> mappings.
>
> I have seen the patch series by Daniel Kiper to add support for
> multiboot2 protocol and EFI support for it. This seems like a good
> step toward what I'd like to do. Adding multiboot2 support to kexec
> user tools seems like something I could do. This should allow Xen to
> get the info it needs.
>
> However I don't think that'll be sufficient.
>
> By the time kexec will launch Xen, the first kernel will have done an
> "ExitBootServices". And looking at Daniel's patch, that seems to be an
CC-ing Daniel.
> issue.
>
> I'm also not sure if the EFI virtual address mode will be an issue or
> not yet. (i.e. Xen uses the physical address mode, but is that usable
> after the first linux setup the virtual mode).
OK, then that ought to work.
>
> Is there anything else I overlooked that will be an issue ?
Buggy BIOSes?
>
> Is this a use case worth supporting ? (Obviously I think so, but I'm biased :p)
I think the idea of kexecing Xen is quite neat. You could (long-term with
lots of careful work), restart Xen without bringing down the guests.
(Yeah, I know, it sounds insane, but then I am livepatching an hypervisor
so I already have a foot in the looney bin)
>
> And if I'm looking at it the wrong way, what way should I be looking at it ?
>
>
> Cheers,
>
> Sylvain Munaut
>
>
> PS: I'm currently making my way through the 2000+ pages of the EFI
> specs so I probably got some things wrong above ...
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Xen, EFI and kexec
2016-11-09 16:24 ` Konrad Rzeszutek Wilk
@ 2016-11-10 11:23 ` Daniel Kiper
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Kiper @ 2016-11-10 11:23 UTC (permalink / raw)
To: s.munaut; +Cc: xen-devel
On Wed, Nov 09, 2016 at 11:24:44AM -0500, Konrad Rzeszutek Wilk wrote:
> On Wed, Nov 09, 2016 at 03:13:16PM +0100, Sylvain Munaut wrote:
> > Hi,
> >
> >
> > A bit of background: What I'm currently trying to do is to network
> > boot a first linux image in EFI mode (using UEFI network boot), then
> > from that image, kexec into Xen in EFI mode as well.
> >
> > It's not working.
> >
> > When you kexec into another linux in EFI mode, kexec actually passes
> > some more infos to the kernel to allow it to use EFI mode properly.
> > IIUC Linux also maps the various EFI ranges at deterministic addresses
> > because the seting up EFI virtual address mode is only allowed once
> > per boot and so both the old and new kernel have to use the same
> > mappings.
> >
> > I have seen the patch series by Daniel Kiper to add support for
> > multiboot2 protocol and EFI support for it. This seems like a good
> > step toward what I'd like to do. Adding multiboot2 support to kexec
> > user tools seems like something I could do. This should allow Xen to
> > get the info it needs.
> >
> > However I don't think that'll be sufficient.
> >
> > By the time kexec will launch Xen, the first kernel will have done an
> > "ExitBootServices". And looking at Daniel's patch, that seems to be an
>
> CC-ing Daniel.
> > issue.
Looks interesting. I thought about that a bit but not much, so, just
hand waving. I have a feeling that in that situation we should skip
whole code in Xen which refers to EFI boot services. We just need to
pass essential info (taken during first boot) to Xen. Probably we can
use some of multiboot2 existing features. However, I have a feeling
that we need also some extensions that would enable us to say that
Xen boots on EFI platform but without access to boot services (kexecing).
This should not be very big issue. If you wish to work on this I am
able to review some design and patches for kexec, multiboot2 and GRUB
if needed. Just CC me.
Daniel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-10 11:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-09 14:13 Xen, EFI and kexec Sylvain Munaut
2016-11-09 16:24 ` Konrad Rzeszutek Wilk
2016-11-10 11:23 ` Daniel Kiper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).