]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: introduce the "virtualization" feature
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Mon, 12 Jan 2026 18:44:35 +0000 (19:44 +0100)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Sun, 1 Feb 2026 07:41:25 +0000 (08:41 +0100)
commitb9d9ff39d3ef76559c7eeaa077e004008df749fb
tree37a318975643f05b2f991fe9fdd0ff3872708768
parentca98f39e64e21040cba690608a1b12c4d1e85152
qemu: introduce the "virtualization" feature

The "virt" board in QEMU has a "virtualization" option
that is documented like this:

virtualization
  Set ``on``/``off`` to enable/disable emulating a guest CPU which implements the
  Arm Virtualization Extensions. The default is ``off``.

(from system/arm/virt.rst)

According to the documentation, the "virtualiaztion" option
is related to the "gic-version" option. Specifically, gic version=4
requires virtualization to be enabled. And gic version=max will use
version=4 when virtualization is enabled, and 3 when not.
Libvirt does not currently model neither gic version "4" nor "max"
though.

It is also documented for the "vexpress-a(9|15)" boards, where it is
also disabled by default:

- QEMU defaults to providing a CPU which does not provide either
  TrustZone or the Virtualization Extensions: if you want these you
  must enable them with ``-machine secure=on`` and ``-machine
  virtualization=on``

(system/arm/vexpress.rst).

On the command line it looks like:

 qemu-system-aarch64 -machine type=virt,virtualization=on ..

Model it using the "virtualization" element in the "features" section:

  <features>
    <virtualization/>
  </features>

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
docs/formatdomain.rst
src/conf/domain_conf.c
src/conf/domain_conf.h
src/conf/schemas/domaincommon.rng
src/qemu/qemu_command.c
src/qemu/qemu_validate.c
tests/qemuxmlconfdata/aarch64-virt-virtualization.aarch64-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/aarch64-virt-virtualization.aarch64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/aarch64-virt-virtualization.xml [new file with mode: 0644]
tests/qemuxmlconftest.c