libvirt/src/hypervisor
Daniel Henrique Barboza 887dd0d331 qemu, libxl, hypervisor: use virDomainDriverNodeDeviceDetachFlags() helper
libxlNodeDeviceDetachFlags() and qemuNodeDeviceDetachFlags() are mostly
equal, aside from how the virHostdevmanager pointer is retrieved and
the PCI stub driver used.

Now that the PCI stub driver verification is done early in both functions,
we can use the virDomainDriverNodeDeviceDetachFlags() helper to reduce
code duplication between them. 'driverName' is checked inside the helper
to set the appropriate stub driver.

The helper is named with the 'Flags' suffix, even when the helper itself
isn't receiving the flags from the callers, to be compliant with the
ACL function virNodeDeviceDetachFlagsEnsureACL() that is being called
inside it and was called from the original functions. Renaming the helper
would implicate in renaming REMOTE_PROC_NODE_DEVICE_DETACH_FLAGS, and all the
related structs inside remote_protocol.x, to be compliant with the ACL
rules.

This is not being checked at this moment, but we'll fix check-aclrules.py to
verify all the helpers that calls ACL functions in domain_driver.c shortly.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2021-02-17 15:56:27 -03:00
..
domain_cgroup.c
domain_cgroup.h
domain_driver.c qemu, libxl, hypervisor: use virDomainDriverNodeDeviceDetachFlags() helper 2021-02-17 15:56:27 -03:00
domain_driver.h qemu, libxl, hypervisor: use virDomainDriverNodeDeviceDetachFlags() helper 2021-02-17 15:56:27 -03:00
meson.build qemu, libxl, hypervisor: use virDomainDriverNodeDeviceReset() helper 2021-02-17 15:47:40 -03:00
virclosecallbacks.c util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
virclosecallbacks.h
virhostdev.c hypervisor: replace VIR_FREE with g_free in all *Dispose() functions 2021-02-05 00:22:09 -05:00
virhostdev.h hostdevmgr: remove unneeded oldStateDir 2021-02-02 00:27:58 -05:00