Hi,
I am going to write new code to allow SeaBios to use the split-driver model of Xen to write directly to the back-end device of Xen using shared memory, but was wondering if I could leverage the drive abstraction layer that SeaBIOS has for hard drives?
I strongly recommend doing that. SeaBIOS can handle all disks at the same time then, no matter whenever they are ide, virtio or xen. It is also much more likely that your patch will be accepted for upstream seabios.
How and where does Virtio handle this?
See src/virtio-blk.c. It looks for the virtio pci device, and when it finds one registers a new disk with the type DTYPE_VIRTIO.
You probably want to check for the xen platform pci device instead, and if you find one check all the paravirtual xen devices hooked up there for xen disks, if you find any register a DTYPE_XEN block device.
cheers, Gerd