[ipxe-devel] [RFC PATCH 0/8] support Hyper-V net device in QEMU

Roman Kagan rkagan at virtuozzo.com
Mon Jun 11 17:28:15 UTC 2018


This is an RFC series to add support for Hyper-V/VMBus network devices
emulated in QEMU [1] to iPXE.

iPXE already has a driver for this device as implemented by the real
Hyper-V; this series builds on top of it to add full-fledged network
boot ability to its incarnation in QEMU.

The design goals in this implementation are:

1) support both BIOS (SeaBIOS [2]) and UEFI (OVMF [3])

   In OVMF, the VMBus EFI protocol was created and exposed for iPXE to
   use; the VMBus interface in iPXE is abstracted out such that the UEFI
   version uses the platform protocol while the BIOS one uses iPXE's own
   vmbus driver.

2) allow building and shipping separately from the main firmware

   For that, iPXE is built as (almost) regular (possibly multi-image)
   option ROM and propagated into the firmware via fw_cfg interface.
   For BIOS the ROM uses slightly modified PnP header convention to
   better integrate with boot order machinery

3) support QEMU bootorder mechanism

   This is fully supported in UEFI case.  In BIOS, iPXE takes over the
   VMBus so falling through to VMBus SCSI devices becomes impossible
   (later we may consider re-acquisition of the VMBus by the BIOS).

These patches are maintained in a git repo at
https://src.openvz.org/scm/up/ipxe.

Comments and advices are very welcome.

[1] The git tree containing the necessary QEMU changes can be found at
https://src.openvz.org/scm/up/qemu; I'm working on upstreaming them.
[2] https://src.openvz.org/scm/up/seabios (upstreaming planned once QEMU
changes settle)
[3] https://src.openvz.org/scm/up/edk2 (upstreaming planned once QEMU
changes settle)

Roman Kagan (8):
  add Hyper-V rom type
  vmbus: encapsulate obsolete gpadl handling
  vmbus: drop vmbus_has_data
  hyperv: recognize OVMF's guest OS id
  vmbus: factor out API to be shared with UEFI driver
  efi: import HypervVmbusDevice header from edk2
  efi: export HypervVmbusDevice protocol GUID
  efi_vmbus: add driver for VMBus devices for OVMF

 src/arch/x86/Makefile.pcbios                  |   4 +
 src/drivers/net/netvsc.h                      |  15 -
 .../ipxe/efi/Protocol/HypervVmbusDevice.h     | 168 +++++
 src/include/ipxe/efi/efi.h                    |   1 +
 src/include/ipxe/errfile.h                    |   1 +
 src/include/ipxe/hyperv.h                     |   4 +
 src/include/ipxe/vmbus.h                      | 241 +------
 src/include/ipxe/vmbus_device.h               | 291 +++++++++
 src/arch/x86/core/vmbus_autoboot.c            |  47 ++
 src/arch/x86/drivers/hyperv/hyperv.c          |   3 +-
 src/drivers/net/netvsc.c                      |  22 +-
 src/interface/efi/efi_guid.c                  |   5 +
 src/interface/efi/efi_vmbus.c                 | 600 ++++++++++++++++++
 src/interface/hyperv/vmbus.c                  | 313 +++++----
 src/arch/x86/prefix/hvromprefix.S             |  29 +
 src/arch/x86/prefix/romprefix.S               |  41 ++
 16 files changed, 1390 insertions(+), 395 deletions(-)
 create mode 100644 src/include/ipxe/efi/Protocol/HypervVmbusDevice.h
 create mode 100644 src/include/ipxe/vmbus_device.h
 create mode 100644 src/arch/x86/core/vmbus_autoboot.c
 create mode 100644 src/interface/efi/efi_vmbus.c
 create mode 100644 src/arch/x86/prefix/hvromprefix.S

-- 
2.17.1




More information about the ipxe-devel mailing list