RFC Hyper-V / VMBus
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest34 patches 34 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/34 | hyperv: ensure VP index equal to QEMU cpu_indextarget/ target/ target/ | +68 | 0 replies | |
| 2/34 | hyperv_testdev: refactor for readabilityhw/ | +53 | 0 replies | |
| 3/34 | hyperv: cosmetic: g_malloc -> g_newtarget/ | +1 | 0 replies | |
| 4/34 | hyperv: synic: only setup ack notifier if there's a callbacktarget/ | +19 | 0 replies | |
| 5/34 | hyperv: allow passing arbitrary data to sint ack callbackhw/ target/ target/ | +18 | 0 replies | |
| 6/34 | hyperv: address HvSintRoute by X86CPU pointertarget/ | +8 | 0 replies | |
| 7/34 | hyperv: make HvSintRoute reference-countedhw/ target/ target/ | +28 | 0 replies | |
| 8/34 | hyperv: qom-ify SynICtarget/ target/ target/ +1 more | +134 | 3 replies | |
| 9/34 | hyperv: block SynIC use in QEMU in incompatible configurationsinclude/ target/ target/ +1 more | +80 | 2 replies | |
| 10/34 | hyperv: make overlay pages for SynICtarget/ | +64 | 0 replies | |
| 11/34 | hyperv: add synic message deliverytarget/ target/ | +111 | 3 replies | |
| 12/34 | hyperv: add synic event flag signalingtarget/ target/ | +34 | 3 replies | |
| 13/34 | hyperv: process SIGNAL_EVENT hypercalltarget/ target/ | +111 | 0 replies | |
| 14/34 | hyperv: process POST_MESSAGE hypercalltarget/ target/ | +92 | 0 replies | |
| 15/34 | hyperv_testdev: add SynIC message and event testmodeshw/ | +161 | 0 replies | |
| 16/34 | hyperv: update copyright noticeshw/ target/ target/ | +3 | 0 replies | |
| 17/34 | import HYPERV_EVENTFD stuff from kernellinux-headers/ | +14 | 0 replies | |
| 18/34 | hyperv: add support for KVM_HYPERV_EVENTFDaccel/ include/ target/ | +36 | 3 replies | |
| 19/34 | vmbus: add vmbus protocol definitionsinclude/ | +222 | 1 reply | |
| 20/34 | vmbus: vmbus implementationMakefile.objs hw/ hw/ +2 more | +2552 | 1 reply | |
| 21/34 | vmbus: build configurationconfigure hw/ | +12 | 3 replies | |
| 22/34 | i386: Hyper-V VMBus ACPI DSDT entryhw/ | +42 | 2 replies | |
| 23/34 | i386: en/disable vmbus by a machine propertyhw/ hw/ hw/ +2 more | +51 | 1 reply | |
| 24/34 | scsi: add Hyper-V/VMBus SCSI protocol definitionshw/ | +150 | 0 replies | |
| 25/34 | scsi: add Hyper-V/VMBus SCSI controllerhw/ hw/ hw/ | +406 | 3 replies | |
| 26/34 | hv-scsi: limit the number of requests per notificationhw/ | +6 | 0 replies | |
| 27/34 | tests: hv-scsi: add start-stop testtests/ tests/ | +60 | 2 replies | |
| 28/34 | net: add RNDIS definitionshw/ | +391 | 1 reply | |
| 29/34 | net: add Hyper-V/VMBus network protocol definitionshw/ | +1161 | 3 replies | |
| 30/34 | net: add Hyper-V/VMBus net adapterhw/ hw/ | +1442 | 0 replies | |
| 31/34 | hv-net: add .bootindex supporthw/ | +9 | 0 replies | |
| 32/34 | loader: allow arbitrary basename for fw_cfg file romshw/ include/ | +22 | 1 reply | |
| 33/34 | vmbus: add support for rom fileshw/ include/ | +42 | 2 replies | |
| 34/34 | hv-net: define default rom file namehw/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Qemu-devel] [RFC PATCH 00/34] Hyper-V / VMBus
This is a work-in-progress series with Hyper-V / VMBus device emulation. It's still very raw but it's testable so I'd appreciate feedback on whether the design is sound.
This stuff can also be seen at https://src.openvz.org/scm/up/qemu.git.
Current status of the components included:
* Hyper-V infrastructure (SynIC, VP_INDEX, events & messages, etc):
- works, mostly submission-ready but needs addressing some issues
* VMBus infrastructure (types, vmbus state machine, channel communication, etc):
- works in main scenarios
* SCSI controller:
- works in main scenarios
- supports multiqueue
- iothread-unaware
- performance competitive to virtio-scsi [*]
- can be used for booting [**]
* network interface:
- basic operation only
- no mac filtering
- no offloads
- no multiqueue
- can be used for booting with limitations [***]
Overall, it's in bad need for documentation, tests, proper patch split. Migration works but only tested very lightly.
[*] basic measurements with fio rw=randread bs=4k iodepth=256 using
null-co backend give
o Windows guests: hv-scsi 10%-30% better than virtio-scsi
o Linux guests: hv-scsi 10%-20% worse than virtio-scsi No performance analysis has been done yet.
[**] patches for SeaBIOS and OVMF can be found at
https://src.openvz.org/scm/up/seabios.git and https://src.openvz.org/scm/up/edk2.git
[***] patches for iPXE can be found at
https://src.openvz.org/scm/up/ipxe.git, limitations:
- OVMF is yet unsupported
- iPXE takes over VMBus state management from SeaBIOS so after iPXE failure to boot off hv-net booting off hv-scsi doesn't work
Prerequisites:
- KVM 4.14+
- HYPERV_EVENTFD support (in kvm/queue) is optional but recommended for better performance
How to use:
# qemu \
... \
-machine ...,accel=kvm,vmbus \
-cpu ...,hv_vpindex,hv_synic,hv_stimer,(other hv_* recommended),kvm=off \
-nodefaults \
...
-device hv-scsi,(usual scsi props),(instanceid=<uuid> optional) \
-drive ... \
-device scsi-hd,... \
...
-netdev ... \
-device hv-net,(usual net props),(instanceid=<uuid> optional) \
...Big kudos to Andrey Smetanin and Evgeny Yakovlev for their research and prototyping.
Andrey Smetanin (1):
i386: Hyper-V VMBus ACPI DSDT entry
Evgeny Yakovlev (1):
vmbus: build configuration
Roman Kagan (32):
hyperv: ensure VP index equal to QEMU cpu_index
hyperv_testdev: refactor for readability
hyperv: cosmetic: g_malloc -> g_new
hyperv: synic: only setup ack notifier if there's a callback
hyperv: allow passing arbitrary data to sint ack callback
hyperv: address HvSintRoute by X86CPU pointer
hyperv: make HvSintRoute reference-counted
hyperv: qom-ify SynIC
hyperv: block SynIC use in QEMU in incompatible configurations
hyperv: make overlay pages for SynIC
hyperv: add synic message delivery
hyperv: add synic event flag signaling
hyperv: process SIGNAL_EVENT hypercall
hyperv: process POST_MESSAGE hypercall
hyperv_testdev: add SynIC message and event testmodes
hyperv: update copyright notices
[not to commit] import HYPERV_EVENTFD stuff from kernel
hyperv: add support for KVM_HYPERV_EVENTFD
vmbus: add vmbus protocol definitions
vmbus: vmbus implementation
i386: en/disable vmbus by a machine property
scsi: add Hyper-V/VMBus SCSI protocol definitions
scsi: add Hyper-V/VMBus SCSI controller
hv-scsi: limit the number of requests per notification
tests: hv-scsi: add start-stop test
net: add RNDIS definitions
net: add Hyper-V/VMBus network protocol definitions
net: add Hyper-V/VMBus net adapter
hv-net: add .bootindex support
loader: allow arbitrary basename for fw_cfg file roms
vmbus: add support for rom files
hv-net: define default rom file name
configure | 11 + Makefile.objs | 1 + hw/net/hvnet-proto.h | 1161 +++++++++++++++++++ hw/net/rndis.h | 391 +++++++ hw/scsi/hvscsi-proto.h | 150 +++ include/hw/i386/pc.h | 8 + include/hw/loader.h | 2 +- include/hw/vmbus/vmbus-proto.h | 222 ++++ include/hw/vmbus/vmbus.h | 109 ++ include/sysemu/kvm.h | 1 + linux-headers/linux/kvm.h | 14 + target/i386/hyperv.h | 40 +- accel/kvm/kvm-all.c | 15 + hw/core/loader.c | 43 +- hw/i386/acpi-build.c | 42 + hw/i386/pc.c | 34 + hw/i386/pc_piix.c | 5 + hw/i386/pc_q35.c | 5 + hw/misc/hyperv_testdev.c | 267 ++++- hw/net/hv-net.c | 1450 +++++++++++++++++++++++ hw/scsi/hv-scsi.c | 403 +++++++ hw/vmbus/vmbus.c | 2475 ++++++++++++++++++++++++++++++++++++++++ target/i386/hyperv.c | 681 ++++++++++- target/i386/kvm.c | 63 +- target/i386/machine.c | 9 + tests/hv-scsi-test.c | 57 + util/qemu-config.c | 4 + hw/Makefile.objs | 1 + hw/net/Makefile.objs | 2 + hw/scsi/Makefile.objs | 2 + hw/scsi/trace-events | 6 + hw/vmbus/Makefile.objs | 1 + hw/vmbus/trace-events | 8 + tests/Makefile.include | 3 + 34 files changed, 7561 insertions(+), 125 deletions(-) create mode 100644 hw/net/hvnet-proto.h create mode 100644 hw/net/rndis.h create mode 100644 hw/scsi/hvscsi-proto.h create mode 100644 include/hw/vmbus/vmbus-proto.h create mode 100644 include/hw/vmbus/vmbus.h create mode 100644 hw/net/hv-net.c create mode 100644 hw/scsi/hv-scsi.c create mode 100644 hw/vmbus/vmbus.c create mode 100644 tests/hv-scsi-test.c create mode 100644 hw/vmbus/Makefile.objs create mode 100644 hw/vmbus/trace-events
Signature · 1 line
2.14.3