]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Introducing new address type='unassigned' for PCI hostdevs
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Tue, 17 Dec 2019 20:35:02 +0000 (17:35 -0300)
committerCole Robinson <crobinso@redhat.com>
Wed, 18 Dec 2019 18:08:27 +0000 (13:08 -0500)
commit96999404cb3bfcdb0f169857d9a0ea3d602cbc43
treefe0f2271552a04666bd00565f972584e45a12eb0
parent94f6e2f9fcd8cf764e9dbfc7258971165798f62e
Introducing new address type='unassigned' for PCI hostdevs

This patch introduces a new PCI hostdev address type called
'unassigned'. This new type gives users the option to add
PCI hostdevs to the domain XML in an 'unassigned' state, meaning
that the device exists in the domain, is managed by Libvirt
like any regular PCI hostdev, but the guest does not have
access to it.

This adds extra options for managing PCI device binding
inside Libvirt, for example, making all the managed PCI hostdevs
declared in the domain XML to be detached from the host and bind
to the chosen driver and, at the same time, allowing just a
subset of these devices to be usable by the guest.

Next patch will use this new address type in the QEMU driver to
avoid adding unassigned devices to the QEMU launch command line.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
docs/schemas/domaincommon.rng
src/conf/device_conf.c
src/conf/device_conf.h
src/conf/domain_conf.c
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
src/qemu/qemu_domain_address.c
tests/qemuxml2argvdata/hostdev-pci-address-unassigned.xml [new file with mode: 0644]
tests/qemuxml2xmloutdata/hostdev-pci-address-unassigned.xml [new file with mode: 0644]
tests/qemuxml2xmltest.c