Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.
Go to file
Cole Robinson 948d496d25 test: nodedev: fill active_config at driver startup time
Commit v10.0.0-265-ge67bca23e4 added a `active_config` and
`defined_config` to nodedev mdev internal XML handling.
`defined_config` can be filled at XML parse time, but `active_config`
must be filled in by nodedev driver. This wasn't implemented for the
test driver however, which caused virt-manager test suite regressions.

Working example:

```
$ virsh --connect test:///home/crobinso/src/virt-manager/tests/data/testdriver/testdriver.xml nodedev-dumpxml mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110
<device>
  <name>mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110</name>
  <path>/sys/devices/css0/0.0.0023/8e37ee90-2b51-45e3-9b25-bf8283c03110</path>
  <parent>css_0_0_0023</parent>
  <capability type='mdev'>
    <type id='vfio_ccw-io'/>
    <iommuGroup number='0'/>
  </capability>
</device>
```

Broken example:

```
$ virsh --connect test:///home/crobinso/src/virt-manager/tests/data/testdriver/testdriver.xml nodedev-dumpxml mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110
<device>
  <name>mdev_8e37ee90_2b51_45e3_9b25_bf8283c03110</name>
  <path>/sys/devices/css0/0.0.0023/8e37ee90-2b51-45e3-9b25-bf8283c03110</path>
  <parent>css_0_0_0023</parent>
  <capability type='mdev'>
    <iommuGroup number='0'/>
  </capability>
</device>
```

There's already code that does what we want in the test suite.
Move it to a shared function, and call it in test driver when
creating a nodedev from driver startup XML.

Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-04-24 09:38:54 -04:00
.ctags.d
.github/workflows
.gitlab/issue_templates
build-aux
ci ci: refresh with lcitool manifest 2024-03-05 10:25:12 +00:00
docs docs: Rewrite documentation for network device models 2024-04-24 14:29:40 +02:00
examples
include
po Translated using Weblate (Swedish) 2024-04-24 14:20:10 +02:00
scripts
src test: nodedev: fill active_config at driver startup time 2024-04-24 09:38:54 -04:00
subprojects
tests test: nodedev: fill active_config at driver startup time 2024-04-24 09:38:54 -04:00
tools libvirt_nss: Fix ERROR() macro 2024-04-18 14:57:30 +02:00
.ctags
.dir-locals.el
.editorconfig
.gitattributes
.gitignore
.gitlab_pages_redirects
.gitlab-ci.yml
.gitmodules
.gitpublish
.mailmap
AUTHORS.rst.in
config.h
configmake.h.in
CONTRIBUTING.rst
COPYING
COPYING.LESSER
gitdm.config
libvirt-admin.pc.in
libvirt-lxc.pc.in
libvirt-qemu.pc.in
libvirt.pc.in
libvirt.spec.in
meson_options.txt
meson.build
NEWS.rst NEWS: Mention migration bug with custom XML 2024-04-17 17:36:59 +02:00
README.rst
run.in

GitLab CI Build Status

CII Best Practices

Translation status

Libvirt API for virtualization

Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.

For some of these hypervisors, it provides a stateful management daemon which runs on the virtualization host allowing access to the API both by non-privileged local users and remote users.

Layered packages provide bindings of the libvirt C API into other languages including Python, Perl, PHP, Go, Java, OCaml, as well as mappings into object systems such as GObject, CIM and SNMP.

Further information about the libvirt project can be found on the website:

https://libvirt.org

License

The libvirt C API is distributed under the terms of GNU Lesser General Public License, version 2.1 (or later). Some parts of the code that are not part of the C library may have the more restrictive GNU General Public License, version 2.0 (or later). See the files COPYING.LESSER and COPYING for full license terms & conditions.

Installation

Instructions on building and installing libvirt can be found on the website:

https://libvirt.org/compiling.html

Contributing

The libvirt project welcomes contributions in many ways. For most components the best way to contribute is to send patches to the primary development mailing list. Further guidance on this can be found on the website:

https://libvirt.org/contribute.html

Contact

The libvirt project has two primary mailing lists:

Further details on contacting the project are available on the website:

https://libvirt.org/contact.html