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.

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
    significantly;
  * reworked virQEMUCapsAccelStr() based on Dan's suggestions;
  * reworked macOS support in the test suite based on Dan's
    suggestions;
  * 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
[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 (6):
  qemu: Only probe KVM on Linux
  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                  | 135 ++++++++++++++--
 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                         | 147 ++++++++++++++----
 tests/testutilsqemu.h                         |  10 ++
 25 files changed, 837 insertions(+), 65 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

-- 
2.31.1


Reply via email to