Uniform commands for booting xen
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisor FILE XEN_OPTIONSxen_kernel FILE KERNEL_OPTIONSxen_initrd INITRD INITRD INITRD
all initrds are concatenated.xen_xsm ???
On arm64 it would use the arm64 xen FDT protocol but on x86 should we use multiboot2 if multiboot2 header is present and multiboot otherwise? Or do xen devs have other preferences?
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???
xen_ucode (and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.
Jan
Quoted 3 lines
On arm64 it would use the arm64 xen FDT protocol but on x86 should we use multiboot2 if multiboot2 header is present and multiboot otherwise? Or do xen devs have other preferences?
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???
xen_ucode (and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.
Jan
Quoted 3 lines
On arm64 it would use the arm64 xen FDT protocol but on x86 should we use multiboot2 if multiboot2 header is present and multiboot otherwise? Or do xen devs have other preferences?
Quoted 4 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
Quoted 8 lines
Quoted 5 lines
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.
I also don't see why multiple directives are necessary or useful.
All that matters is that the xen binary gets started at any of its optional entry points, and that there are one or more modules loaded.
~Andrew
Quoted 4 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
Quoted 8 lines
Quoted 5 lines
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.
I also don't see why multiple directives are necessary or useful.
All that matters is that the xen binary gets started at any of its optional entry points, and that there are one or more modules loaded.
~Andrew
12.11.2015 18:44, Jan Beulich пишет:
Quoted 10 lines
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???
Quoted 4 lines
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.
Loader commands traditionally reflected underlying protocol. Using multiboot command in this case would be confusing as this is not multiboot. But I agree that it is becoming ridiculous. Probably
xen_kernelxen_module
would be enough.
Quoted 9 lines
Jan
Quoted 3 lines
On arm64 it would use the arm64 xen FDT protocol but on x86 should we use multiboot2 if multiboot2 header is present and multiboot otherwise? Or do xen devs have other preferences?
Quoted 5 lines
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
12.11.2015 18:44, Jan Beulich пишет:
Quoted 10 lines
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???
Quoted 4 lines
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.
Loader commands traditionally reflected underlying protocol. Using multiboot command in this case would be confusing as this is not multiboot. But I agree that it is becoming ridiculous. Probably
xen_kernelxen_module
would be enough.
Quoted 14 lines
Jan
Quoted 3 lines
On arm64 it would use the arm64 xen FDT protocol but on x86 should we use multiboot2 if multiboot2 header is present and multiboot otherwise? Or do xen devs have other preferences?
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 17:58, <[email protected]> wrote:
12.11.2015 18:44, Jan Beulich пишет:
Quoted 10 lines
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???
Quoted 8 lines
Quoted 4 lines
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.Loader commands traditionally reflected underlying protocol. Using multiboot command in this case would be confusing as this is not multiboot.
Why would it not be multiboot?
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 10 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???
Quoted 3 lines
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.
You likely aren't aware that on ARM Xen doesn't boot via multiboot, but via a protocol which involves passing modules in an fdt[0].
I had originally hoped that this would use the same command names in the grub cfg, such that things would just work, however the grub maintainers didn't like that (and I appreciate why).
Hence on grub/ARM we already have xen_{hypervisor,kernel,initrd,...}.
The question then is what grub-mkconfig (or more precisely /etc/grub.d/20_linux_xen) ought to emit so that things just work on all architectures.
The author of the grub/ARM/Xen patches initially made it generate the xen_* namas for arm and the multiboot names for x86, here is Vladimir's feedback on that: http://lists.gnu.org/archive/html/grub-devel/2015-10/msg00133.html
Which I think gets us to approximately today and Vladimir's question.
Ian.
[0] http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot
Quoted 10 lines
Jan
Quoted 3 lines
On arm64 it would use the arm64 xen FDT protocol but on x86 should we use multiboot2 if multiboot2 header is present and multiboot otherwise? Or do xen devs have other preferences?
Quoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 17:58, <[email protected]> wrote:
12.11.2015 18:44, Jan Beulich пишет:
Quoted 10 lines
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???
Quoted 8 lines
Quoted 4 lines
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.Loader commands traditionally reflected underlying protocol. Using multiboot command in this case would be confusing as this is not multiboot.
Why would it not be multiboot?
Jan
Quoted 10 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???
Quoted 3 lines
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.
You likely aren't aware that on ARM Xen doesn't boot via multiboot, but via a protocol which involves passing modules in an fdt[0].
I had originally hoped that this would use the same command names in the grub cfg, such that things would just work, however the grub maintainers didn't like that (and I appreciate why).
Hence on grub/ARM we already have xen_{hypervisor,kernel,initrd,...}.
The question then is what grub-mkconfig (or more precisely /etc/grub.d/20_linux_xen) ought to emit so that things just work on all architectures.
The author of the grub/ARM/Xen patches initially made it generate the xen_* namas for arm and the multiboot names for x86, here is Vladimir's feedback on that: http://lists.gnu.org/archive/html/grub-devel/2015-10/msg00133.html
Which I think gets us to approximately today and Vladimir's question.
Ian.
[0] http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot
Quoted 14 lines
Jan
Quoted 3 lines
On arm64 it would use the arm64 xen FDT protocol but on x86 should we use multiboot2 if multiboot2 header is present and multiboot otherwise? Or do xen devs have other preferences?
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
12.11.2015 20:08, Jan Beulich пишет:
Quoted 17 lines
Quoted 17 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 17:58, <[email protected]> wrote:
12.11.2015 18:44, Jan Beulich пишет:
Quoted 14 lines
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.
Quoted 6 lines
Quoted 3 lines
Loader commands traditionally reflected underlying protocol. Using multiboot command in this case would be confusing as this is not multiboot.
Why would it not be multiboot?
It is multiboot on x86 but it is something different on arm64; or did I misunderstand something?
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
12.11.2015 20:08, Jan Beulich пишет:
Quoted 17 lines
Quoted 17 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 17:58, <[email protected]> wrote:
12.11.2015 18:44, Jan Beulich пишет:
Quoted 14 lines
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.
Quoted 6 lines
Quoted 3 lines
Loader commands traditionally reflected underlying protocol. Using multiboot command in this case would be confusing as this is not multiboot.
Why would it not be multiboot?
It is multiboot on x86 but it is something different on arm64; or did I misunderstand something?
Quoted 29 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 18:09, <[email protected]> wrote:
Quoted 10 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???Quoted 3 lines
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.You likely aren't aware that on ARM Xen doesn't boot via multiboot, but via a protocol which involves passing modules in an fdt[0].
I had originally hoped that this would use the same command names in the grub cfg, such that things would just work, however the grub maintainers didn't like that (and I appreciate why).
Hence on grub/ARM we already have xen_{hypervisor,kernel,initrd,...}.
The question then is what grub-mkconfig (or more precisely
/etc/grub.d/20_linux_xen) ought to emit so that things just work on all architectures.
Quoted 5 lines
The author of the grub/ARM/Xen patches initially made it generate the xen_* namas for arm and the multiboot names for x86, here is Vladimir's feedback on that: http://lists.gnu.org/archive/html/grub-devel/2015-10/msg00133.html
Which I think gets us to approximately today and Vladimir's question.
Now that makes the situation really ugly (and supports my reservations regarding grub2 as a uniform solution for everything). How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
I think any architecture following a well defined, cross-arch protocol (like multiboot) should not require any special xen_* directives. If ARM64 needs Xen to be treated specially, special directives are maybe warranted for this particular case, but I don't see why all architectures supporting Xen should then automatically have to use those too. But yes, it's not my call decide this...
Jan
Quoted 29 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 18:09, <[email protected]> wrote:
Quoted 10 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???Quoted 3 lines
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.You likely aren't aware that on ARM Xen doesn't boot via multiboot, but via a protocol which involves passing modules in an fdt[0].
I had originally hoped that this would use the same command names in the grub cfg, such that things would just work, however the grub maintainers didn't like that (and I appreciate why).
Hence on grub/ARM we already have xen_{hypervisor,kernel,initrd,...}.
The question then is what grub-mkconfig (or more precisely
/etc/grub.d/20_linux_xen) ought to emit so that things just work on all architectures.
Quoted 5 lines
The author of the grub/ARM/Xen patches initially made it generate the xen_* namas for arm and the multiboot names for x86, here is Vladimir's feedback on that: http://lists.gnu.org/archive/html/grub-devel/2015-10/msg00133.html
Which I think gets us to approximately today and Vladimir's question.
Now that makes the situation really ugly (and supports my reservations regarding grub2 as a uniform solution for everything). How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
I think any architecture following a well defined, cross-arch protocol (like multiboot) should not require any special xen_* directives. If ARM64 needs Xen to be treated specially, special directives are maybe warranted for this particular case, but I don't see why all architectures supporting Xen should then automatically have to use those too. But yes, it's not my call decide this...
Jan
Quoted 29 lines · Jan Beulich
Quoted 29 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 18:09, <[email protected]> wrote:
Quoted 10 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???Quoted 3 lines
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.You likely aren't aware that on ARM Xen doesn't boot via multiboot, but via a protocol which involves passing modules in an fdt[0].
I had originally hoped that this would use the same command names in the grub cfg, such that things would just work, however the grub maintainers didn't like that (and I appreciate why).
Hence on grub/ARM we already have xen_{hypervisor,kernel,initrd,...}.
The question then is what grub-mkconfig (or more precisely
/etc/grub.d/20_linux_xen) ought to emit so that things just work on all architectures.
Quoted 8 lines
Quoted 5 lines
The author of the grub/ARM/Xen patches initially made it generate the xen_* namas for arm and the multiboot names for x86, here is Vladimir's feedback on that: http://lists.gnu.org/archive/html/grub-devel/2015-10/msg00133.html
Which I think gets us to approximately today and Vladimir's question.
Now that makes the situation really ugly (and supports my reservations regarding grub2 as a uniform solution for everything).
Well, if you want uniform solution for everything why not simply implement uniform boot protocol everywhere?
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
Quoted 6 lines
I think any architecture following a well defined, cross-arch protocol (like multiboot) should not require any special xen_* directives. If ARM64 needs Xen to be treated specially, special directives are maybe warranted for this particular case, but I don't see why all architectures supporting Xen should then automatically have to use those too.
So we can have common grub.cfg that does not depend on each platform peculiarities and can be reused everywhere. Exactly so that grub could be uniform solution for everything.
Let's face it. Bootloader obviously must be aware of any changes in boot protocol requires for a kernel. If (Xen) boot protocol does any addition, bootloader (GRUB) obviously must implement this addition. As soon as it needs to implement it for at least one supported arch - it will automatically be available on every other Xen platform. So it does not really cost anything (and you can continue to use "module" on multiboot complying platforms anyway).
Because we already have precedent of using incompatible Xen boot protocol on different architectures, we try to find uniform solution that covers everything. Give us protocol that does not require knowledge of module type everywhere and we will use. But so far you just shoot the messenger.
Quoted 29 lines · Jan Beulich
Quoted 29 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 18:09, <[email protected]> wrote:
Quoted 10 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???Quoted 3 lines
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.You likely aren't aware that on ARM Xen doesn't boot via multiboot, but via a protocol which involves passing modules in an fdt[0].
I had originally hoped that this would use the same command names in the grub cfg, such that things would just work, however the grub maintainers didn't like that (and I appreciate why).
Hence on grub/ARM we already have xen_{hypervisor,kernel,initrd,...}.
The question then is what grub-mkconfig (or more precisely
/etc/grub.d/20_linux_xen) ought to emit so that things just work on all architectures.
Quoted 8 lines
Quoted 5 lines
The author of the grub/ARM/Xen patches initially made it generate the xen_* namas for arm and the multiboot names for x86, here is Vladimir's feedback on that: http://lists.gnu.org/archive/html/grub-devel/2015-10/msg00133.html
Which I think gets us to approximately today and Vladimir's question.
Now that makes the situation really ugly (and supports my reservations regarding grub2 as a uniform solution for everything).
Well, if you want uniform solution for everything why not simply implement uniform boot protocol everywhere?
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
Quoted 6 lines
I think any architecture following a well defined, cross-arch protocol (like multiboot) should not require any special xen_* directives. If ARM64 needs Xen to be treated specially, special directives are maybe warranted for this particular case, but I don't see why all architectures supporting Xen should then automatically have to use those too.
So we can have common grub.cfg that does not depend on each platform peculiarities and can be reused everywhere. Exactly so that grub could be uniform solution for everything.
Let's face it. Bootloader obviously must be aware of any changes in boot protocol requires for a kernel. If (Xen) boot protocol does any addition, bootloader (GRUB) obviously must implement this addition. As soon as it needs to implement it for at least one supported arch - it will automatically be available on every other Xen platform. So it does not really cost anything (and you can continue to use "module" on multiboot complying platforms anyway).
Because we already have precedent of using incompatible Xen boot protocol on different architectures, we try to find uniform solution that covers everything. Give us protocol that does not require knowledge of module type everywhere and we will use. But so far you just shoot the messenger.
Quoted 40 lines · Jan Beulich
Quoted 40 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 18:09, <[email protected]> wrote:
Quoted 11 lines · Jan Beulich
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all
platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???Quoted 3 lines
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.You likely aren't aware that on ARM Xen doesn't boot via multiboot, but via
a protocol which involves passing modules in an fdt[0].I had originally hoped that this would use the same command names in the
grub cfg, such that things would just work, however the grub maintainers
didn't like that (and I appreciate why).Hence on grub/ARM we already have xen_{hypervisor,kernel,initrd,...}.
The question then is what grub-mkconfig (or more precisely
/etc/grub.d/20_linux_xen) ought to emit so that things just work on all architectures.The author of the grub/ARM/Xen patches initially made it generate the xen_*
namas for arm and the multiboot names for x86, here is Vladimir's feedback
on that: http://lists.gnu.org/archive/html/grub-devel/2015-10/msg00133.
html
Quoted 7 lines
Quoted 1 line
Which I think gets us to approximately today and Vladimir's question.
Now that makes the situation really ugly (and supports my reservations regarding grub2 as a uniform solution for everything). How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
When I initially designed[0] my intention was that grub.cfg would be unchanged between x86 and arm and therefore that the usual "multiboot" and "module" commands would be used, but would be backed by the FDT protocol not actual multiboot (my logic was that multiboot1 would never be added to ARM and multiboot2 uses different command names so there was no clash, grub upstream had good reasons for objecting to that though).
However at that time Xen/ARM didn't do as Xen/x86 does and assume something from the ordering of the modules (first==dom0 kernel, second==dom0 initrd, mechanisms to scan for other types, etc). Which led to the stuff at [1] which put the onus for this inference into the bootloader, in a rather complex way.
I since got convinced that this was madness and implemented in Xen/ARM similar logic to x86 (i.e. inference based on the module ordering) so that the bootloader could just present the modules in the order the cfg has them and Xen/ARM would DTRT for the same set of common cases as Xen/x86 would.
At this point I should have updated [0] to much simplify things, since now a single module command would have been much simpler. But it looks like I neglected to do so and so the complex module type inference described in
[1] morphed during review (i.e. objections to the complicated type handling in [1]) into the current xen_{kernel,initrd,foo} stuff we have now. Sorry for a) not updating that wiki page in a timely manner and b) not noticing this discrepancy was occurring during review.
I think at this point for the ARM stuff we could now ditch all these xen_{kernel,initrd,xsm} etc in favour of a single xen_module command which doesn't automatically attempt to infer or specify the type, and just lets Xen figure it out.
AFAICT on the grub side this would mean exposing grub_cmd_xen_module directly as a command and dropping the uses of set_module_type and the other aliases.
Aside: Ideally I'd like to see a simplified variant of the --type stuff added, which just takes a raw fdt compat value to use for flexibility in the future, but that's not critical and orthogonal to this discussion.
Quoted 6 lines
I think any architecture following a well defined, cross-arch protocol (like multiboot) should not require any special xen_* directives. If ARM64 needs Xen to be treated specially, special directives are maybe warranted for this particular case, but I don't see why all architectures supporting Xen should then automatically have to use those too. But yes, it's not my call decide this...
So the above would IMHO make arm64 a) more rational and b) closer to how multiboot/x86 behaves, but I don't really think it addresses your core concern.
In [2] Vladimir proposed three options to avoid assumption about the machine which runs grub-mkconfig not being the one which is going to execute grub.cfg:
- Check arch on boot time
- Check that new xen commands are supported (define a new feature)
Both of which are alternatives to the proposal for uniform commands made here. Both have the same downside which is that the grub.cfg then becomes if <some condition>; then
xen_hypervisor AAAA
xen_module BBB
xen_module CCC
else
multiboot AAAA
module BBB
module CCC
fi
Which is added complexity in grub.cfg and in 20_linux_xen (only the latter of which is really "user serviceable" though).
Ian.
[0] http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot
[1] http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot#Command:_module
[2] http://lists.gnu.org/archive/html/grub-devel/2015-10/msg00133.html
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 40 lines · Jan Beulich
Quoted 40 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 18:09, <[email protected]> wrote:
Quoted 11 lines · Jan Beulich
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 12.11.15 at 14:41, <[email protected]> wrote:
Hello, all. I'd like to have set of commands that would boot xen on all
platforms. I thought of following set:
xen_hypervisorFILEXEN_OPTIONSxen_kernelFILEKERNEL_OPTIONSxen_initrdINITRD INITRD INITRD
all initrds are concatenated.xen_xsm???Quoted 3 lines
xen_ucode(and we might add more going forward). I don't see why the multiboot mechanism (kernel plus any number of modules) can't be used, without adding any Xen-specific directives.You likely aren't aware that on ARM Xen doesn't boot via multiboot, but via
a protocol which involves passing modules in an fdt[0].I had originally hoped that this would use the same command names in the
grub cfg, such that things would just work, however the grub maintainers
didn't like that (and I appreciate why).Hence on grub/ARM we already have xen_{hypervisor,kernel,initrd,...}.
The question then is what grub-mkconfig (or more precisely
/etc/grub.d/20_linux_xen) ought to emit so that things just work on all architectures.The author of the grub/ARM/Xen patches initially made it generate the xen_*
namas for arm and the multiboot names for x86, here is Vladimir's feedback
on that: http://lists.gnu.org/archive/html/grub-devel/2015-10/msg00133.
html
Quoted 7 lines
Quoted 1 line
Which I think gets us to approximately today and Vladimir's question.
Now that makes the situation really ugly (and supports my reservations regarding grub2 as a uniform solution for everything). How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
When I initially designed[0] my intention was that grub.cfg would be unchanged between x86 and arm and therefore that the usual "multiboot" and "module" commands would be used, but would be backed by the FDT protocol not actual multiboot (my logic was that multiboot1 would never be added to ARM and multiboot2 uses different command names so there was no clash, grub upstream had good reasons for objecting to that though).
However at that time Xen/ARM didn't do as Xen/x86 does and assume something from the ordering of the modules (first==dom0 kernel, second==dom0 initrd, mechanisms to scan for other types, etc). Which led to the stuff at [1] which put the onus for this inference into the bootloader, in a rather complex way.
I since got convinced that this was madness and implemented in Xen/ARM similar logic to x86 (i.e. inference based on the module ordering) so that the bootloader could just present the modules in the order the cfg has them and Xen/ARM would DTRT for the same set of common cases as Xen/x86 would.
At this point I should have updated [0] to much simplify things, since now a single module command would have been much simpler. But it looks like I neglected to do so and so the complex module type inference described in
[1] morphed during review (i.e. objections to the complicated type handling in [1]) into the current xen_{kernel,initrd,foo} stuff we have now. Sorry for a) not updating that wiki page in a timely manner and b) not noticing this discrepancy was occurring during review.
I think at this point for the ARM stuff we could now ditch all these xen_{kernel,initrd,xsm} etc in favour of a single xen_module command which doesn't automatically attempt to infer or specify the type, and just lets Xen figure it out.
AFAICT on the grub side this would mean exposing grub_cmd_xen_module directly as a command and dropping the uses of set_module_type and the other aliases.
Aside: Ideally I'd like to see a simplified variant of the --type stuff added, which just takes a raw fdt compat value to use for flexibility in the future, but that's not critical and orthogonal to this discussion.
Quoted 6 lines
I think any architecture following a well defined, cross-arch protocol (like multiboot) should not require any special xen_* directives. If ARM64 needs Xen to be treated specially, special directives are maybe warranted for this particular case, but I don't see why all architectures supporting Xen should then automatically have to use those too. But yes, it's not my call decide this...
So the above would IMHO make arm64 a) more rational and b) closer to how multiboot/x86 behaves, but I don't really think it addresses your core concern.
In [2] Vladimir proposed three options to avoid assumption about the machine which runs grub-mkconfig not being the one which is going to execute grub.cfg:
- Check arch on boot time
- Check that new xen commands are supported (define a new feature)
Both of which are alternatives to the proposal for uniform commands made here. Both have the same downside which is that the grub.cfg then becomes if <some condition>; then
xen_hypervisor AAAA
xen_module BBB
xen_module CCC
else
multiboot AAAA
module BBB
module CCC
fi
Which is added complexity in grub.cfg and in 20_linux_xen (only the latter of which is really "user serviceable" though).
Ian.
[0] http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot
[1] http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot#Command:_module
[2] http://lists.gnu.org/archive/html/grub-devel/2015-10/msg00133.html
Quoted 9 lines · Andrei Borzenkov
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
At first Xen/ARM required the bootloader to identify, but that was since identified as causing madness and fixed by having Xen/ARM do as Xen/x86 does and figure things out for itself, but I failed to communicate this clearly and things got implemented on the grub side under the old assumptions.
I just replied in more detail about that to Jan's mail, so I won't repeat myself further here.
Ian.
Quoted 9 lines · Andrei Borzenkov
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
At first Xen/ARM required the bootloader to identify, but that was since identified as causing madness and fixed by having Xen/ARM do as Xen/x86 does and figure things out for itself, but I failed to communicate this clearly and things got implemented on the grub side under the old assumptions.
I just replied in more detail about that to Jan's mail, so I won't repeat myself further here.
Ian.
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Andrei Borzenkov
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
Quoted 6 lines
At first Xen/ARM required the bootloader to identify, but that was since identified as causing madness and fixed by having Xen/ARM do as Xen/x86 does and figure things out for itself, but I failed to communicate this clearly and things got implemented on the grub side under the old assumptions.
This changes a lot. This removes most of hurdles towards uniformity. Are you ok with replacing xen_kernel/xen_xsm/... with just xen_module and dropping type altogether?
Do you think that it makes sense to have xen_initrd in order to have in-memory initrd concatenation like baremetal counterpart? In either case we can add it later. I'd rather not have a command than to change its meaning later.
Jan, does it address your concerns?
Quoted 5 lines
I just replied in more detail about that to Jan's mail, so I won't repeat myself further here.
Ian.
grub-core/loader/arm64/xen_boot.c +30 -119
@@ -38,17 +38,6 @@ GRUB_MOD_LICENSE ("GPLv3+");#define XEN_HYPERVISOR_NAME "xen_hypervisor" -#define MODULE_DEFAULT_ALIGN (0x0) -#define MODULE_IMAGE_MIN_ALIGN MODULE_DEFAULT_ALIGN -#define MODULE_INITRD_MIN_ALIGN MODULE_DEFAULT_ALIGN -#define MODULE_XSM_MIN_ALIGN MODULE_DEFAULT_ALIGN -#define MODULE_CUSTOM_MIN_ALIGN MODULE_DEFAULT_ALIGN - -#define MODULE_IMAGE_COMPATIBLE "multiboot,kernel\0multiboot,module" -#define MODULE_INITRD_COMPATIBLE "multiboot,ramdisk\0multiboot,module" -#define MODULE_XSM_COMPATIBLE "xen,xsm-policy\0multiboot,module" -#define MODULE_CUSTOM_COMPATIBLE "multiboot,module" -/* This maximum size is defined in Power.org ePAPR V1.1 * https://www.power.org/documentation/epapr-version-1-1/ * 2.2.1.1 Node Name Requirements
@@ -74,14 +63,6 @@ enum module_type };typedef enum module_type module_type_t ; -struct fdt_node_info -{ -module_type_t type; - -const char *compat_string; -grub_size_t compat_string_size; -}; -struct xen_hypervisor_header {struct grub_arm64_linux_kernel_header efi_head;
@@ -98,7 +79,7 @@ struct xen_boot_binary {struct xen_boot_binary *next;struct xen_boot_binary **prev; -const char *name; +int is_hypervisor;grub_addr_t start;grub_size_t size;
@@ -106,8 +87,6 @@ struct xen_boot_binarychar *cmdline;int cmdline_size; - -struct fdt_node_info node_info; };static grub_dl_t my_mod;
@@ -116,19 +95,6 @@ static int loaded;static struct xen_boot_binary *xen_hypervisor;static struct xen_boot_binary *module_head; -static const grub_size_t module_default_align[] = { -MODULE_IMAGE_MIN_ALIGN , -MODULE_INITRD_MIN_ALIGN , -MODULE_XSM_MIN_ALIGN , -MODULE_CUSTOM_MIN_ALIGN -}; - -static const compat_string_struct_t default_compat_string[] = { -FDT_COMPATIBLE (MODULE_IMAGE_COMPATIBLE ), -FDT_COMPATIBLE (MODULE_INITRD_COMPATIBLE ), -FDT_COMPATIBLE (MODULE_XSM_COMPATIBLE ), -FDT_COMPATIBLE (MODULE_CUSTOM_COMPATIBLE ) -};static __inlinegrub_addr_t xen_boot_address_align (grub_addr_t start,grub_size_t align)
@@ -136,20 +102,6 @@ xen_boot_address_align (grub_addr_t start, grub_size_t align)return (align ? (ALIGN_UP (start, align)) : start); } -/* set module type according to command name. */ -static grub_err_t -set_module_type (grub_command_t cmd,struct xen_boot_binary *module) -{ -if (!grub_strcmp (cmd->name,"xen_linux" )) - module->node_info.type =MODULE_IMAGE ; -else if (!grub_strcmp (cmd->name,"xen_initrd" )) - module->node_info.type =MODULE_INITRD ; -else if (!grub_strcmp (cmd->name,"xen_xsm" )) - module->node_info.type =MODULE_XSM ; - -return GRUB_ERR_NONE ; -} -static grub_err_t prepare_xen_hypervisor_params (void *xen_boot_fdt) {
@@ -203,15 +155,11 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt)grub_fdt_add_subnode (xen_boot_fdt, chosen_node, module_name); retval =grub_fdt_set_prop (xen_boot_fdt, module_node,"compatible" , - module->node_info.compat_string, - (grub_uint32_t ) module-> - node_info.compat_string_size); +"deprecated" ,sizeof ("deprecated" ) -1 );if (retval)return grub_error (GRUB_ERR_IO ,"failed to update FDT" ); -grub_dprintf ("xen_loader" ,"Module %s compatible = %s size = 0x%lx\n" , - module->name, module->node_info.compat_string, - module->node_info.compat_string_size); +grub_dprintf ("xen_loader" ,"Module\n" ); retval = grub_fdt_set_reg64 (xen_boot_fdt, module_node, xen_boot_address_align (module->start,
@@ -223,7 +171,7 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt)if (module->cmdline && module->cmdline_size >0 ) {grub_dprintf ("xen_loader" , -"Module %s cmdline : %s @ %p size:%d\n" , module->name, +"Module cmdline : %s @ %p size:%d\n" , module->cmdline, module->cmdline, module->cmdline_size); retval = grub_fdt_set_prop (xen_boot_fdt, module_node, "bootargs",
@@ -233,8 +181,7 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt) }else { -grub_dprintf ("xen_loader" ,"Module %s has not bootargs!\n" , - module->name); +grub_dprintf ("xen_loader" ,"Module has no bootargs!\n" ); }return GRUB_ERR_NONE ;
@@ -251,8 +198,8 @@ finalize_params_xen_boot (void) additional_size +=FDT_NODE_NAME_MAX_SIZE + xen_hypervisor->cmdline_size; FOR_LIST_ELEMENTS (module, module_head) { - additional_size +=6 *FDT_NODE_NAME_MAX_SIZE + module-> - node_info.compat_string_size + module->cmdline_size; + additional_size +=6 *FDT_NODE_NAME_MAX_SIZE +sizeof ("deprecated" ) -1 + + module->cmdline_size; } xen_boot_fdt =grub_fdt_load (additional_size);
@@ -275,8 +222,7 @@ finalize_params_xen_boot (void) {if (module->start && module->size >0 ) { -grub_dprintf ("xen_loader" ,"Module %s @ 0x%lx size:0x%lx\n" , - module->name, +grub_dprintf ("xen_loader" ,"Module @ 0x%lx size:0x%lx\n" ,xen_boot_address_align (module->start, module->align), module->size);if (prepare_xen_module_params (module, xen_boot_fdt) !=GRUB_ERR_NONE )
@@ -284,7 +230,7 @@ finalize_params_xen_boot (void) }else { -grub_dprintf ("xen_loader" ,"Module info error: %s!\n" , module->name); +grub_dprintf ("xen_loader" ,"Module info error!\n" ); goto fail; } }
@@ -327,19 +273,16 @@ single_binary_unload (struct xen_boot_binary *binary) {grub_free (binary->cmdline);grub_dprintf ("xen_loader" , -"Module %s cmdline memory free @ %p size: %d\n" , - binary->name, binary->cmdline, binary->cmdline_size); +"Module cmdline memory free @ %p size: %d\n" , + binary->cmdline, binary->cmdline_size); } -if (binary->node_info.type ==MODULE_CUSTOM ) -grub_free ((void *) binary->node_info.compat_string); - -if (grub_strcmp (binary->name,XEN_HYPERVISOR_NAME )) +if (!binary->is_hypervisor)grub_list_remove (GRUB_AS_LIST (binary));grub_dprintf ("xen_loader" , -"Module %s struct memory free @ %p size: 0x%lx\n" , - binary->name, binary,sizeof (binary)); +"Module struct memory free @ %p size: 0x%lx\n" , + binary,sizeof (binary));grub_free (binary);return ;
@@ -377,8 +320,7 @@ xen_boot_binary_load (struct xen_boot_binary *binary, grub_file_t file, int argc, char *argv[]) { binary->size = grub_file_size (file); -grub_dprintf ("xen_loader" ,"Xen_boot %s file size: 0x%lx\n" , - binary->name, binary->size); +grub_dprintf ("xen_loader" ,"Xen_boot file size: 0x%lx\n" , binary->size); binary->start = (grub_addr_t) grub_efi_allocate_pages (0,
@@ -391,8 +333,8 @@ xen_boot_binary_load (struct xen_boot_binary *binary, grub_file_t file,return ; } -grub_dprintf ("xen_loader" ,"Xen_boot %s numpages: 0x%lx\n" , - binary->name,GRUB_EFI_BYTES_TO_PAGES (binary->size + binary->align)); +grub_dprintf ("xen_loader" ,"Xen_boot numpages: 0x%lx\n" , +GRUB_EFI_BYTES_TO_PAGES (binary->size + binary->align)); if (grub_file_read (file, (void *) xen_boot_address_align (binary->start, binary->align),
@@ -416,7 +358,7 @@ xen_boot_binary_load (struct xen_boot_binary *binary, grub_file_t file,grub_create_loader_cmdline (argc -1 , argv +1 , binary->cmdline, binary->cmdline_size);grub_dprintf ("xen_loader" , -"Xen_boot %s cmdline @ %p %s, size: %d\n" , binary->name, +"Xen_boot cmdline @ %p %s, size: %d\n" , binary->cmdline, binary->cmdline, binary->cmdline_size); }else
@@ -430,7 +372,8 @@ xen_boot_binary_load (struct xen_boot_binary *binary, grub_file_t file, }static grub_err_t -grub_cmd_xen_module (grub_command_t cmd,int argc,char *argv[]) +grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)), +int argc,char *argv[]) {struct xen_boot_binary *module =NULL ;
@@ -454,34 +397,10 @@ grub_cmd_xen_module (grub_command_t cmd, int argc, char *argv[])if (!module)return grub_errno; -/* process all the options and get module type */ -if (set_module_type (cmd, module) !=GRUB_ERR_NONE ) - goto fail; -switch (module->node_info.type) - { -case MODULE_IMAGE : -case MODULE_INITRD : -case MODULE_XSM : - module->node_info.compat_string = - default_compat_string[module->node_info.type].compat_string; - module->node_info.compat_string_size = - default_compat_string[module->node_info.type].size; -break ; - -case MODULE_CUSTOM : -/* we have set the node_info in set_module_type */ -break ; - -default : -return grub_error (GRUB_ERR_BAD_ARGUMENT ,N_ ("invalid argument" )); - } - module->name = module->node_info.compat_string; - module->align = module_default_align[module->node_info.type]; + module->is_hypervisor =0 ; + module->align =4096 ; -grub_dprintf ("xen_loader" ,"Init %s module and node info:\n" -"compatible %s\ncompat_string_size 0x%lx\n" , - module->name, module->node_info.compat_string, - module->node_info.compat_string_size); +grub_dprintf ("xen_loader" ,"Init module and node info\n" ); file =grub_file_open (argv[0 ]);if (!file)
@@ -491,7 +410,7 @@ grub_cmd_xen_module (grub_command_t cmd, int argc, char *argv[])if (grub_errno ==GRUB_ERR_NONE )grub_list_push (GRUB_AS_LIST_P (&module_head),GRUB_AS_LIST (module)); -fail: + fail:if (file)grub_file_close (file);if (grub_errno !=GRUB_ERR_NONE )
@@ -535,7 +454,7 @@ grub_cmd_xen_hypervisor (grub_command_t cmd __attribute__ ((unused)),if (!xen_hypervisor)return grub_errno; - xen_hypervisor->name =XEN_HYPERVISOR_NAME ; + xen_hypervisor->is_hypervisor =1 ; xen_hypervisor->align = (grub_size_t ) sh.optional_header.section_alignment;xen_boot_binary_load (xen_hypervisor, file, argc, argv);
@@ -559,29 +478,21 @@ fail: }static grub_command_t cmd_xen_hypervisor; -static grub_command_t cmd_xen_linux, cmd_xen_initrd, cmd_xen_xsm; +static grub_command_t cmd_xen_module;GRUB_MOD_INIT (xen_boot) { cmd_xen_hypervisor =grub_register_command ("xen_hypervisor" , grub_cmd_xen_hypervisor,0 ,N_ ("Load a xen hypervisor." )); - cmd_xen_linux = -grub_register_command ("xen_linux" , grub_cmd_xen_module,0 , -N_ ("Load a xen linux kernel for dom0." )); - cmd_xen_initrd = -grub_register_command ("xen_initrd" , grub_cmd_xen_module,0 , -N_ ("Load a xen initrd for dom0." )); - cmd_xen_xsm = -grub_register_command ("xen_xsm" , grub_cmd_xen_module,0 , -N_ ("Load a xen security module." )); + cmd_xen_module = +grub_register_command ("xen_module" , grub_cmd_xen_module,0 , +N_ ("Load a xen module." )); my_mod = mod; }GRUB_MOD_FINI (xen_boot) {grub_unregister_command (cmd_xen_hypervisor); -grub_unregister_command (cmd_xen_linux); -grub_unregister_command (cmd_xen_initrd); -grub_unregister_command (cmd_xen_xsm); +grub_unregister_command (cmd_xen_module); }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Andrei Borzenkov
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
Quoted 6 lines
At first Xen/ARM required the bootloader to identify, but that was since identified as causing madness and fixed by having Xen/ARM do as Xen/x86 does and figure things out for itself, but I failed to communicate this clearly and things got implemented on the grub side under the old assumptions.
This changes a lot. This removes most of hurdles towards uniformity. Are you ok with replacing xen_kernel/xen_xsm/... with just xen_module and dropping type altogether?
Do you think that it makes sense to have xen_initrd in order to have in-memory initrd concatenation like baremetal counterpart? In either case we can add it later. I'd rather not have a command than to change its meaning later.
Jan, does it address your concerns?
Quoted 5 lines
I just replied in more detail about that to Jan's mail, so I won't repeat myself further here.
Ian.
grub-core/loader/arm64/xen_boot.c +30 -119
@@ -38,17 +38,6 @@ GRUB_MOD_LICENSE ("GPLv3+");#define XEN_HYPERVISOR_NAME "xen_hypervisor" -#define MODULE_DEFAULT_ALIGN (0x0) -#define MODULE_IMAGE_MIN_ALIGN MODULE_DEFAULT_ALIGN -#define MODULE_INITRD_MIN_ALIGN MODULE_DEFAULT_ALIGN -#define MODULE_XSM_MIN_ALIGN MODULE_DEFAULT_ALIGN -#define MODULE_CUSTOM_MIN_ALIGN MODULE_DEFAULT_ALIGN - -#define MODULE_IMAGE_COMPATIBLE "multiboot,kernel\0multiboot,module" -#define MODULE_INITRD_COMPATIBLE "multiboot,ramdisk\0multiboot,module" -#define MODULE_XSM_COMPATIBLE "xen,xsm-policy\0multiboot,module" -#define MODULE_CUSTOM_COMPATIBLE "multiboot,module" -/* This maximum size is defined in Power.org ePAPR V1.1 * https://www.power.org/documentation/epapr-version-1-1/ * 2.2.1.1 Node Name Requirements
@@ -74,14 +63,6 @@ enum module_type };typedef enum module_type module_type_t ; -struct fdt_node_info -{ -module_type_t type; - -const char *compat_string; -grub_size_t compat_string_size; -}; -struct xen_hypervisor_header {struct grub_arm64_linux_kernel_header efi_head;
@@ -98,7 +79,7 @@ struct xen_boot_binary {struct xen_boot_binary *next;struct xen_boot_binary **prev; -const char *name; +int is_hypervisor;grub_addr_t start;grub_size_t size;
@@ -106,8 +87,6 @@ struct xen_boot_binarychar *cmdline;int cmdline_size; - -struct fdt_node_info node_info; };static grub_dl_t my_mod;
@@ -116,19 +95,6 @@ static int loaded;static struct xen_boot_binary *xen_hypervisor;static struct xen_boot_binary *module_head; -static const grub_size_t module_default_align[] = { -MODULE_IMAGE_MIN_ALIGN , -MODULE_INITRD_MIN_ALIGN , -MODULE_XSM_MIN_ALIGN , -MODULE_CUSTOM_MIN_ALIGN -}; - -static const compat_string_struct_t default_compat_string[] = { -FDT_COMPATIBLE (MODULE_IMAGE_COMPATIBLE ), -FDT_COMPATIBLE (MODULE_INITRD_COMPATIBLE ), -FDT_COMPATIBLE (MODULE_XSM_COMPATIBLE ), -FDT_COMPATIBLE (MODULE_CUSTOM_COMPATIBLE ) -};static __inlinegrub_addr_t xen_boot_address_align (grub_addr_t start,grub_size_t align)
@@ -136,20 +102,6 @@ xen_boot_address_align (grub_addr_t start, grub_size_t align)return (align ? (ALIGN_UP (start, align)) : start); } -/* set module type according to command name. */ -static grub_err_t -set_module_type (grub_command_t cmd,struct xen_boot_binary *module) -{ -if (!grub_strcmp (cmd->name,"xen_linux" )) - module->node_info.type =MODULE_IMAGE ; -else if (!grub_strcmp (cmd->name,"xen_initrd" )) - module->node_info.type =MODULE_INITRD ; -else if (!grub_strcmp (cmd->name,"xen_xsm" )) - module->node_info.type =MODULE_XSM ; - -return GRUB_ERR_NONE ; -} -static grub_err_t prepare_xen_hypervisor_params (void *xen_boot_fdt) {
@@ -203,15 +155,11 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt)grub_fdt_add_subnode (xen_boot_fdt, chosen_node, module_name); retval =grub_fdt_set_prop (xen_boot_fdt, module_node,"compatible" , - module->node_info.compat_string, - (grub_uint32_t ) module-> - node_info.compat_string_size); +"deprecated" ,sizeof ("deprecated" ) -1 );if (retval)return grub_error (GRUB_ERR_IO ,"failed to update FDT" ); -grub_dprintf ("xen_loader" ,"Module %s compatible = %s size = 0x%lx\n" , - module->name, module->node_info.compat_string, - module->node_info.compat_string_size); +grub_dprintf ("xen_loader" ,"Module\n" ); retval = grub_fdt_set_reg64 (xen_boot_fdt, module_node, xen_boot_address_align (module->start,
@@ -223,7 +171,7 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt)if (module->cmdline && module->cmdline_size >0 ) {grub_dprintf ("xen_loader" , -"Module %s cmdline : %s @ %p size:%d\n" , module->name, +"Module cmdline : %s @ %p size:%d\n" , module->cmdline, module->cmdline, module->cmdline_size); retval = grub_fdt_set_prop (xen_boot_fdt, module_node, "bootargs",
@@ -233,8 +181,7 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt) }else { -grub_dprintf ("xen_loader" ,"Module %s has not bootargs!\n" , - module->name); +grub_dprintf ("xen_loader" ,"Module has no bootargs!\n" ); }return GRUB_ERR_NONE ;
@@ -251,8 +198,8 @@ finalize_params_xen_boot (void) additional_size +=FDT_NODE_NAME_MAX_SIZE + xen_hypervisor->cmdline_size; FOR_LIST_ELEMENTS (module, module_head) { - additional_size +=6 *FDT_NODE_NAME_MAX_SIZE + module-> - node_info.compat_string_size + module->cmdline_size; + additional_size +=6 *FDT_NODE_NAME_MAX_SIZE +sizeof ("deprecated" ) -1 + + module->cmdline_size; } xen_boot_fdt =grub_fdt_load (additional_size);
@@ -275,8 +222,7 @@ finalize_params_xen_boot (void) {if (module->start && module->size >0 ) { -grub_dprintf ("xen_loader" ,"Module %s @ 0x%lx size:0x%lx\n" , - module->name, +grub_dprintf ("xen_loader" ,"Module @ 0x%lx size:0x%lx\n" ,xen_boot_address_align (module->start, module->align), module->size);if (prepare_xen_module_params (module, xen_boot_fdt) !=GRUB_ERR_NONE )
@@ -284,7 +230,7 @@ finalize_params_xen_boot (void) }else { -grub_dprintf ("xen_loader" ,"Module info error: %s!\n" , module->name); +grub_dprintf ("xen_loader" ,"Module info error!\n" ); goto fail; } }
@@ -327,19 +273,16 @@ single_binary_unload (struct xen_boot_binary *binary) {grub_free (binary->cmdline);grub_dprintf ("xen_loader" , -"Module %s cmdline memory free @ %p size: %d\n" , - binary->name, binary->cmdline, binary->cmdline_size); +"Module cmdline memory free @ %p size: %d\n" , + binary->cmdline, binary->cmdline_size); } -if (binary->node_info.type ==MODULE_CUSTOM ) -grub_free ((void *) binary->node_info.compat_string); - -if (grub_strcmp (binary->name,XEN_HYPERVISOR_NAME )) +if (!binary->is_hypervisor)grub_list_remove (GRUB_AS_LIST (binary));grub_dprintf ("xen_loader" , -"Module %s struct memory free @ %p size: 0x%lx\n" , - binary->name, binary,sizeof (binary)); +"Module struct memory free @ %p size: 0x%lx\n" , + binary,sizeof (binary));grub_free (binary);return ;
@@ -377,8 +320,7 @@ xen_boot_binary_load (struct xen_boot_binary *binary, grub_file_t file, int argc, char *argv[]) { binary->size = grub_file_size (file); -grub_dprintf ("xen_loader" ,"Xen_boot %s file size: 0x%lx\n" , - binary->name, binary->size); +grub_dprintf ("xen_loader" ,"Xen_boot file size: 0x%lx\n" , binary->size); binary->start = (grub_addr_t) grub_efi_allocate_pages (0,
@@ -391,8 +333,8 @@ xen_boot_binary_load (struct xen_boot_binary *binary, grub_file_t file,return ; } -grub_dprintf ("xen_loader" ,"Xen_boot %s numpages: 0x%lx\n" , - binary->name,GRUB_EFI_BYTES_TO_PAGES (binary->size + binary->align)); +grub_dprintf ("xen_loader" ,"Xen_boot numpages: 0x%lx\n" , +GRUB_EFI_BYTES_TO_PAGES (binary->size + binary->align)); if (grub_file_read (file, (void *) xen_boot_address_align (binary->start, binary->align),
@@ -416,7 +358,7 @@ xen_boot_binary_load (struct xen_boot_binary *binary, grub_file_t file,grub_create_loader_cmdline (argc -1 , argv +1 , binary->cmdline, binary->cmdline_size);grub_dprintf ("xen_loader" , -"Xen_boot %s cmdline @ %p %s, size: %d\n" , binary->name, +"Xen_boot cmdline @ %p %s, size: %d\n" , binary->cmdline, binary->cmdline, binary->cmdline_size); }else
@@ -430,7 +372,8 @@ xen_boot_binary_load (struct xen_boot_binary *binary, grub_file_t file, }static grub_err_t -grub_cmd_xen_module (grub_command_t cmd,int argc,char *argv[]) +grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)), +int argc,char *argv[]) {struct xen_boot_binary *module =NULL ;
@@ -454,34 +397,10 @@ grub_cmd_xen_module (grub_command_t cmd, int argc, char *argv[])if (!module)return grub_errno; -/* process all the options and get module type */ -if (set_module_type (cmd, module) !=GRUB_ERR_NONE ) - goto fail; -switch (module->node_info.type) - { -case MODULE_IMAGE : -case MODULE_INITRD : -case MODULE_XSM : - module->node_info.compat_string = - default_compat_string[module->node_info.type].compat_string; - module->node_info.compat_string_size = - default_compat_string[module->node_info.type].size; -break ; - -case MODULE_CUSTOM : -/* we have set the node_info in set_module_type */ -break ; - -default : -return grub_error (GRUB_ERR_BAD_ARGUMENT ,N_ ("invalid argument" )); - } - module->name = module->node_info.compat_string; - module->align = module_default_align[module->node_info.type]; + module->is_hypervisor =0 ; + module->align =4096 ; -grub_dprintf ("xen_loader" ,"Init %s module and node info:\n" -"compatible %s\ncompat_string_size 0x%lx\n" , - module->name, module->node_info.compat_string, - module->node_info.compat_string_size); +grub_dprintf ("xen_loader" ,"Init module and node info\n" ); file =grub_file_open (argv[0 ]);if (!file)
@@ -491,7 +410,7 @@ grub_cmd_xen_module (grub_command_t cmd, int argc, char *argv[])if (grub_errno ==GRUB_ERR_NONE )grub_list_push (GRUB_AS_LIST_P (&module_head),GRUB_AS_LIST (module)); -fail: + fail:if (file)grub_file_close (file);if (grub_errno !=GRUB_ERR_NONE )
@@ -535,7 +454,7 @@ grub_cmd_xen_hypervisor (grub_command_t cmd __attribute__ ((unused)),if (!xen_hypervisor)return grub_errno; - xen_hypervisor->name =XEN_HYPERVISOR_NAME ; + xen_hypervisor->is_hypervisor =1 ; xen_hypervisor->align = (grub_size_t ) sh.optional_header.section_alignment;xen_boot_binary_load (xen_hypervisor, file, argc, argv);
@@ -559,29 +478,21 @@ fail: }static grub_command_t cmd_xen_hypervisor; -static grub_command_t cmd_xen_linux, cmd_xen_initrd, cmd_xen_xsm; +static grub_command_t cmd_xen_module;GRUB_MOD_INIT (xen_boot) { cmd_xen_hypervisor =grub_register_command ("xen_hypervisor" , grub_cmd_xen_hypervisor,0 ,N_ ("Load a xen hypervisor." )); - cmd_xen_linux = -grub_register_command ("xen_linux" , grub_cmd_xen_module,0 , -N_ ("Load a xen linux kernel for dom0." )); - cmd_xen_initrd = -grub_register_command ("xen_initrd" , grub_cmd_xen_module,0 , -N_ ("Load a xen initrd for dom0." )); - cmd_xen_xsm = -grub_register_command ("xen_xsm" , grub_cmd_xen_module,0 , -N_ ("Load a xen security module." )); + cmd_xen_module = +grub_register_command ("xen_module" , grub_cmd_xen_module,0 , +N_ ("Load a xen module." )); my_mod = mod; }GRUB_MOD_FINI (xen_boot) {grub_unregister_command (cmd_xen_hypervisor); -grub_unregister_command (cmd_xen_linux); -grub_unregister_command (cmd_xen_initrd); -grub_unregister_command (cmd_xen_xsm); +grub_unregister_command (cmd_xen_module); }
Quoted 19 lines
Quoted 1 line
Quoted 1 line · On 11.01.16 at 15:06, <[email protected]> wrote:
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Andrei Borzenkov
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
Quoted 6 lines
At first Xen/ARM required the bootloader to identify, but that was since identified as causing madness and fixed by having Xen/ARM do as Xen/x86 does and figure things out for itself, but I failed to communicate this clearly and things got implemented on the grub side under the old assumptions.
Quoted 8 lines
This changes a lot. This removes most of hurdles towards uniformity. Are you ok with replacing xen_kernel/xen_xsm/... with just
xen_moduleand dropping type altogether?
Do you think that it makes sense to havexen_initrdin order to have in-memory initrd concatenation like baremetal counterpart? In either case we can add it later. I'd rather not have a command than to change its meaning later.
Jan, does it address your concerns?
It improves things a bit, but I'd really like to not see any xen_ prefixed commands at all in grub2 - after all Xen should just be an ordinary multiboot client.
Jan
Quoted 19 lines
Quoted 1 line
Quoted 1 line · On 11.01.16 at 15:06, <[email protected]> wrote:
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Andrei Borzenkov
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
Quoted 6 lines
At first Xen/ARM required the bootloader to identify, but that was since identified as causing madness and fixed by having Xen/ARM do as Xen/x86 does and figure things out for itself, but I failed to communicate this clearly and things got implemented on the grub side under the old assumptions.
Quoted 8 lines
This changes a lot. This removes most of hurdles towards uniformity. Are you ok with replacing xen_kernel/xen_xsm/... with just
xen_moduleand dropping type altogether?
Do you think that it makes sense to havexen_initrdin order to have in-memory initrd concatenation like baremetal counterpart? In either case we can add it later. I'd rather not have a command than to change its meaning later.
Jan, does it address your concerns?
It improves things a bit, but I'd really like to not see any xen_ prefixed commands at all in grub2 - after all Xen should just be an ordinary multiboot client.
Jan
Quoted 28 lines · Jan Beulich
Quoted 19 lines
Quoted 1 line
Quoted 1 line · On 11.01.16 at 15:06, <[email protected]> wrote:
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Andrei Borzenkov
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
Quoted 6 lines
At first Xen/ARM required the bootloader to identify, but that was since identified as causing madness and fixed by having Xen/ARM do as Xen/x86 does and figure things out for itself, but I failed to communicate this clearly and things got implemented on the grub side under the old assumptions.
Quoted 8 lines
This changes a lot. This removes most of hurdles towards uniformity. Are you ok with replacing xen_kernel/xen_xsm/... with just
xen_moduleand dropping type altogether?
Do you think that it makes sense to havexen_initrdin order to have in-memory initrd concatenation like baremetal counterpart? In either case we can add it later. I'd rather not have a command than to change its meaning later.
Jan, does it address your concerns?
Quoted 4 lines
It improves things a bit, but I'd really like to not see any
xen_prefixed commands at all in grub2 - after all Xen should just be an ordinary multiboot client.
This is true for x86 but on ARM64 the protocol xen expects is quite different and not really multiboot. How would we avoid xen_ prefixed commands for ARM64? And when we have them it makes sense to have them on x86 as well so that the same set of commands works on both arm64 and x86
Quoted 3 lines
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 28 lines · Jan Beulich
Quoted 19 lines
Quoted 1 line
Quoted 1 line · On 11.01.16 at 15:06, <[email protected]> wrote:
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Andrei Borzenkov
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
Quoted 6 lines
At first Xen/ARM required the bootloader to identify, but that was since identified as causing madness and fixed by having Xen/ARM do as Xen/x86 does and figure things out for itself, but I failed to communicate this clearly and things got implemented on the grub side under the old assumptions.
Quoted 8 lines
This changes a lot. This removes most of hurdles towards uniformity. Are you ok with replacing xen_kernel/xen_xsm/... with just
xen_moduleand dropping type altogether?
Do you think that it makes sense to havexen_initrdin order to have in-memory initrd concatenation like baremetal counterpart? In either case we can add it later. I'd rather not have a command than to change its meaning later.
Jan, does it address your concerns?
Quoted 4 lines
It improves things a bit, but I'd really like to not see any
xen_prefixed commands at all in grub2 - after all Xen should just be an ordinary multiboot client.
This is true for x86 but on ARM64 the protocol xen expects is quite different and not really multiboot. How would we avoid xen_ prefixed commands for ARM64? And when we have them it makes sense to have them on x86 as well so that the same set of commands works on both arm64 and x86
Quoted 3 lines
Jan
Quoted 30 lines
Quoted 1 line
Quoted 1 line · On 11.01.16 at 15:58, <[email protected]> wrote:
Quoted 28 lines · Jan Beulich
Quoted 27 lines
Quoted 1 line
Quoted 1 line · On 11.01.16 at 15:06, <[email protected]> wrote:
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Andrei Borzenkov
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
Quoted 6 lines
At first Xen/ARM required the bootloader to identify, but that was since identified as causing madness and fixed by having Xen/ARM do as Xen/x86 does and figure things out for itself, but I failed to communicate this clearly and things got implemented on the grub side under the old assumptions.
This changes a lot. This removes most of hurdles towards uniformity. Are you ok with replacing xen_kernel/xen_xsm/... with just
xen_moduleand dropping type altogether?
Do you think that it makes sense to havexen_initrdin order to have in-memory initrd concatenation like baremetal counterpart? In either case we can add it later. I'd rather not have a command than to change its meaning later.
Jan, does it address your concerns?
Quoted 8 lines
Quoted 4 lines
It improves things a bit, but I'd really like to not see any
xen_prefixed commands at all in grub2 - after all Xen should just be an ordinary multiboot client.This is true for x86 but on ARM64 the protocol xen expects is quite different and not really multiboot. How would we avoid
xen_prefixed commands for ARM64? And when we have them it makes sense to have them on x86 as well so that the same set of commands works on both arm64 and x86
Well, if they're unavoidable on ARM then I can see avoiding them on x86 as not as relevant. Otoh avoiding divergence from other x86 clients might still call for them to be omitted. In the end you're the maintainer, so you should know best.
Jan
Quoted 19 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Andrei Borzenkov
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
Quoted 7 lines
At first Xen/ARM required the bootloader to identify, but that was since
identified as causing madness and fixed by having Xen/ARM do as Xen/x86 does and figure things out for itself, but I failed to communicate this clearly and things got implemented on the grub side under the old assumptions.
Quoted 3 lines
This changes a lot. This removes most of hurdles towards uniformity. Are you ok with replacing xen_kernel/xen_xsm/... with just
xen_moduleand dropping type altogether?
So ending up with xen_hypervisor followed by one or more xen_module lines? That's fine with me. This bit:
@@ -203,15 +155,11 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt) grub_fdt_add_subnode (xen_boot_fdt, chosen_node, module_name);
retval = grub_fdt_set_prop (xen_boot_fdt, module_node, "compatible",
- module->node_info.compat_string,
- (grub_uint32_t) module->
- node_info.compat_string_size);
+ "deprecated", sizeof("deprecated") - 1);
Seems to be changing the compatibility string of hte node to "deprecated", which isn't right (or at least won't work). The nodes still need to be identified as being modules per http://xenbits.xen.org/docs/unstable/misc/a
rm/device-tree/booting.txt that means "multiboot,module" (or if you insist "xen,multiboot-module").
Quoted 4 lines
Do you think that it makes sense to have
xen_initrdin order to have in-memory initrd concatenation like baremetal counterpart? In either case we can add it later. I'd rather not have a command than to change its meaning later.
If it is useful on baremetal (and I can see that it would be) then I think it would be useful on Xen too.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 19 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Andrei Borzenkov
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
Quoted 7 lines
At first Xen/ARM required the bootloader to identify, but that was since
identified as causing madness and fixed by having Xen/ARM do as Xen/x86 does and figure things out for itself, but I failed to communicate this clearly and things got implemented on the grub side under the old assumptions.
Quoted 3 lines
This changes a lot. This removes most of hurdles towards uniformity. Are you ok with replacing xen_kernel/xen_xsm/... with just
xen_moduleand dropping type altogether?
So ending up with xen_hypervisor followed by one or more xen_module lines? That's fine with me. This bit:
@@ -203,15 +155,11 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt) grub_fdt_add_subnode (xen_boot_fdt, chosen_node, module_name);
retval = grub_fdt_set_prop (xen_boot_fdt, module_node, "compatible",
- module->node_info.compat_string,
- (grub_uint32_t) module->
- node_info.compat_string_size);
+ "deprecated", sizeof("deprecated") - 1);
Seems to be changing the compatibility string of hte node to "deprecated", which isn't right (or at least won't work). The nodes still need to be identified as being modules per http://xenbits.xen.org/docs/unstable/misc/a
rm/device-tree/booting.txt that means "multiboot,module" (or if you insist "xen,multiboot-module").
Quoted 4 lines
Do you think that it makes sense to have
xen_initrdin order to have in-memory initrd concatenation like baremetal counterpart? In either case we can add it later. I'd rather not have a command than to change its meaning later.
If it is useful on baremetal (and I can see that it would be) then I think it would be useful on Xen too.
Ian.
Quoted 38 lines · Ian Campbell
Quoted 19 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Andrei Borzenkov
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
Quoted 7 lines
At first Xen/ARM required the bootloader to identify, but that was since
identified as causing madness and fixed by having Xen/ARM do as Xen/x86 does and figure things out for itself, but I failed to communicate this clearly and things got implemented on the grub side under the old assumptions.Quoted 3 lines
This changes a lot. This removes most of hurdles towards uniformity. Are you ok with replacing xen_kernel/xen_xsm/... with just
xen_moduleand dropping type altogether?So ending up with
xen_hypervisorfollowed by one or morexen_modulelines? That's fine with me. This bit:grub-core/loader/arm64/xen_boot.c +1
-3@@ -203,15 +155,11 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt)grub_fdt_add_subnode (xen_boot_fdt, chosen_node, module_name); retval =grub_fdt_set_prop (xen_boot_fdt, module_node,"compatible" , - module->node_info.compat_string, - (grub_uint32_t ) module-> - node_info.compat_string_size); +"deprecated" ,sizeof ("deprecated" ) -1 ); Seems to be changing the compatibility string of hte node to "deprecated",
Quoted 5 lines
which isn't right (or at least won't work). The nodes still need to be identified as being modules per http://xenbits.xen.org/docs/unstable/misc/a
rm/device-tree/booting.txtthat means "multiboot,module" (or if you insist "xen,multiboot-module").
Changed to "multiboot,module" and committed
Quoted 11 lines
Quoted 4 lines
Do you think that it makes sense to have
xen_initrdin order to have in-memory initrd concatenation like baremetal counterpart? In either case we can add it later. I'd rather not have a command than to change its meaning later.If it is useful on baremetal (and I can see that it would be) then I think it would be useful on Xen too.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 38 lines · Ian Campbell
Quoted 19 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 11 lines · Ian Campbell
Quoted 9 lines · Andrei Borzenkov
Quoted 4 lines
How do you express modules other than kernel+initrd in that scheme, without grub needing to be aware of any new addition we may find necessary going forward?
Are modules used by Xen self-identifying? Is it enough to simply pass Xen kernel list of binary blobs or Xen kernel must be told what these binary blobs are? If they are self identifying, why arm needs to be passed module type in the first place?
Quoted 7 lines
At first Xen/ARM required the bootloader to identify, but that was since
identified as causing madness and fixed by having Xen/ARM do as Xen/x86 does and figure things out for itself, but I failed to communicate this clearly and things got implemented on the grub side under the old assumptions.Quoted 3 lines
This changes a lot. This removes most of hurdles towards uniformity. Are you ok with replacing xen_kernel/xen_xsm/... with just
xen_moduleand dropping type altogether?So ending up with
xen_hypervisorfollowed by one or morexen_modulelines? That's fine with me. This bit:grub-core/loader/arm64/xen_boot.c +1
-3@@ -203,15 +155,11 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt)grub_fdt_add_subnode (xen_boot_fdt, chosen_node, module_name); retval =grub_fdt_set_prop (xen_boot_fdt, module_node,"compatible" , - module->node_info.compat_string, - (grub_uint32_t ) module-> - node_info.compat_string_size); +"deprecated" ,sizeof ("deprecated" ) -1 ); Seems to be changing the compatibility string of hte node to "deprecated",
Quoted 5 lines
which isn't right (or at least won't work). The nodes still need to be identified as being modules per http://xenbits.xen.org/docs/unstable/misc/a
rm/device-tree/booting.txtthat means "multiboot,module" (or if you insist "xen,multiboot-module").
Changed to "multiboot,module" and committed
Quoted 11 lines
Quoted 4 lines
Do you think that it makes sense to have
xen_initrdin order to have in-memory initrd concatenation like baremetal counterpart? In either case we can add it later. I'd rather not have a command than to change its meaning later.If it is useful on baremetal (and I can see that it would be) then I think it would be useful on Xen too.
Ian.