Xen PV block device support in Seabios
Hi,
I noticed there are some efforts to add Xen PV block device support in Seabios in a GSoC project and there is a wiki page [1] for it. I found some patches [2] to add Xenstore R/W support for Seabios. But I didn't find the patches to add PV block device driver in Seabios.
If you know please tell me where I can find these patches. And I noticed that the patches [2] and this GSoC project work didn't get applied to Seabios eventually, is there any reason? Does it mean that there are some difficulties to support Xen PV block device in Seabios?
Thanks in advance!
[1] http://wiki.xenproject.org/wiki/SeaBIOS
[2] http://www.seabios.org/pipermail/seabios/2011-August/002214.html
Signature · 7 lines
Shannon _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Hello
Quoted 7 lines · Shannon Zhao
Hi,
I noticed there are some efforts to add Xen PV block device support in Seabios in a GSoC project and there is a wiki page [1] for it. I found some patches [2] to add Xenstore R/W support for Seabios. But I didn't find the patches to add PV block device driver in Seabios.
Quoted 5 lines
If you know please tell me where I can find these patches. And I noticed that the patches [2] and this GSoC project work didn't get applied to Seabios eventually, is there any reason? Does it mean that there are some difficulties to support Xen PV block device in Seabios?
On the wiki page there seems to be some clues on why it is not implemented -- there are issues with real mode. But then everything was way before my formal involvement with Xen so I don't really know all the details.
Wei.
Quoted 8 lines
Thanks in advance!
[1] http://wiki.xenproject.org/wiki/SeaBIOS
[2] http://www.seabios.org/pipermail/seabios/2011-August/002214.htmlSignature · 1 line
Shannon
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
(nb, my citrix.com email is no longer valid)
Quoted 11 lines · Shannon Zhao
Hi,
I noticed there are some efforts to add Xen PV block device support in Seabios in a GSoC project and there is a wiki page [1] for it. I found some patches [2] to add Xenstore R/W support for Seabios. But I didn't find the patches to add PV block device driver in Seabios.
If you know please tell me where I can find these patches. And I noticed that the patches [2] and this GSoC project work didn't get applied to Seabios eventually, is there any reason? Does it mean that there are some difficulties to support Xen PV block device in Seabios?
This work was never finished, IIRC (and it was a long time ago so this might be a faulty recollection) the main stumbling block was that there is no reasonable BIOS level event which could be used to tear down the PV interfaces in order to hand them over to the OS (unlike, say, EFI where there is ExitBootServices).
So making this work would require something like a complete set of parallel PV infrastructure (devices, corresponding xenstore nodes, grant table) for the use of the BIOS firmware, or perhaps a (tricky to retrofit in a backwards compatible manner) PV facility for the guest to reset everything before starting to use them.
Ultimately it didn't seem worth the effort to engineer all that given that mostly the same aims (faster PV assisted boot) could be achieved by using UEFI for most modern OSes.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 13 lines · Ian Campbell
(nb, my citrix.com email is no longer valid)
Quoted 11 lines · Shannon Zhao
Quoted 11 lines
Hi,
I noticed there are some efforts to add Xen PV block device support in Seabios in a GSoC project and there is a wiki page [1] for it. I found some patches [2] to add Xenstore R/W support for Seabios. But I didn't find the patches to add PV block device driver in Seabios.
If you know please tell me where I can find these patches. And I noticed that the patches [2] and this GSoC project work didn't get applied to Seabios eventually, is there any reason? Does it mean that there are some difficulties to support Xen PV block device in Seabios?
Quoted 6 lines
This work was never finished, IIRC (and it was a long time ago so this might be a faulty recollection) the main stumbling block was that there is no reasonable BIOS level event which could be used to tear down the PV interfaces in order to hand them over to the OS (unlike, say, EFI where there is ExitBootServices).
Ian, thanks for your reply! It looks like the problem is how and when to clear PV resources in seabios before handing over to guest. But I wonder why virtio works in seabios. Does seabios using virtio need to clear things like vrings? Or seabios doesn't clear the things and guest just covers the configuration with new values?
Quoted 6 lines
So making this work would require something like a complete set of parallel PV infrastructure (devices, corresponding xenstore nodes, grant table) for the use of the BIOS firmware, or perhaps a (tricky to retrofit in a backwards compatible manner) PV facility for the guest to reset everything before starting to use them.
Like guest front-end driver checks if the backend state is XenbusStateInitWait, if not, tell the backend to reset to XenbusStateInitWait state?
Quoted 3 lines
Ultimately it didn't seem worth the effort to engineer all that given that mostly the same aims (faster PV assisted boot) could be achieved by using UEFI for most modern OSes.
Yes, for modern OSes it could UEFI. But for some old OSes or some existing VMs, if we want to use PV assisted boot, it needs to add this in seabios.
Thanks,
Signature · 7 lines
Shannon _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 24 lines · Shannon Zhao
Quoted 16 lines · Ian Campbell
(nb, my citrix.com email is no longer valid)
Quoted 9 lines · Shannon Zhao
Quoted 9 lines
Hi,
I noticed there are some efforts to add Xen PV block device support in Seabios in a GSoC project and there is a wiki page [1] for it. I found some patches [2] to add Xenstore R/W support for Seabios. But I didn't find the patches to add PV block device driver in Seabios.
Quoted 4 lines
Quoted 4 lines
If you know please tell me where I can find these patches. And I noticed that the patches [2] and this GSoC project work didn't get applied to Seabios eventually, is there any reason? Does it mean that there are some difficulties to support Xen PV block device in Seabios?
Quoted 6 lines
This work was never finished, IIRC (and it was a long time ago so this might be a faulty recollection) the main stumbling block was that there is no reasonable BIOS level event which could be used to tear down the PV interfaces in order to hand them over to the OS (unlike, say, EFI where there is ExitBootServices).
Quoted 5 lines
Ian, thanks for your reply! It looks like the problem is how and when to clear PV resources in seabios before handing over to guest. But I wonder why virtio works in seabios. Does seabios using virtio need to clear things like vrings? Or seabios doesn't clear the things and guest just covers the configuration with new values?
I think virtio covered this use case from day 1 by having the reset, but also by not having a xenstore ring etc.
Quoted 11 lines
Quoted 8 lines
So making this work would require something like a complete set of parallel PV infrastructure (devices, corresponding xenstore nodes, grant table) for the use of the BIOS firmware, or perhaps a (tricky to
retrofit in a backwards compatible manner) PV facility for the guest to
reset everything before starting to use them.Like guest front-end driver checks if the backend state is XenbusStateInitWait, if not, tell the backend to reset to XenbusStateInitWait state?
Before it can do this the guest needs to recover the xenbus ring (which was used by SeaBIOS) into a usable state -- so you need to be thinking at least one layer further down before you can start to think about individual devices, and don't forget the grant table (which may have in use entries from the BIOS) and event channels (which the BIOS may have setup).
I'm afraid I don't have any concrete answer for what exactly needs to be done to make this work, but I do know that it is a (IMHO very) non- trivial amount of investigation, prototyping and coding.
Quoted 8 lines
Quoted 5 lines
Ultimately it didn't seem worth the effort to engineer all that given
that mostly the same aims (faster PV assisted boot) could be achieved
by using UEFI for most modern OSes.Yes, for modern OSes it could UEFI. But for some old OSes or some existing VMs, if we want to use PV assisted boot, it needs to add this in seabios.
Sure, it's a completely reasonable feature to want, but you should be aware that there are some very non-trivial issue to be resolved, at which point you need to ask whether it is worth your time and effort.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 60 lines · Ian Campbell
Quoted 24 lines · Shannon Zhao
Quoted 24 lines · Ian Campbell
Quoted 22 lines
Quoted 22 lines
(nb, my citrix.com email is no longer valid)
Quoted 9 lines · Shannon Zhao
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Hi,
I noticed there are some efforts to add Xen PV block device support in Seabios in a GSoC project and there is a wiki page [1] for it. I found some patches [2] to add Xenstore R/W support for Seabios. But I didn't find the patches to add PV block device driver in Seabios.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
If you know please tell me where I can find these patches. And I noticed that the patches [2] and this GSoC project work didn't get applied to Seabios eventually, is there any reason? Does it mean that there are some difficulties to support Xen PV block device in Seabios?
This work was never finished, IIRC (and it was a long time ago so this might be a faulty recollection) the main stumbling block was that there is no reasonable BIOS level event which could be used to tear down the PV interfaces in order to hand them over to the OS (unlike, say, EFI where there is ExitBootServices).
Quoted 5 lines
Quoted 5 lines
Ian, thanks for your reply! It looks like the problem is how and when to clear PV resources in seabios before handing over to guest. But I wonder why virtio works in seabios. Does seabios using virtio need to clear things like vrings? Or seabios doesn't clear the things and guest just covers the configuration with new values?
I think virtio covered this use case from day 1 by having the reset, but also by not having a xenstore ring etc.
Quoted 11 lines
Quoted 11 lines
Quoted 8 lines
Quoted 8 lines
So making this work would require something like a complete set of parallel PV infrastructure (devices, corresponding xenstore nodes, grant table) for the use of the BIOS firmware, or perhaps a (tricky to
retrofit in a backwards compatible manner) PV facility for the guest to
reset everything before starting to use them.Like guest front-end driver checks if the backend state is XenbusStateInitWait, if not, tell the backend to reset to XenbusStateInitWait state?
Before it can do this the guest needs to recover the xenbus ring (which was used by SeaBIOS) into a usable state -- so you need to be thinking at least one layer further down before you can start to think about individual devices, and don't forget the grant table (which may have in use entries from the BIOS) and event channels (which the BIOS may have setup).
I'm afraid I don't have any concrete answer for what exactly needs to be done to make this work, but I do know that it is a (IMHO very) non- trivial amount of investigation, prototyping and coding.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Ultimately it didn't seem worth the effort to engineer all that given
that mostly the same aims (faster PV assisted boot) could be achieved
by using UEFI for most modern OSes.
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Yes, for modern OSes it could UEFI. But for some old OSes or some existing VMs, if we want to use PV assisted boot, it needs to add this in seabios.
Sure, it's a completely reasonable feature to want, but you should be aware that there are some very non-trivial issue to be resolved, at which point you need to ask whether it is worth your time and effort.
Hmm, right. I'll think about this. Anyway, thanks a lot!
Signature · 7 lines
Shannon _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Hi,
Quoted 7 lines
Quoted 5 lines
Ian, thanks for your reply! It looks like the problem is how and when to clear PV resources in seabios before handing over to guest. But I wonder why virtio works in seabios. Does seabios using virtio need to clear things like vrings? Or seabios doesn't clear the things and guest just covers the configuration with new values?
I think virtio covered this use case from day 1 by having the reset,
That is correct. First thing the kernel driver does as part of the initialization sequence is a reset, to put the device into a known state, no matter where seabios left it off.
Oh, and of course seabios does the same. So even in case the virtio device is in some weird state due to kernel crashing and rebooting seabios will be able to boot from it without any problems.
cheers,
Gerd
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 53 lines · Ian Campbell
Quoted 24 lines · Shannon Zhao
Quoted 16 lines · Ian Campbell
(nb, my citrix.com email is no longer valid)
Quoted 9 lines · Shannon Zhao
Quoted 9 lines
Hi,
I noticed there are some efforts to add Xen PV block device support in Seabios in a GSoC project and there is a wiki page [1] for it. I found some patches [2] to add Xenstore R/W support for Seabios. But I didn't find the patches to add PV block device driver in Seabios.
Quoted 4 lines
Quoted 4 lines
If you know please tell me where I can find these patches. And I noticed that the patches [2] and this GSoC project work didn't get applied to Seabios eventually, is there any reason? Does it mean that there are some difficulties to support Xen PV block device in Seabios?
Quoted 6 lines
This work was never finished, IIRC (and it was a long time ago so this might be a faulty recollection) the main stumbling block was that there is no reasonable BIOS level event which could be used to tear down the PV interfaces in order to hand them over to the OS (unlike, say, EFI where there is ExitBootServices).
Quoted 5 lines
Ian, thanks for your reply! It looks like the problem is how and when to clear PV resources in seabios before handing over to guest. But I wonder why virtio works in seabios. Does seabios using virtio need to clear things like vrings? Or seabios doesn't clear the things and guest just covers the configuration with new values?
I think virtio covered this use case from day 1 by having the reset, but also by not having a xenstore ring etc.
Quoted 11 lines
Quoted 8 lines
So making this work would require something like a complete set of parallel PV infrastructure (devices, corresponding xenstore nodes, grant table) for the use of the BIOS firmware, or perhaps a (tricky to
retrofit in a backwards compatible manner) PV facility for the guest to
reset everything before starting to use them.Like guest front-end driver checks if the backend state is XenbusStateInitWait, if not, tell the backend to reset to XenbusStateInitWait state?
Before it can do this the guest needs to recover the xenbus ring (which was used by SeaBIOS) into a usable state -- so you need to be thinking at least one layer further down before you can start to think about individual devices, and don't forget the grant table (which may have in use entries from the BIOS) and event channels (which the BIOS may have setup).
Quoted 3 lines
I'm afraid I don't have any concrete answer for what exactly needs to be done to make this work, but I do know that it is a (IMHO very) non- trivial amount of investigation, prototyping and coding.
But it does work with OVMF. That is it implements the full PV driver for block. So it surely is possible.
Also the hvmloader uses the XenStore mechanism as well..
Quoted 14 lines
Quoted 9 lines
Quoted 6 lines
Ultimately it didn't seem worth the effort to engineer all that given
that mostly the same aims (faster PV assisted boot) could be achieved
by using UEFI for most modern OSes.Yes, for modern OSes it could UEFI. But for some old OSes or some existing VMs, if we want to use PV assisted boot, it needs to add this in seabios.
Sure, it's a completely reasonable feature to want, but you should be aware that there are some very non-trivial issue to be resolved, at which point you need to ask whether it is worth your time and effort.
Quoted 6 lines
Ian.
_______________________________________________
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 55 lines
Quoted 1 line
Quoted 1 line · On 16.03.16 at 14:15, <[email protected]> wrote:
Quoted 53 lines · Ian Campbell
Quoted 24 lines · Shannon Zhao
Quoted 16 lines · Ian Campbell
(nb, my citrix.com email is no longer valid)
Quoted 9 lines · Shannon Zhao
Quoted 9 lines
Hi,
I noticed there are some efforts to add Xen PV block device support in Seabios in a GSoC project and there is a wiki page [1] for it. I found some patches [2] to add Xenstore R/W support for Seabios. But I didn't find the patches to add PV block device driver in Seabios.
Quoted 4 lines
Quoted 4 lines
If you know please tell me where I can find these patches. And I noticed that the patches [2] and this GSoC project work didn't get applied to Seabios eventually, is there any reason? Does it mean that there are some difficulties to support Xen PV block device in Seabios?
Quoted 6 lines
This work was never finished, IIRC (and it was a long time ago so this might be a faulty recollection) the main stumbling block was that there is no reasonable BIOS level event which could be used to tear down the PV interfaces in order to hand them over to the OS (unlike, say, EFI where there is ExitBootServices).
Quoted 5 lines
Ian, thanks for your reply! It looks like the problem is how and when to clear PV resources in seabios before handing over to guest. But I wonder why virtio works in seabios. Does seabios using virtio need to clear things like vrings? Or seabios doesn't clear the things and guest just covers the configuration with new values?
I think virtio covered this use case from day 1 by having the reset, but also by not having a xenstore ring etc.
Quoted 11 lines
Quoted 8 lines
So making this work would require something like a complete set of parallel PV infrastructure (devices, corresponding xenstore nodes, grant table) for the use of the BIOS firmware, or perhaps a (tricky to
retrofit in a backwards compatible manner) PV facility for the guest to
reset everything before starting to use them.Like guest front-end driver checks if the backend state is XenbusStateInitWait, if not, tell the backend to reset to XenbusStateInitWait state?
Before it can do this the guest needs to recover the xenbus ring (which was used by SeaBIOS) into a usable state -- so you need to be thinking at least one layer further down before you can start to think about individual devices, and don't forget the grant table (which may have in use entries from the BIOS) and event channels (which the BIOS may have setup).
Quoted 6 lines
Quoted 3 lines
I'm afraid I don't have any concrete answer for what exactly needs to be done to make this work, but I do know that it is a (IMHO very) non- trivial amount of investigation, prototyping and coding.
But it does work with OVMF. That is it implements the full PV driver for block. So it surely is possible.
And grub2, iirc.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 94 lines · Jan Beulich
Quoted 94 lines
Quoted 4 lines
Quoted 4 lines · On 16.03.16 at 14:15, <[email protected]> wrote:
Quoted 89 lines · Ian Campbell
Quoted 40 lines · Shannon Zhao
Quoted 27 lines · Ian Campbell
(nb, my citrix.com email is no longer valid)
Quoted 15 lines · Shannon Zhao
Quoted 15 lines
Hi,
I noticed there are some efforts to add Xen PV block device support in
Seabios in a GSoC project and there is a wiki page [1] for it. I found
some patches [2] to add Xenstore R/W support for Seabios. But I didn't
find the patches to add PV block device driver in Seabios.Quoted 8 lines
Quoted 8 lines
If you know please tell me where I can find these patches. And I noticed
that the patches [2] and this GSoC project work didn't get applied to
Seabios eventually, is there any reason? Does it mean that there are
some difficulties to support Xen PV block device in Seabios?Quoted 10 lines
This work was never finished, IIRC (and it was a long time ago so this
might be a faulty recollection) the main stumbling block was that there
is no reasonable BIOS level event which could be used to tear down the
PV interfaces in order to hand them over to the OS (unlike, say, EFI
where there is ExitBootServices).Quoted 9 lines
Ian, thanks for your reply! It looks like the problem is how and when to
clear PV resources in seabios before handing over to guest. But I wonder
why virtio works in seabios. Does seabios using virtio need to clear
things like vrings? Or seabios doesn't clear the things and guest just
covers the configuration with new values?I think virtio covered this use case from day 1 by having the reset,
but also by not having a xenstore ring etc.Quoted 14 lines
Quoted 14 lines
So making this work would require something like a complete set of
parallel PV infrastructure (devices, corresponding xenstore nodes,
grant table) for the use of the BIOS firmware, or perhaps a (tricky
to
retrofit in a backwards compatible manner) PV facility for the
guest to
reset everything before starting to use them.Quoted 3 lines
Like guest front-end driver checks if the backend state is XenbusStateInitWait, if not, tell the backend to reset to XenbusStateInitWait state?
Before it can do this the guest needs to recover the xenbus ring (which
was used by SeaBIOS) into a usable state -- so you need to be thinking
at least one layer further down before you can start to think about
individual devices, and don't forget the grant table (which may have in
use entries from the BIOS) and event channels (which the BIOS may have
setup).I'm afraid I don't have any concrete answer for what exactly needs to
be done to make this work, but I do know that it is a (IMHO very) non-
trivial amount of investigation, prototyping and coding.
Quoted 4 lines
Quoted 3 lines
But it does work with OVMF. That is it implements the full PV driver
for block. So it surely is possible.And grub2, iirc.
Both of those have a defined handover point at which they can preemptively reset things for the guest (ExitBootServices for UEFI and right before calling the kernel for grub).
A BIOS doesn't have that, an OS could make any number of INT calls at any time after the BIOS hands over control and there is no "I'm done now" INT which the OS could use to ask for a reset.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel