This change will allow us to remove PCI devices from a list
without the need of a PCI Device object, which will be need
in the next patch.
Signed-off-by: Daniel Henrique Barboza
---
src/hypervisor/virhostdev.c | 7 ---
src/util/virpci.c | 6 +++---
src/util/virpci.h | 2
We're going to need a way to remove a PCI Device from a list without having
a valid virPCIDevicePtr, because the device is missing from the host. This
means that virPCIDevicesListDel() must operate with a PCI Device address
instead.
Turns out that virPCIDevicesListDel() and its related functions
Add a helper to quickly determine if a hostdev is a PCI device,
instead of doing a tedius 'if' check with hostdev mode and
subsys type.
Signed-off-by: Daniel Henrique Barboza
---
src/hypervisor/virhostdev.c | 12 +---
src/hypervisor/virhostdev.h | 2 ++
src/libvirt_private.syms| 1
virHostdevReAttachPCIDevices() is called when we want to re-attach
a list of hostdevs back to the host, either on the shutdown path or
via a 'virsh detach-device' call. This function always count on the
existence of the device in the host to work, but this can lead to
problems. For example, a
Add virObjectUnref an autoptr cleanup func for virNodeDevice,
then remove all unref and free calls from qemuNodeDeviceReAttach().
Signed-off-by: Daniel Henrique Barboza
---
src/datatypes.h| 2 ++
src/qemu/qemu_driver.c | 32
2 files changed, 14
Use g_auto* wherever we can and remove the 'cleanup' label.
Signed-off-by: Daniel Henrique Barboza
---
src/libxl/libxl_driver.c | 37 ++---
1 file changed, 14 insertions(+), 23 deletions(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index
There is no need to bother with cgroup tearing down for absent
PCI devices, given that their entries in the sysfs are already
gone.
Signed-off-by: Daniel Henrique Barboza
---
src/qemu/qemu_cgroup.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/src/qemu/qemu_cgroup.c
Signed-off-by: Daniel Henrique Barboza
---
src/hypervisor/virhostdev.c | 8 +---
src/util/virpci.c | 6 +++---
src/util/virpci.h | 2 +-
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/hypervisor/virhostdev.c b/src/hypervisor/virhostdev.c
index
Instead of receiving 4 uints in order and write domain/bus/slot/function,
receive a virPCIDeviceAddressPtr instead and write into it.
This change will allow us to simplify the API for virPCIDeviceNew()
in the next patch.
Signed-off-by: Daniel Henrique Barboza
---
src/hypervisor/domain_driver.c
Signed-off-by: Daniel Henrique Barboza
---
src/hypervisor/virhostdev.c | 12
src/util/virpci.c | 16
src/util/virpci.h | 2 +-
3 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/src/hypervisor/virhostdev.c
Use g_auto* cleanup to avoid free() calls.
Signed-off-by: Daniel Henrique Barboza
---
src/security/security_dac.c | 49 +++--
1 file changed, 14 insertions(+), 35 deletions(-)
diff --git a/src/security/security_dac.c b/src/security/security_dac.c
index
If the underlying PCI device of a hostdev does not exist in the
host (e.g. a SR-IOV VF that was removed while the domain was
running), skip security label handling for it.
This will avoid errors that happens during qemuProcessStop() time,
where a VF that was being used by the domain is not
Use g_auto* pointers to avoid the need of a cleanup label. The
type of the pointer 'virDomainPtr dom' was changed to its alias
'virshDomainPtr' to allow the use of g_autoptr().
Signed-off-by: Daniel Henrique Barboza
---
tools/virsh-domain.c | 18 ++
1 file changed, 6
Use g_auto* cleanup to avoid free() calls.
Signed-off-by: Daniel Henrique Barboza
---
src/security/security_selinux.c | 54 ++---
1 file changed, 16 insertions(+), 38 deletions(-)
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index
Gitlab issue #72 [1] reports that removing SR-IOVs VFs before
removing the devices from the running domains can have strange
consequences. QEMU might be able to hotunplug the device inside the
guest, but Libvirt will not be aware of that, and then the guest is
now inconsistent with the domain
The current virPCIDeviceNew() signature, receiving 4 uints in sequence
(domain, bus, slot, function), is not neat.
We already have a way to represent a PCI address in virPCIDeviceAddress
that is used in the code. Aside from the test files, most of
virPCIDeviceNew() callers have access to a
We're going to add logic to handle the case where a previously
existing PCI device does not longer exist in the host.
The logic was copied from virPCIDeviceNew(), which verifies if a
PCI device exists in the host, returning NULL and throwing an
error if it doesn't. The NULL is used for other
The function returns -1 on error, but no caller is actually checking
the return value. Making it 'void' makes more sense with its
current use.
Signed-off-by: Daniel Henrique Barboza
---
include/libvirt/libvirt-nodedev.h | 2 +-
src/libvirt-nodedev.c | 15 +++
2 files
There is no need to open code the PCI address string format
when we have a function that does exactly that.
Signed-off-by: Daniel Henrique Barboza
---
src/conf/domain_audit.c | 6 +-
src/util/virpci.c | 6 ++
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git
libxlNodeDeviceGetPCIInfo() and qemuNodeDeviceGetPCIInfo() are equal.
Let's move the logic to a new virDomainDriverNodeDeviceGetPCIInfo()
info to be used by libxl_driver.c and qemu_driver.c.
Signed-off-by: Daniel Henrique Barboza
---
src/hypervisor/domain_driver.c | 33
This is the rebased version of
https://www.redhat.com/archives/libvir-list/2021-January/msg00028.html
with master at 57b1ddcaaa5b5. No changes made aside from trivial conflicts
fixes.
I also removed the military jargon from the previous subject to make it
clear what this series is doing.
It breaks on using - in VSTORAGE-MOUNT definition with:
In file included from ../config.h:19:0,
from ../src/util/viraudit.c:22:
./meson-config.h:180:17: error: ISO C99 requires whitespace after the macro
name [-Werror]
#define VSTORAGE-MOUNT "/usr/bin/vstorage-mount"
^
A VM defined similar to:
...
...
is currently invalid, as hint-dedicated is only allowed if cpu mode
is host-passthrough. This restriction is unnecessary, see
https://bugzilla.redhat.com/show_bug.cgi?id=1857671.
Signed-off-by: Tim Wiederhake
---
src/qemu/qemu_validate.c | 11
On Mon, Jan 18, 2021 at 15:15:54 +0100, Michal Privoznik wrote:
> It's better to fill in missing values in post parse callbacks
> than during parsing.
>
> Signed-off-by: Michal Privoznik
> ---
> src/conf/domain_conf.c | 35 ++-
> 1 file changed, 22 insertions(+),
On Mon, Jan 18, 2021 at 15:15:53 +0100, Michal Privoznik wrote:
> The _virDomainMemoryDef structure has @uuid member which is
> needed for PPC64 guests. No other architectures use it. Since the
> member is VIR_UUID_BUFLEN bytes long, the structure is
> unnecessary big. If the member is just a
I've noticed this while working on virtio-pmem-pci patches.
Michal Prívozník (2):
conf: Turn @uuid member of _virDomainMemoryDef struct into a pointer
conf: Move generation of NVDIMM UUID into post parse callback
src/conf/domain_conf.c | 47 +
It's better to fill in missing values in post parse callbacks
than during parsing.
Signed-off-by: Michal Privoznik
---
src/conf/domain_conf.c | 35 ++-
1 file changed, 22 insertions(+), 13 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
The _virDomainMemoryDef structure has @uuid member which is
needed for PPC64 guests. No other architectures use it. Since the
member is VIR_UUID_BUFLEN bytes long, the structure is
unnecessary big. If the member is just a pointer then we can also
replace some calls of virUUIDIsValid() with plain
On Mon, 2021-01-18 at 14:12 +0100, Peter Krempa wrote:
> On Fri, Jan 15, 2021 at 08:16:47 +0100, Rene Peinthor wrote:
> > +#define LINSTORCLI "linstor"
>
> This should be defined via the build system once you detect where the
> program is located, to prevent PATH env variable from playing a role
On Fri, Jan 15, 2021 at 08:16:47 +0100, Rene Peinthor wrote:
> Implement a LINSTOR backend storage driver.
> The Linstor client needs to be installed and it needs to be configured
> on the nodes used by the controller.
>
> It supports most pool/vol commands, except for pool-build/pool-delete
>
Implement a LINSTOR backend storage driver.
The Linstor client needs to be installed and it needs to be configured
on the nodes used by the controller.
It supports most pool/vol commands, except for pool-build/pool-delete
and provides a block device in RAW file mode.
Linstor supports more than
On Sat, Jan 16, 2021 at 03:16:18PM +0800, Han Han wrote:
> Fix the errors from commit a7cafa7bc2 when build RPMs from spec file:
> error: Installed (but unpackaged) file(s) found:
>/usr/share/man/man8/virtinterfaced.8.gz
>/usr/share/man/man8/virtlxcd.8.gz
>
On Mon, Jan 18, 2021 at 09:23:34AM +0100, Jiri Denemark wrote:
> As can be seen in commit 8a62a1592ae00eab4eb153c02661e56b9d8d9032 (from
> autoconf era), the coverage flags have to be used also when linking
> objects. However, this was not reflected when we switched to meson.
>
> Signed-off-by:
As can be seen in commit 8a62a1592ae00eab4eb153c02661e56b9d8d9032 (from
autoconf era), the coverage flags have to be used also when linking
objects. However, this was not reflected when we switched to meson.
Signed-off-by: Jiri Denemark
---
src/meson.build | 1 +
34 matches
Mail list logo