These patches add support for booting from virtio-blk (PCI) devices as
used by QEMU.
Patches 1 and 2 add bootindex support which is the new way for passing
boot order information from QEMU to OpenBIOS. Note that there are also
corresponding patches for QEMU required, without which the generated
device paths will be incorrect and cause virtio boot to fail.
Patch 3 adds the legacy virtio-blk driver (it follows the 0.9 rather
than the 1.0 specification).
Patch 4 enables the new driver for both PPC and SPARC64 architectures
so that virtio-blk devices will be usable out-of-the-box with QEMU.
Once these patches have been applied to OpenBIOS (along with the
corresponding fw path fixes for QEMU) it is possible to boot from
virtio-blk devices like this:
PPC:
./qemu-system-ppc -drive file=debian-9.0-powerpc-NETINST.iso,if=none,index=0,id=cd,media=cdrom \
-device virtio-blk-pci,drive=cd,bootindex=0 -m 256 -boot d
SPARC:
./qemu-system-sparc64 -drive debian-9.0-sparc64-NETINST.iso,if=none,index=0,id=cd,media=cdrom \
-device virtio-blk-pci,bus=pciB,drive=cd,bootindex=0 -m 256 -boot d -nographic
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Mark Cave-Ayland (4):
ppc: add bootindex support
SPARC64: add bootindex support
drivers: add legacy virtio-blk driver
config: enable virtio-blk driver for default PPC and SPARC64 builds
arch/ppc/qemu/init.c | 55 ++++-
arch/sparc64/boot.c | 2 +-
arch/sparc64/boot.h | 2 +-
arch/sparc64/openbios.c | 38 +++-
config/examples/ppc_config.xml | 1 +
config/examples/sparc64_config.xml | 1 +
drivers/build.xml | 1 +
drivers/pci.c | 18 ++
drivers/pci_database.c | 4 +-
drivers/pci_database.h | 1 +
drivers/virtio.c | 424 +++++++++++++++++++++++++++++++++++++
drivers/virtio.h | 331 +++++++++++++++++++++++++++++
include/drivers/drivers.h | 4 +
13 files changed, 862 insertions(+), 20 deletions(-)
create mode 100644 drivers/virtio.c
create mode 100644 drivers/virtio.h
--
2.11.0