[PATCH] virsh: prevent potential NULL dereference
by Alexander Kuznetsov
virXPathString() can return NULL so we need to check it before calling strcmp()
Found by Linux Verification Center (linuxtesting.org) with Svace.
Reported-by: Dmitry Fedin <d.fedin(a)fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam(a)altlinux.org>
---
tools/virsh-completer-domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c
index 0a3a113dca..abacfd04c1 100644
--- a/tools/virsh-completer-domain.c
+++ b/tools/virsh-completer-domain.c
@@ -891,7 +891,7 @@ virshDomainConsoleCompleter(vshControl *ctl,
ctxt->node = parallels[i - nserials];
type = virXPathString("string(./@type)", ctxt);
- if (STRNEQ(type, "pty"))
+ if (!type || STRNEQ(type, "pty"))
continue;
tmp[offset++] = virXPathString("string(./alias/@name)", ctxt);
--
2.42.4
3 weeks, 2 days
[PATCH v2 0/2] conf: use const virDomainDef pointers
by Roman Bogorodskiy
Changes since v1:
- Split domain_conf and bhyve changes into separate commits
- Convert virDomainNetNotifyActualDevice() as well
Roman Bogorodskiy (2):
conf: use const virDomainDef pointers
bhyve: use const virDomainDef pointer in bhyveBuildNetArgStr()
src/bhyve/bhyve_command.c | 2 +-
src/conf/domain_conf.c | 10 +++++-----
src/conf/domain_conf.h | 8 ++++----
3 files changed, 10 insertions(+), 10 deletions(-)
--
2.49.0
3 weeks, 2 days
[PATCH] bhyve: capabilities: advertise RNG device support
by Roman Bogorodskiy
Signed-off-by: Roman Bogorodskiy <bogorodskiy(a)gmail.com>
---
src/bhyve/bhyve_capabilities.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c
index 37ae5d2872..36a092a819 100644
--- a/src/bhyve/bhyve_capabilities.c
+++ b/src/bhyve/bhyve_capabilities.c
@@ -109,6 +109,16 @@ virBhyveDomainCapsFill(virDomainCaps *caps,
VIR_DOMAIN_CAPS_ENUM_SET(caps->video.modelType, VIR_DOMAIN_VIDEO_TYPE_GOP);
}
+ if (bhyvecaps & BHYVE_CAP_VIRTIO_RND) {
+ caps->rng.supported = VIR_TRISTATE_BOOL_YES;
+ caps->rng.model.report = true;
+ caps->rng.backendModel.report = true;
+
+ VIR_DOMAIN_CAPS_ENUM_SET(caps->rng.model, VIR_DOMAIN_RNG_MODEL_VIRTIO);
+ VIR_DOMAIN_CAPS_ENUM_SET(caps->rng.backendModel,
+ VIR_DOMAIN_RNG_BACKEND_RANDOM);
+ }
+
caps->hostdev.supported = VIR_TRISTATE_BOOL_NO;
caps->features[VIR_DOMAIN_CAPS_FEATURE_IOTHREADS] = VIR_TRISTATE_BOOL_NO;
caps->features[VIR_DOMAIN_CAPS_FEATURE_VMCOREINFO] = VIR_TRISTATE_BOOL_NO;
--
2.49.0
3 weeks, 3 days
How to find the actually schedulable CPUs in a Linux + cgroups setup?
by Biser Milanov
Hi,
Right now, looking at the QEMU driver, libvirt supports listing all of
the present CPUs on the hypervisor via /sys/devices/system/cpu/present.
For systems where cgroups with exclusive CPU bits are configured,
however, there might be CPUs that are not availabe to libvirt. This
leads to situations where a domain cannot be started because of an
invalid cpuset attribute (using a CPU with an exclusive bit set).
My initial idea was to refactor functions like virNodeGetCPUMap() to
take into account cgroup limits. danpb mentioned in #virt (thanks
danpb!) that libvirtd might run in a cgroup that is not the one in which
VMs will run (like on systemd hosts where libvirtd will run under
/sys/fs/cgroup/system.slice/, and VMs under /sys/cgroup/machine.slice/),
so just reading hardcoded cgroup files is not a good idea.
Is it possible for libvirt to figure out what the actually schedulable
CPUs are? Ideally users can then query this information via `virsh
nodeinfo` or `virsh capabilities`.
---
Regards,
Biser
3 weeks, 3 days
[PATCH 0/2] vsh: Fix one memleak and const correctness
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (2):
vsh: Free commands in vshDeinit()
vsh: Turn _vshControl::progname into a const string
tools/vsh.c | 1 +
tools/vsh.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
--
2.49.0
3 weeks, 3 days
[PATCH 1/2] NEWS: bhyve: document new features
by Roman Bogorodskiy
Document the virtio random number generator device support
and <interface type='network'> support.
Signed-off-by: Roman Bogorodskiy <bogorodskiy(a)gmail.com>
---
NEWS.rst | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 4f1e8ecbdf..603c373390 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -24,6 +24,20 @@ v11.3.0 (unreleased)
The following flags are now configurable for Xen: ``vapic``, ``synic``,
``stimer``, ``frequencies``, ``tlbflush`` and ``ipi``.
+ * bhyve: Support virtio random number generator devices
+
+ Domain XMLs can now include virtio random number generator devices.
+ They are configured with::
+
+ <rng model='virtio'>
+ <backend model='random'/>
+ </rng>
+
+ * bhyve: Support ``<interface type='network'>``
+
+ At the moment it doesn't provide any new features compared to
+ ``<interface type='bridge'>``, but allows a more flexible configuration.
+
* **Improvements**
* **Bug fixes**
--
2.49.0
3 weeks, 3 days
[PATCH v3 0/2] deprecate some block-job- APIs
by Vladimir Sementsov-Ogievskiy
This is for 10.1, of course.
v3: fix wording, typos
v2: Update documentation: add patch 01
v1 was:
[PATCH] [for-10.1] qapi/block-core: derpecate some block-job- APIs
Supersedes: <20250401155730.103718-1-vsementsov(a)yandex-team.ru>
Vladimir Sementsov-Ogievskiy (2):
qapi: synchronize jobs and block-jobs documentation
qapi/block-core: deprecate some block-job- APIs
docs/about/deprecated.rst | 31 +++++++++++++
qapi/block-core.json | 91 ++++++++++++++++++++++++++++-----------
qapi/job.json | 30 ++++++++++++-
3 files changed, 125 insertions(+), 27 deletions(-)
--
2.48.1
3 weeks, 3 days
[PATCH] docs: formatdomain: Metion virtio model for currentAddress
by Han Han
As commit 50981052a5 mentioned, the currentAddress in live domain
XML, requires virtio model as well.
Signed-off-by: Han Han <hhan(a)redhat.com>
---
docs/formatdomain.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index d73687ba35..c7c75ae219 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -5056,8 +5056,8 @@ MAC address is outside of the reserved VMWare ranges.
:since:`Since 11.2.0`, the ``<mac/>`` element can optionally contain
``currentAddress`` attribute (output only), which contains new MAC address if the
-guest changed it. This is currently implemented only for QEMU/KVM and requires
-setting ``trustGuestRxFilters`` to ``yes``.
+guest changed it. This is currently implemented only for the model type ``virtio``
+in QEMU/KVM and requires setting ``trustGuestRxFilters`` to ``yes``.
:since:`Since 7.3.0`, one can set the ACPI index against network interfaces.
With some operating systems (eg Linux with systemd), the ACPI index is used
--
2.49.0
3 weeks, 4 days
[PATCH 0/2] bhyve: document new features
by Roman Bogorodskiy
Roman Bogorodskiy (2):
NEWS: bhyve: document new features
docs: drvbhyve: document virtio-rnd support
NEWS.rst | 14 ++++++++++++++
docs/drvbhyve.rst | 21 +++++++++++++++++++--
2 files changed, 33 insertions(+), 2 deletions(-)
--
2.49.0
3 weeks, 5 days