[PATCH] docs: fix indent of hostdev examples
by Daniel P. Berrangé
From: Daniel P. Berrangé <berrange(a)redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
docs/formatdomain.rst | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 8753ee9c23..ca4e84983f 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -4600,15 +4600,15 @@ or:
...
<devices>
<hostdev mode='subsystem' type='mdev' model='vfio-pci'>
- <source>
- <address uuid='c2177883-f1bb-47f0-914d-32a22e3a8804'/>
- </source>
+ <source>
+ <address uuid='c2177883-f1bb-47f0-914d-32a22e3a8804'/>
+ </source>
</hostdev>
<hostdev mode='subsystem' type='mdev' model='vfio-ccw'>
<source>
<address uuid='9063cba3-ecef-47b6-abcf-3fef4fdcad85'/>
</source>
- <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
+ <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
</hostdev>
</devices>
...
--
2.49.0
4 days, 17 hours
[PATCH] docs: Change units to 'kiB' from 'kB'/'kilobytes'/'kb'
by Peter Krempa
From: Peter Krempa <pkrempa(a)redhat.com>
Use the short unit for kibibytes instead of the confusing or plainly
wrong units.
Closes: https://gitlab.com/libvirt/libvirt/-/issues/594
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
docs/formatdomain.rst | 4 ++--
docs/formatnetwork.rst | 4 ++--
docs/manpages/virsh.rst | 6 +++---
include/libvirt/libvirt-domain.h | 12 ++++++------
src/libvirt-domain.c | 12 ++++++------
5 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 8753ee9c23..82606ef35f 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -1139,7 +1139,7 @@ influence how virtual memory pages are backed by host pages.
element is introduced. It has one compulsory attribute ``size`` which
specifies which hugepages should be used (especially useful on systems
supporting hugepages of different sizes). The default unit for the ``size``
- attribute is kilobytes (multiplier of 1024). If you want to use different
+ attribute is kiB (multiplier of 1024). If you want to use different
unit, use optional ``unit`` attribute. For systems with NUMA, the optional
``nodeset`` attribute may come handy as it ties given guest's NUMA nodes to
certain hugepage sizes. From the example snippet, one gigabyte hugepages are
@@ -4298,7 +4298,7 @@ attribute are
- ``pcie-to-pci-bridge`` ( :since:`since 4.3.0` )
The root controllers (``pci-root`` and ``pcie-root``) have an optional
-``pcihole64`` element specifying how big (in kilobytes, or in the unit specified
+``pcihole64`` element specifying how big (in kiB, or in the unit specified
by ``pcihole64``'s ``unit`` attribute) the 64-bit PCI hole should be. Some
guests (like Windows XP or Windows Server 2003) might crash when QEMU and
Seabios are recent enough to support 64-bit PCI holes, unless this is disabled
diff --git a/docs/formatnetwork.rst b/docs/formatnetwork.rst
index 053fe6ad56..6694a145af 100644
--- a/docs/formatnetwork.rst
+++ b/docs/formatnetwork.rst
@@ -468,10 +468,10 @@ follows, where accepted values for each attribute is an integer number.
``average``
Specifies the desired average bit rate for the interface being shaped (in
- kilobytes/second).
+ kiB/second).
``peak``
Optional attribute which specifies the maximum rate at which the bridge can
- send data (in kilobytes/second). Note the limitation of implementation: this
+ send data (in kiB/second). Note the limitation of implementation: this
attribute in the ``outbound`` element is ignored (as Linux ingress filters
don't know it yet).
``burst``
diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
index 3a00778467..895a905b08 100644
--- a/docs/manpages/virsh.rst
+++ b/docs/manpages/virsh.rst
@@ -2274,7 +2274,7 @@ If no *--inbound* or *--outbound* is specified, this command will
query and show the bandwidth settings. Otherwise, it will set the
inbound or outbound bandwidth. *average,peak,burst,floor* is the same as
in command *attach-interface*. Values for *average*, *peak* and *floor*
-are expressed in kilobytes per second, while *burst* is expressed in kilobytes
+are expressed in kiB per second, while *burst* is expressed in kiB
in a single burst at *peak* speed as described in the Network XML
documentation at
`https://libvirt.org/formatnetwork.html#quality-of-service <https://libvirt.org/formatnetwork.html#quality-of-service>`__.
@@ -5261,8 +5261,8 @@ interface. At least one from the *average*, *floor* pair must be
specified. The other two *peak* and *burst* are optional, so
"average,peak", "average,,burst", "average,,,floor", "average" and
",,,floor" are also legal. Values for *average*, *floor* and *peak*
-are expressed in kilobytes per second, while *burst* is expressed in
-kilobytes in a single burst at *peak* speed as described in the
+are expressed in kiB per second, while *burst* is expressed in
+kiB in a single burst at *peak* speed as described in the
Network XML documentation at
`https://libvirt.org/formatnetwork.html#quality-of-service <https://libvirt.org/formatnetwork.html#quality-of-service>`__.
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 9496631bcc..ac5daf7d0c 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -715,9 +715,9 @@ typedef virDomainInterfaceStatsStruct *virDomainInterfaceStatsPtr;
* Since: 0.7.5
*/
typedef enum {
- /* The total amount of data read from swap space (in kB). (Since: 0.7.5) */
+ /* The total amount of data read from swap space (in kiB). (Since: 0.7.5) */
VIR_DOMAIN_MEMORY_STAT_SWAP_IN = 0,
- /* The total amount of memory written out to swap space (in kB). (Since: 0.7.5) */
+ /* The total amount of memory written out to swap space (in kiB). (Since: 0.7.5) */
VIR_DOMAIN_MEMORY_STAT_SWAP_OUT = 1,
/*
@@ -738,7 +738,7 @@ typedef enum {
/*
* The amount of memory left completely unused by the system. Memory that
* is available but used for reclaimable caches should NOT be reported as
- * free. This value is expressed in kB.
+ * free. This value is expressed in kiB.
*
* Since: 0.7.5
*/
@@ -748,7 +748,7 @@ typedef enum {
* The total amount of usable memory as seen by the domain. This value
* may be less than the amount of memory assigned to the domain if a
* balloon driver is in use or if the guest OS does not initialize all
- * assigned pages. This value is expressed in kB.
+ * assigned pages. This value is expressed in kiB.
*
* Since: 0.7.5
*/
@@ -762,7 +762,7 @@ typedef enum {
VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON = 6,
/* Resident Set Size of the process running the domain. This value
- * is in kB
+ * is in kiB
*
* Since: 0.9.10
*/
@@ -785,7 +785,7 @@ typedef enum {
/*
* The amount of memory, that can be quickly reclaimed without
- * additional I/O (in kB). Typically these pages are used for caching files
+ * additional I/O (in kiB). Typically these pages are used for caching files
* from disk.
*
* Since: 4.6.0
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 93e8f5b853..ca110bdf85 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -6284,27 +6284,27 @@ virDomainGetInterfaceParameters(virDomainPtr domain,
* Memory Statistics:
*
* VIR_DOMAIN_MEMORY_STAT_SWAP_IN:
- * The total amount of data read from swap space (in kb).
+ * The total amount of data read from swap space (in kiB).
* VIR_DOMAIN_MEMORY_STAT_SWAP_OUT:
- * The total amount of memory written out to swap space (in kb).
+ * The total amount of memory written out to swap space (in kiB).
* VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT:
* The number of page faults that required disk IO to service.
* VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT:
* The number of page faults serviced without disk IO.
* VIR_DOMAIN_MEMORY_STAT_UNUSED:
- * The amount of memory which is not being used for any purpose (in kb).
+ * The amount of memory which is not being used for any purpose (in kiB).
* VIR_DOMAIN_MEMORY_STAT_AVAILABLE:
- * The total amount of memory available to the domain's OS (in kb).
+ * The total amount of memory available to the domain's OS (in kiB).
* VIR_DOMAIN_MEMORY_STAT_USABLE:
* How much the balloon can be inflated without pushing the guest system
* to swap, corresponds to 'Available' in /proc/meminfo
* VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON:
- * Current balloon value (in kb).
+ * Current balloon value (in kiB).
* VIR_DOMAIN_MEMORY_STAT_LAST_UPDATE
* Timestamp of the last statistic
* VIR_DOMAIN_MEMORY_STAT_DISK_CACHES
* Memory that can be reclaimed without additional I/O, typically disk
- * caches (in kb).
+ * caches (in kiB).
* VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGALLOC
* The number of successful huge page allocations from inside the domain
* VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGFAIL
--
2.49.0
4 days, 18 hours
[PATCH] esx: Avoid corner case where esxUtil_ParseDatastorePath could be called with NULL 'datastorePath'
by Peter Krempa
From: Peter Krempa <pkrempa(a)redhat.com>
The generated code which parses the data from XML in
esxVI_LookupDatastoreContentByDatastoreName can fill the 'folderPath'
property with NULL if it were missing from the input XML. While this is
not likely when talking to esx it is a possible outcome. Skipp NULL
results.
All other code paths already ensure that the function is not called with
NULL.
Closes: https://gitlab.com/libvirt/libvirt/-/issues/776
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/esx/esx_storage_backend_vmfs.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backend_vmfs.c
index 145aff0c9c..8e13201fe2 100644
--- a/src/esx/esx_storage_backend_vmfs.c
+++ b/src/esx/esx_storage_backend_vmfs.c
@@ -616,6 +616,9 @@ esxStoragePoolListVolumes(virStoragePoolPtr pool, char **const names,
searchResults = searchResults->_next) {
g_autofree char *directoryAndFileName = NULL;
+ if (!searchResults->folderPath)
+ continue;
+
if (esxUtil_ParseDatastorePath(searchResults->folderPath, NULL, NULL,
&directoryAndFileName) < 0) {
goto cleanup;
@@ -759,6 +762,9 @@ esxStorageVolLookupByKey(virConnectPtr conn, const char *key)
searchResults = searchResults->_next) {
g_autofree char *directoryAndFileName = NULL;
+ if (searchResults->folderPath)
+ continue;
+
if (esxUtil_ParseDatastorePath(searchResults->folderPath, NULL,
NULL, &directoryAndFileName) < 0) {
goto cleanup;
--
2.49.0
4 days, 18 hours
Release of libvirt-11.4.0
by Jiri Denemark
The 11.4.0 release of both libvirt and libvirt-python is tagged and
signed tarballs are available at
https://download.libvirt.org/
https://download.libvirt.org/python/
Thanks everybody who helped with this release by sending patches,
reviewing, testing, or providing feedback. Your work is greatly
appreciated.
* New features
* qemu: ppc64 POWER11 processor support
Support for the recently released IBM POWER11 processor was added.
* Packaging changes
* All helper programs are now detected from ``$PATH`` during runtime
All of the code was now converted to dynamically look up helper programs
in ``$PATH`` rather than doing the lookup at build time and then compiling
in the result.
Programs ``mount``, ``umount``, ``mkfs``, ``modprobe``, ``rmmod``,
``numad``, ``dmidecode``, ``ip``, ``tc``, ``mdevctl``, ``mm-ctl``,
``iscsiadm``, ``ovs-vsctl``, ``pkttyagent``, ``bhyveload``, ``bhyvectl``,
``bhyve``, ``ifconfig``, ``vzlist``, ``vzctl``, ``vzmigrate``, and the
tools from the lvm suite (``vgchange``, ``lvcreate``, etc..) are now not
needed during build and will still work properly if placed in ``$PATH``.
This also ensures that libvirt works correctly on distros that are
transitioning ``/sbin`` into ``/bin`` and upgraded installations have
a different layout from fresh installations.
* Improvements
* virsh: Add option ``--no-pkttyagent``
That option suppresses registration of pkttyagent with polkitd.
* bhyve: support NVRAM configuration for UEFI firmwares
The bhyve driver now supports specifying NVRAM store file, such as::
<os firmware='efi'>
<nvram/>
</os>
* qemu: Improve accuracy of FDC/floppy device support statement in capabilities XML
The data is now based on the presence of the controller in qemu rather than
just a denylist of machine types where floppies not work.
* Bug fixes
* qemu: Fix failure when reverting to internal snapshots
A regression in ``libvirt-11.2`` and ``libvirt-11.3`` prevents reverting to
an internal snapshot. Attempts to revert would produce the following error::
error: operation failed: load of internal snapshot 'foo1' job failed: Device 'libvirt-1-format' is writable but does not support snapshots
The only workaround is to avoid the broken versions.
* qemu: Fix virtqemud crash when resuming failed post-copy migration
A regression introduced in ``libvirt-11.2.0`` caused virtqemud on the
destination host to crash when trying to resume failed post-copy
migration.
* qemu: Treat the ``queues`` configuration of ``virtio-net`` as guest ABI
The queue count itself isn't a device frontend property but libvirt uses
it to calculate ``vectors`` option of the device which is a guest OS visible
property, thus ``queues`` must not change during migration. The ABI stability
check now handles this properly.
Enjoy.
Jirka
4 days, 19 hours
[PATCH 0/1] cpu_map: fix vmx-* features wrong bitmaps
by Hector Cao
Hello,
I'm unable to make virsh capabilities to detect the right CPU model
on an Intel Granite Rapids platform. I would expect the get the
CPU model defined in one of the src/cpu_map/x86_GraniteRapids*.xml
files.
The cause of the wrong detection is the fact that some vmx-* are
not correctly detected and considered missing on this platform.
When I take a look at the src/cpu_map/x86_features.xml file, I
think that some of the vmx-* are wrongly defined.
Taking as an example the vmx-apicv-xapic feature, it is defined as
the first bit in the EAX register when we read the MSR 0x0000048b .
But in Intel specification, this feature is represented as the first
bit in the EDX register (32 higher bits).
You can find in this submission the patch that fixes this issue,
and this for all the affected MSRs.
I tested this fix on my Granite Rapids platform and the CPU model
is now correctly detected.
Hector Cao (1):
cpu_map: fix vmx-* features wrong bitmaps
src/cpu_map/x86_features.xml | 136 +++++++++++++++++------------------
1 file changed, 68 insertions(+), 68 deletions(-)
--
2.45.2
5 days, 6 hours
[PATCH v2 0/4] bhyve: implement domain{Block,Interface,Memory}Stats
by Roman Bogorodskiy
Changes since v1:
- Added "bhyve: implement domainInterfaceStats" patch
PS It was temping to factor out obtaining struct kinfo_proc using
sysctlnametomib() + sysctl(), but I have to make it visible to use
outside of virprocess, e.g. in bhyve_driver.c, so it doesn't look like
it's worth the effort for now. Probably it'll make sense to implement a
FreeBSD version of virProcessGetStat() once there are more users of this
code.
Roman Bogorodskiy (4):
bhyve: implement domainInterfaceStats
virprocess: implement virProcessGetStatInfo() for FreeBSD
bhyve: implement domainMemoryStats
bhyve: implement domainBlockStats
src/bhyve/bhyve_driver.c | 140 +++++++++++++++++++++++++++++++++++++++
src/util/virprocess.c | 104 +++++++++++++++++++++--------
2 files changed, 218 insertions(+), 26 deletions(-)
--
2.49.0
5 days, 22 hours