[libvirt PATCH v5 00/20] qemu: Introduce hvf domain type for Hypervisor.framework

Andrea Bolognani abologna at redhat.com
Tue Jan 11 09:09:20 UTC 2022

In order to hopefully address [libvirt#147] at long last, I've picked
up Roman's patches from 2018 and attempted to forward-port them.

More specifically, I've used the [roolebo/hvf-domain] branch as a
starting point, since it seems to contain a few improvements over
[v2] and was just easier to pick up.

The code is mostly his own, so I've retained the existing authorship
information, but I've dropped Reviewed-by tags for commits that have
been modified in non-trivial ways. I've applied very minimal style
tweaks along the way, but overall I've tried to modify the existing
patches as little as possible.

I've added a few changes of my own, which I've marked as "fixup!"
when I felt that they should be squashed into the previous patch
rather than existing as separate commits.

The new test cases, such as they are, pass, and no regressions to KVM
support appear to have been introduced in the process. I don't
currently have access to a machine running macOS, so I can't verify
that it's actually possible to start a hardware-accelerated VM by
myself, but a user has confirmed on the GitLab issue that the new
feature works.

Changes from [v4]:

  * fixed an issue that prevented machine types from being probed
    correctly, effectively making the entire thing non functional;
  * only report HVF support as available when the guest architecture
    and the host architecture match.

Changes from [v3]:

  * reintroduced the patch that was missing in the initial version
    of the forward-port;
  * converted the documentation to reStructuredText and trimmed it
  * reworked virQEMUCapsAccelStr() based on Dan's suggestions;
  * reworked macOS support in the test suite based on Dan's
  * fixed a few minor issues found while doing the above.

Changes from [v2]:

  * rebased on top of master;
  * added a couple of simple test cases.

Useful links:

  * GitLab: [abologna/hvf]
  * CI: [pipeline]

[libvirt#147] https://gitlab.com/libvirt/libvirt/-/issues/147
[roolebo/hvf-domain] https://github.com/roolebo/libvirt/tree/hvf-domain
[abologna/hvf] https://gitlab.com/abologna/libvirt/-/commits/hvf
[pipeline] https://gitlab.com/abologna/libvirt/-/pipelines/443320533
[v4] https://listman.redhat.com/archives/libvir-list/2022-January/msg00280.html
[v3] https://listman.redhat.com/archives/libvir-list/2022-January/msg00131.html
[v2] https://listman.redhat.com/archives/libvir-list/2018-November/msg00802.html

Andrea Bolognani (7):
  qemu: Only probe KVM on Linux
  fixup! qemu: Fix / improve virQEMUCapsProbeHVF()
  tests: Introduce testQemuHostOS
  tests: Add macOS support to testutilsqemu
  tests: Add macOS support to qemuxml2*test
  tests: Add HVF test cases
  fixup! NEWS: Mention Apple Silicon support for HVF

Roman Bolshakov (13):
  qemu: Add KVM CPUs into cache only if KVM is present
  conf: Add hvf domain type
  qemu: Define hvf capability
  qemu: Query hvf capability on macOS
  qemu: Expose hvf domain type if hvf is supported
  qemu: Introduce virQEMUCapsAccelStr
  qemu: Introduce virQEMUCapsTypeIsAccelerated
  qemu: Introduce virQEMUCapsHaveAccel
  qemu: Correct CPU capabilities probing for hvf
  docs: Add hvf on QEMU driver page
  docs: Note hvf support for domain elements
  docs: Add support page for libvirt on macOS
  news: Mention hvf domain type

 NEWS.rst                                      |   6 +
 docs/docs.html.in                             |   3 +
 docs/drvqemu.rst                              |  48 +++++-
 docs/formatdomain.rst                         |  22 +--
 docs/index.html.in                            |   4 +-
 docs/macos.rst                                |  44 ++++++
 docs/meson.build                              |   1 +
 docs/schemas/domaincommon.rng                 |   1 +
 src/conf/domain_conf.c                        |   1 +
 src/conf/domain_conf.h                        |   1 +
 src/qemu/qemu_capabilities.c                  | 147 ++++++++++++++++--
 src/qemu/qemu_capabilities.h                  |   3 +
 src/qemu/qemu_command.c                       |   4 +
 src/qemu/qemu_process.c                       |  10 +-
 .../hvf-aarch64-virt-headless.args            |  48 ++++++
 .../hvf-aarch64-virt-headless.xml             |  45 ++++++
 .../hvf-x86_64-q35-headless.args              |  47 ++++++
 .../hvf-x86_64-q35-headless.x86_64-latest.err |   1 +
 .../hvf-x86_64-q35-headless.xml               |  44 ++++++
 tests/qemuxml2argvtest.c                      |  43 ++++-
 .../hvf-aarch64-virt-headless.xml             |  94 +++++++++++
 .../hvf-x86_64-q35-headless.xml               |  97 ++++++++++++
 tests/qemuxml2xmltest.c                       |  43 ++++-
 tests/testutilsqemu.c                         | 146 +++++++++++++----
 tests/testutilsqemu.h                         |  10 ++
 25 files changed, 849 insertions(+), 64 deletions(-)
 create mode 100644 docs/macos.rst
 create mode 100644 tests/qemuxml2argvdata/hvf-aarch64-virt-headless.args
 create mode 100644 tests/qemuxml2argvdata/hvf-aarch64-virt-headless.xml
 create mode 100644 tests/qemuxml2argvdata/hvf-x86_64-q35-headless.args
 create mode 100644 tests/qemuxml2argvdata/hvf-x86_64-q35-headless.x86_64-latest.err
 create mode 100644 tests/qemuxml2argvdata/hvf-x86_64-q35-headless.xml
 create mode 100644 tests/qemuxml2xmloutdata/hvf-aarch64-virt-headless.xml
 create mode 100644 tests/qemuxml2xmloutdata/hvf-x86_64-q35-headless.xml


More information about the libvir-list mailing list