]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
22 months agoqemu: Report physical address size in domain capabilities
Jiri Denemark [Fri, 9 Jun 2023 15:17:36 +0000 (17:17 +0200)]
qemu: Report physical address size in domain capabilities

We already report the hosts physical address size in host capabilities,
but computing a baseline CPU definition is done from domain
capabilities.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
22 months agoconf/nwfilter: Initialize size_t attr to zero
Martin Kletzander [Wed, 14 Jun 2023 10:30:29 +0000 (12:30 +0200)]
conf/nwfilter: Initialize size_t attr to zero

Newer GCC (13.1.1 in my case) wrongly reports "maybe uninitialized"
warning for this variable inside the next condition.  Even though this
accusation is wrong (the condition is guarded by the same condition as
the for cycle initializing it), initialize it during the declaration so
compilation errors don't stop others and maybe also future proof the
code for changes.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
22 months agomeson-dist: Use shutil.copy for copying a file
Martin Kletzander [Mon, 12 Jun 2023 07:49:33 +0000 (09:49 +0200)]
meson-dist: Use shutil.copy for copying a file

Using os.system("cp {0} {1}".format(...)) has two issues, it does not
work on Windows, but more importantly it can cause issues in case one of
the directories has a space in it.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
22 months agoutil: Use g_ascii_strtoll
Martin Kletzander [Fri, 31 Mar 2023 12:44:11 +0000 (14:44 +0200)]
util: Use g_ascii_strtoll

This has two main advantages:

- it parses the number with C locale explicitly

- it behaves the same on Windows as on Linux and BSD

both of which are wanted behaviours.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
22 months agoutil: Remove virStrToLong_l
Martin Kletzander [Fri, 31 Mar 2023 12:22:49 +0000 (14:22 +0200)]
util: Remove virStrToLong_l

With the last user gone this function can be abolished.  It is
preferable to use _ll instead since that is not a subject to 32/64 bit
scaling.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
22 months agoutil: Parse RSS into ullp
Martin Kletzander [Fri, 31 Mar 2023 12:39:34 +0000 (14:39 +0200)]
util: Parse RSS into ullp

It is used to fill an unsigned long long anyway and if it is negative
than there is really an issue somewhere.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
22 months agoconf: virtiofs: validate that the target dir is unique even for hotplug
Ján Tomko [Wed, 7 Jun 2023 15:40:23 +0000 (17:40 +0200)]
conf: virtiofs: validate that the target dir is unique even for hotplug

https://bugzilla.redhat.com/show_bug.cgi?id=2171384

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
22 months agomeson: Use dependency().found() instead of conf.has()
Michal Privoznik [Thu, 23 Mar 2023 08:15:35 +0000 (09:15 +0100)]
meson: Use dependency().found() instead of conf.has()

So far this change alone doesn't make much sense, but prepares
code for upcoming change. Unfortunately, some conf.has()
statements have to stay, because there's no corresponding
dependency(). But that's okay.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
22 months agomeson: numactl_dep switch to dependency()
Michal Privoznik [Thu, 23 Mar 2023 08:21:17 +0000 (09:21 +0100)]
meson: numactl_dep switch to dependency()

The pkg-config file to libnuma was introduced in 2.0.12 release
(though the comment mistakenly claims 2.0.14 version). Every
supported distro ships at least this version, and thus we can
switch meson detection to dependency().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
22 months agomeson: attr_dep switch to dependency()
Michal Privoznik [Thu, 23 Mar 2023 08:13:52 +0000 (09:13 +0100)]
meson: attr_dep switch to dependency()

The pkg-config file to libattr was introduced in 2.4.48 release.
Now that every supported distro ships at least this version, we
can switch meson detection to dependency().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
22 months agomeson: acl_dep switch to dependency()
Michal Privoznik [Thu, 23 Mar 2023 08:12:52 +0000 (09:12 +0100)]
meson: acl_dep switch to dependency()

The pkg-config file to libacl was introduced in 2.2.53 release.
Now that every supported distro ships at least this version, we
can switch meson detection to dependency().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
22 months agoTranslated using Weblate (German)
Malte Linke [Fri, 9 Jun 2023 13:20:43 +0000 (15:20 +0200)]
Translated using Weblate (German)

Currently translated at 47.4% (4932 of 10397 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/de/

Co-authored-by: Malte Linke <malte.linke@outlook.com>
Signed-off-by: Malte Linke <malte.linke@outlook.com>
22 months agoqemu: Drop @unionMems argument from qemuProcessSetupPid()
Michal Privoznik [Wed, 7 Jun 2023 11:42:10 +0000 (13:42 +0200)]
qemu: Drop @unionMems argument from qemuProcessSetupPid()

The @unionMems argument of qemuProcessSetupPid() function is not
necessary really as all callers pass 'true'. Drop it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
22 months agoqemu: Allow more generous cpuset.mems for vCPUs and IOThreads
Michal Privoznik [Wed, 7 Jun 2023 06:40:15 +0000 (08:40 +0200)]
qemu: Allow more generous cpuset.mems for vCPUs and IOThreads

The unit that cpuset CGroups controller works with is a
thread/process, not individual memory allocations. Therefore,
after we've set cpuset.mems for emulator (after previous commit
it's set to union of all host NUMA nodes allowed for given
domain), and as we try to set up cpuset.mems for vCPUs/IOThreads,
memory is migrated to selected NUMA node(s). We are effectively
saying: "this thread (vCPU thread) can have memory only from
these NUMA node(s)".

That's not really what we want though. The cpuset controller
doesn't differentiate memory "belonging" to the emulator thread
and vCPU thread or IOThread even.

Therefore, set union of all allowed host NUMA nodes, just like
we're doing for the emulator thread.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2138150
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
22 months agoqemu: Don't try to 'fix up' cpuset.mems after QEMU's memory allocation
Michal Privoznik [Tue, 6 Jun 2023 14:34:59 +0000 (16:34 +0200)]
qemu: Don't try to 'fix up' cpuset.mems after QEMU's memory allocation

In ideal world, my plan was perfect. We allow union of all host
nodes in cpuset.mems and once QEMU has allocated its memory, we
'fix up' restriction of its emulator thread by writing the
original value we wanted to set all along. But in fact, we can't
do it because that triggers memory movement. For instance,
consider the following <numatune/>:

  <numatune>
    <memory mode="strict" nodeset="0"/>
    <memnode cellid="1" mode="strict" nodeset="1"/>
  </numatune>

  <numa>
    <cell id="0" cpus="0-1" memory="1024000" unit="KiB" />
    <cell id="1" cpus="2-3" memory="1048576" unit="KiB"/>
  </numa>

This is meant to create 1:1 mapping between guest and host NUMA
nodes. So we start QEMU with cpuset.mems set to "0-1" (so that it
can allocate memory even for guest node #1 and have the memory
come fro host node #1) and then, set cpuset.mems to "0" (because
that's where we wanted emulator thread to live).

But this in turn triggers movement of all memory (even the
allocated one) to host NUMA node #0. Therefore, we have to just
keep cpuset.mems untouched and rely on .host-nodes passed on the
QEMU cmd line.

The placement still suffers because of cpuset.mems set for vcpus
or iothreads, but that's fixed in next commit.

Fixes: 3ec6d586bc3ec7a8cf406b1b6363e87d50aa159c
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
22 months agoapparmor: Add support for local profile customizations
Jim Fehlig [Tue, 6 Jun 2023 17:05:50 +0000 (11:05 -0600)]
apparmor: Add support for local profile customizations

Apparmor profiles in /etc/apparmor.d/ are config files that can and should
be replaced on package upgrade, which introduces the potential to overwrite
any local changes. Apparmor supports local profile customizations via
/etc/apparmor.d/local/<service> [1].

This change makes the support explicit by adding libvirtd, virtqemud, and
virtxend profile customization stubs to /etc/apparmor.d/local/. The stubs
are conditionally included by the corresponding main profiles.

[1] https://ubuntu.com/server/docs/security-apparmor
See "Profile customization" section

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agoqemucapabilitiestest: Add data for the qemu-8.1
Peter Krempa [Thu, 18 May 2023 12:07:30 +0000 (14:07 +0200)]
qemucapabilitiestest: Add data for the qemu-8.1

Add data as of v8.0.0-1619-g369081c455:

Notable changes:
 - 'SapphireRapids' cpu model added
 - 'EPYC-Genoa(-v1)' cpu model added
 - 'EPYC-Milan-v2' cpu model added
 - 'EPYC-Rome-(v3|v4)' cpu models added
 - new cpu features:
    'fb-clear', 'cmpccxadd', 'vnmi', 'flush-l1d', 'avx-vnni-int8', 'avx-ifma',
    'no-nested-data-bp', 'null-sel-clr-base', 'amd-psfd', 'auto-ibrs', 'amx-fp16',
    'prefetchiti', 'lfence-always-serializing', 'avx-ne-convert'
 - 8.1 machine types added

 - QMP schema:
   - 'block-latency-histogram-set' gained 'boundaries-zap' property
   - 'qcow2' block driver gained 'discard-no-unref' flag
   - 'input-send-event' now supports the 'mtt' type and corresponding properties
   - 'memory-backend-file' object now has a 'offset' property
   - 'query-blockstats' reports 'failed_zone_append_operations', 'avg_zone_append_latency_ns'
       'avg_zone_append_queue_depth', 'zone_append_bytes', 'zone_append_latency_histogram',
       'zone_append_operations', 'zone_append_merged', 'zone_append_total_time_ns'
   - 'single-step' property of 'query-status' is deprecated
   - 'vcpu' argument of 'trace-events-(set|get'-state' is deprecated

'cpu-host-model' qemuxml2argv test output changed as EPYC-Rome gained
few new cpu flags.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agoqemumonitorjsontest: Work around deprecation of 'vcpu' argument of 'trace-event-get...
Peter Krempa [Tue, 6 Jun 2023 09:03:39 +0000 (11:03 +0200)]
qemumonitorjsontest: Work around deprecation of 'vcpu' argument of 'trace-event-get-state'

'trace-event-get-state' was used for testing schema validation as it had
simple arguments. Now 'vcpu' is optional and deprecated. Fix the test so
that it won't break with upcoming qemu-8.1.

Drop the 'all-attrs' case, as it's not not really testing anything
special and for the 'missing mandatory attr' case use an empty object.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agoTranslated using Weblate (Korean)
김인수 [Sat, 3 Jun 2023 18:20:49 +0000 (20:20 +0200)]
Translated using Weblate (Korean)

Currently translated at 100.0% (10397 of 10397 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ko/

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
23 months agovirnetsshsession: Adapt to changed libssh2 API
Michal Privoznik [Mon, 5 Jun 2023 12:24:48 +0000 (14:24 +0200)]
virnetsshsession: Adapt to changed libssh2 API

In one of its commits [1] libssh2 changed the 'text' member of
LIBSSH2_USERAUTH_KBDINT_PROMPT struct from 'char' to 'unsigned
char'. But we g_strdup() the member in order to fill 'prompt'
member of virConnectCredential struct. Typecast the value to
avoid warnings. Also, drop @prompt variable, as it's needless.

1: https://github.com/libssh2/libssh2/commit/83853f8aea0e2f739cacd491632eb7fd3d03ad2d
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
23 months agodocs: fix changed API calls
Oleg Vasilev [Fri, 3 Mar 2023 08:24:55 +0000 (14:24 +0600)]
docs: fix changed API calls

Signed-off-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com>
23 months agoconf: nwfilter: Refactor virNWFilterFormatParamAttributes
Peter Krempa [Tue, 11 Apr 2023 16:13:43 +0000 (18:13 +0200)]
conf: nwfilter: Refactor virNWFilterFormatParamAttributes

Use virXMLFormatElement and simplify the formatter.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoconf: nwfilter: Refactor virNWFilterIncludeParse
Peter Krempa [Tue, 11 Apr 2023 16:02:28 +0000 (18:02 +0200)]
conf: nwfilter: Refactor virNWFilterIncludeParse

Use automatic memory freeing and modern XML parsers to simplify the
function.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agovirNWFilterRuleDefDetailsFormat: Refactor formatter
Peter Krempa [Thu, 16 Feb 2023 13:09:31 +0000 (14:09 +0100)]
virNWFilterRuleDefDetailsFormat: Refactor formatter

Format the rule attributes in two passes, first for positive 'match' and
second pass for negative. This removes the crazy logic for switching
between match modes inside the formatter.

The refactor makes it also more clear in which cases we actually do
format something.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agovirNWFilterRuleParse: Refactor attribute parser
Peter Krempa [Thu, 16 Feb 2023 12:56:53 +0000 (13:56 +0100)]
virNWFilterRuleParse: Refactor attribute parser

Use virXMLNodeGetSubelementList to get the elements to process.

The new approach documents the complexity of the parser, which is
designed to ignore unknown attributes and parse only a single kind of
them after finding the first valid one.

Note that the XML schema doesn't actually allow having multiple
sub-elements, but I'm not sure how that translates to actual configs
present.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agovirNWFilterRuleParse: Parse 'priority' via 'virXMLPropInt'
Peter Krempa [Thu, 16 Feb 2023 12:20:03 +0000 (13:20 +0100)]
virNWFilterRuleParse: Parse 'priority' via 'virXMLPropInt'

Use modern parsing. Invalid numbers are now rejected. Semantis for
numbers out of range is preserved.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agovirNWFilterRuleDef: Turn 'action' and 'tt' into proper enum types
Peter Krempa [Thu, 16 Feb 2023 12:14:45 +0000 (13:14 +0100)]
virNWFilterRuleDef: Turn 'action' and 'tt' into proper enum types

Convert the fields to the proper types and use virXMLPropEnum for
parsing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoconf: nwfilter: Refactor XML formatting in virNWFilterRuleDefFormat
Peter Krempa [Thu, 16 Feb 2023 09:18:46 +0000 (10:18 +0100)]
conf: nwfilter: Refactor XML formatting in virNWFilterRuleDefFormat

Use virXMLFormatElement to simplify the formatter. Drop return value of
virNWFilterRuleDefFormat as there are no errors to report.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoconf: network: Refactor XML parsing in virNetworkDHCPDefParseXML
Peter Krempa [Wed, 15 Feb 2023 16:10:18 +0000 (17:10 +0100)]
conf: network: Refactor XML parsing in virNetworkDHCPDefParseXML

Use virXMLNodeGetSubelement(List) instead of the looped parser and
simplify the code.

Note that handling of the 'bootp' element now conforms to the schema
where we allow just one and the 'file' attribute is mandatory.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agonwfilterxml2xmltest: Add test case for parser and formatter quirks
Peter Krempa [Thu, 16 Feb 2023 09:46:41 +0000 (10:46 +0100)]
nwfilterxml2xmltest: Add test case for parser and formatter quirks

The parser and formatter for nwfilter rules is very strange and has
weird quirks. Add a test case trying to capture some of the quirks to
visualize how it will change when the code is refactored.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoutil: xml: Introduce virXMLNodeGetSubelementList
Peter Krempa [Mon, 13 Feb 2023 14:53:23 +0000 (15:53 +0100)]
util: xml: Introduce virXMLNodeGetSubelementList

The new helper is similar to virXPathNodeSet list but for cases where we
want to get subelements directly rather than using XPath.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agovirNetworkDHCPDefParseXML: Refactor cleanup
Peter Krempa [Mon, 13 Feb 2023 14:18:21 +0000 (15:18 +0100)]
virNetworkDHCPDefParseXML: Refactor cleanup

There's nothing to clean up in the 'host' local variable on error as
the function which fills it makes sure to fill it only on success. In
such case it's also directly assigned to the array thus the 'host'
variable is cleared.

Remove the 'cleanup' label and 'ret' variable as we can now directly
return -1 on error.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agovirNetDevBandwidthParse: Use virXMLNodeGetSubelement instead of looped parser
Peter Krempa [Mon, 13 Feb 2023 14:08:53 +0000 (15:08 +0100)]
virNetDevBandwidthParse: Use virXMLNodeGetSubelement instead of looped parser

Extract the 'inbound'/'outbound' subelements using
virXMLNodeGetSubelement to simplify the code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agovirNetDevBandwidthParseRate: Refactor parsing
Peter Krempa [Mon, 13 Feb 2023 13:59:46 +0000 (14:59 +0100)]
virNetDevBandwidthParseRate: Refactor parsing

Remove the unnecessary check for valid arguments and use
virXMLPropULongLong instead of hand-written property parsers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agovirNetDevBandwidthParse: Use 'virXMLPropUInt' to parse 'classID'
Peter Krempa [Mon, 13 Feb 2023 13:45:45 +0000 (14:45 +0100)]
virNetDevBandwidthParse: Use 'virXMLPropUInt' to parse 'classID'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agovirNetDevBandwidthParse: Don't validate element name
Peter Krempa [Mon, 13 Feb 2023 13:38:09 +0000 (14:38 +0100)]
virNetDevBandwidthParse: Don't validate element name

Callers make sure to pass the correct element.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agotestQEMUSchemaValidateObjectMember: validate QMP object member deprecation
Peter Krempa [Mon, 22 May 2023 10:49:17 +0000 (12:49 +0200)]
testQEMUSchemaValidateObjectMember: validate QMP object member deprecation

The QMP schema validator wasn't adapted to consider features of 'object'
members and thus we didn't catch the deprecation of 'device' in
'block_set_io_throttle'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoqemuMonitorSetBlockIoThrottle: Drop 'diskalias' argument
Peter Krempa [Tue, 23 May 2023 13:32:49 +0000 (15:32 +0200)]
qemuMonitorSetBlockIoThrottle: Drop 'diskalias' argument

Every caller will pass 'qdevid' as it's populated in the data
mandatorily with qemu-4.2 and onwards due to mandatory -blockdev use.

Thus we can drop compatibility with the old way of matching the disk via
alias.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoqemuMonitorGetBlockIoThrottle: Drop 'diskalias' argument
Peter Krempa [Tue, 23 May 2023 13:32:49 +0000 (15:32 +0200)]
qemuMonitorGetBlockIoThrottle: Drop 'diskalias' argument

Every caller will pass 'qdevid' as it's populated in the data
mandatorily with qemu-4.2 and onwards due to mandatory -blockdev use.

Thus we can drop compatibility with the old way of matching the disk via
alias.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoqemumonitorjsontest: Use 'id' instead of deprecated 'device' argument of 'block_set_i...
Peter Krempa [Tue, 23 May 2023 12:20:29 +0000 (14:20 +0200)]
qemumonitorjsontest: Use 'id' instead of deprecated 'device' argument of 'block_set_io_throttle'

The 'device' argument is deprecated. All real usage in the qemu driver
already uses 'id' as we populate the 'qomName' for everything except for
SD cards where throttling didn't work with libvirt for a very long time.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoqemu: Refuse setting <iotune> for 'SD' disks
Peter Krempa [Thu, 25 May 2023 14:48:24 +0000 (16:48 +0200)]
qemu: Refuse setting <iotune> for 'SD' disks

Historically this didn't work with any supported qemu version as we
don't set the alias of the device, and thus qemu uses a different alias
resulting in a failure to startup the VM:

  internal error: unable to execute QEMU command 'block_set_io_throttle': Device 'drive-sd-disk0' not found

Refuse setting throttling as this is unlikely to be needed and proper
fix requires using -device instead of -drive if=sd.

Note that this was broken when I moved the setup of throttling as a
command at startup for blockdev integration quite a while ago. Until
then throttling was passed as arguments for -drive.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoqemuDiskConfigBlkdeviotuneEnabled: Make 'disk' argument const
Peter Krempa [Thu, 25 May 2023 14:52:36 +0000 (16:52 +0200)]
qemuDiskConfigBlkdeviotuneEnabled: Make 'disk' argument const

The function doesn't modify it. Fix the argument declaration so that the
function can be used in a context where we have a 'const' disk
definition.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoqemumonitorjsontest: Drop 'schema-meta' case
Peter Krempa [Mon, 22 May 2023 11:17:17 +0000 (13:17 +0200)]
qemumonitorjsontest: Drop 'schema-meta' case

The test case is validating the QMP schema against itself. This was
useful when I was developing the validator but at this point it's no
longer needed.

Additionally the QMP schema has few deprecated members now, which our
validator doesn't catch yet, so this test would start failing once I fix
the validator.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoDrop unused qemuMonitorTestAddItemParams
Peter Krempa [Mon, 22 May 2023 15:32:45 +0000 (17:32 +0200)]
Drop unused qemuMonitorTestAddItemParams

Using qemuMonitorTestAddItemVerbatim is more universal and that helper
also does QMP schema validation. Remove the now unused helper.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agotestQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottle: Rewrite using qemuMonitorTestAd...
Peter Krempa [Mon, 22 May 2023 15:08:27 +0000 (17:08 +0200)]
testQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottle: Rewrite using qemuMonitorTestAddItemVerbatim

Replace qemuMonitorTestAddItemParams by qemuMonitorTestAddItemVerbatim

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agotestQemuMonitorJSONqemuMonitorJSONSendKeyHoldtime: Rewrite using qemuMonitorTestAddIt...
Peter Krempa [Mon, 22 May 2023 15:08:27 +0000 (17:08 +0200)]
testQemuMonitorJSONqemuMonitorJSONSendKeyHoldtime: Rewrite using qemuMonitorTestAddItemVerbatim

Replace qemuMonitorTestAddItemParams by qemuMonitorTestAddItemVerbatim

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agotestQemuAgentFSTrim: Rewrite using qemuMonitorTestAddItemVerbatim
Peter Krempa [Mon, 22 May 2023 15:08:27 +0000 (17:08 +0200)]
testQemuAgentFSTrim: Rewrite using qemuMonitorTestAddItemVerbatim

Replace qemuMonitorTestAddItemParams by qemuMonitorTestAddItemVerbatim

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agotestQemuAgentCPU: Rewrite using qemuMonitorTestAddItemVerbatim
Peter Krempa [Mon, 22 May 2023 15:08:27 +0000 (17:08 +0200)]
testQemuAgentCPU: Rewrite using qemuMonitorTestAddItemVerbatim

Replace qemuMonitorTestAddItemParams by qemuMonitorTestAddItemVerbatim

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agovirRaiseErrorLog: Don't skip error printing when enabling debug logging env variable
Peter Krempa [Mon, 22 May 2023 12:58:38 +0000 (14:58 +0200)]
virRaiseErrorLog: Don't skip error printing when enabling debug logging env variable

When a user requests debug logging by setting the environment variable:

LIBVIRT_DEBUG=1

we should log any errors regardless of the setting of e.g.
'LIBVIRT_LOG_OUTPUTS' as the code will log every 'debug' and 'info'
level message to stderr but will skip 'error' level messages.

This obviously makes debugging things very complicated as you can get to
a situation when the error itself is missing.

This can happen e.g. in tests.

Fix the issue by probing the default log level and calling the logger if
it's set for VIR_LOG_DEBUG.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoci: fix Cirrus CI jobs run from merge requests
Daniel P. Berrangé [Mon, 5 Jun 2023 10:25:01 +0000 (11:25 +0100)]
ci: fix Cirrus CI jobs run from merge requests

Preferentially fetch from $CI_MERGE_REQUEST_REF_PATH if it is
defined, otherwise use $CI_COMMIT_REF_NAME

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
23 months agoqemu: Set proper PCI backend for <interface/>-s that are actually hostdevs
Michal Privoznik [Thu, 1 Jun 2023 11:47:14 +0000 (13:47 +0200)]
qemu: Set proper PCI backend for <interface/>-s that are actually hostdevs

When starting a domain, it's done so in two steps (actually more,
but lets focus on just the following two):

  1) qemuProcessPrepareDomain(), followed by

  2) qemuProcessPrepareHost().

Now, in the first step (PrepareDomain()), PCI backends for all
hostdevs is set (qemuProcessPrepareDomain() ->
qemuProcessPrepareDomainHostdevs() -> qemuDomainPrepareHostdev()
-> qemuDomainPrepareHostdevPCI()). Perfect.

But then, additional hostdevs may appear, because in the host
prepare phase we may insert some hostdevs into domain definition
(qemuProcessPrepareHost() -> qemuProcessNetworkPrepareDevices()).

Now, these additional hostdevs don't undergo the same prepare as
hostdevs that were already present in the domain definition (i.e.
in qemuProcessPrepareDomain() phase). Therefore, we have to call
corresponding prepare function explicitly.

NB, the interface hotplug code (qemuDomainAttachNetDevice()) does
not suffer from this problem, because it calls top level
qemuDomainAttachHostDevice() which is used to hotplug regular
hostdevs too and as such calls qemuDomainPrepareHostdev().

Fixes: 3b87709c768480e085556e06bd8d08f62270d42d
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2209853
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
23 months agoci: refresh with latest lcitool manifest
Erik Skultety [Wed, 31 May 2023 09:32:09 +0000 (11:32 +0200)]
ci: refresh with latest lcitool manifest

Main lcitool changes:
- added Alpine 3.17 and 3.18 targets
- dropped Alpine 3.15 and 3.16

Note that we're not actively testing all Alpine targets due to CI
quota, so only 3.17 is used as a replacement for 3.15 in this patch.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
23 months agoqemuMonitorTestAddItemExpect: Remove unused helper
Peter Krempa [Mon, 22 May 2023 14:30:59 +0000 (16:30 +0200)]
qemuMonitorTestAddItemExpect: Remove unused helper

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoqemuMonitorJSONTestAttachOneChardev: Rewrite using qemuMonitorTestAddItemVerbatim
Peter Krempa [Mon, 22 May 2023 11:43:53 +0000 (13:43 +0200)]
qemuMonitorJSONTestAttachOneChardev: Rewrite using qemuMonitorTestAddItemVerbatim

'qemuMonitorTestAddItemExpect' doesn't do QMP schema validation. Since
it's the only use we can reimplement it using 'qemuMonitorTestAddItemVerbatim'
which does schema validation and remove the old code instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agotestQemuMonitorJSONAttachChardev: Move all setup code under virTestRun
Peter Krempa [Mon, 22 May 2023 14:18:40 +0000 (16:18 +0200)]
testQemuMonitorJSONAttachChardev: Move all setup code under virTestRun

Any failure which happens outside is hard to debug as errors will be
reset and not raised.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoqemuMonitorTestAddHandler: Remove return value
Peter Krempa [Mon, 22 May 2023 12:07:50 +0000 (14:07 +0200)]
qemuMonitorTestAddHandler: Remove return value

The function always returns 0. Remove the return value and fix callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoqemuMonitorTestAddItemVerbatim: Simplify cleanup
Peter Krempa [Mon, 22 May 2023 12:05:46 +0000 (14:05 +0200)]
qemuMonitorTestAddItemVerbatim: Simplify cleanup

Reformat the JSON string before allocating the test data structure so
that we don't have to free it if the reformatting fails.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agodocs: Use '--exit-status=' option for 'rst2html5'
Peter Krempa [Thu, 25 May 2023 13:36:28 +0000 (15:36 +0200)]
docs: Use '--exit-status=' option for 'rst2html5'

Ensure that also 'non-halting' messages stop the build process.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
23 months agodocs: go: Add 'go-import' metadata via rST
Peter Krempa [Tue, 23 May 2023 14:52:24 +0000 (16:52 +0200)]
docs: go: Add 'go-import' metadata via rST

The '.. meta::' rST directive allows adding header metadata. Move the
specific metadata from page.xsl into the individual files and pass them
through into the header from page.xsl.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
23 months agodocs: page.xsl: Drop passhrough of <script> elements into header
Peter Krempa [Thu, 25 May 2023 12:09:22 +0000 (14:09 +0200)]
docs: page.xsl: Drop passhrough of <script> elements into header

No generated headers have inline javascript.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
23 months agodocs: newapi: Remove unused 'docomponents' template
Peter Krempa [Thu, 25 May 2023 11:44:13 +0000 (13:44 +0200)]
docs: newapi: Remove unused 'docomponents' template

Never used since introduction in b38893c3eaa56617a3ef313c45e505da6e50

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
23 months agoqemu_passt: Format portForward device even without address
Michal Privoznik [Thu, 1 Jun 2023 08:37:04 +0000 (10:37 +0200)]
qemu_passt: Format portForward device even without address

It's almost like we've anticipated this. Our XML parser and
formatter handles @address and @dev attributes of <portForward/>
element completely independent of each other. And as of commit
2023_03_29.b10b983~3 passt allows handling these two separately
too. All that's left is generate the cmd line according to this
new fact.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2210287
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoconf: Reject invalid device's <seclabel relabel='yes'/> with no <label/>
Michal Privoznik [Thu, 25 May 2023 13:43:56 +0000 (15:43 +0200)]
conf: Reject invalid device's <seclabel relabel='yes'/> with no <label/>

We allow (some) domain devices to have a different <seclabel/>
than the top level domain one (this is mostly to allow access to
a resource for multiple domains). Now, we do couple of sanity
checks for such <seclabel/>, e.g. when the <label/> is specified,
but '@relabel' is set to no. But what we are missing is the
opposite: when '@relabel' is set, but no <label/> was provided.

Our schema already denies such combination. Make our parser
behave the same.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2160356
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoPost-release version bump to 9.5.0
Jiri Denemark [Thu, 1 Jun 2023 09:50:19 +0000 (11:50 +0200)]
Post-release version bump to 9.5.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
23 months agoRelease of libvirt-9.4.0
Jiri Denemark [Thu, 1 Jun 2023 09:40:25 +0000 (11:40 +0200)]
Release of libvirt-9.4.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
23 months agoTranslated using Weblate (Georgian)
Temuri Doghonadze [Thu, 1 Jun 2023 04:20:44 +0000 (06:20 +0200)]
Translated using Weblate (Georgian)

Currently translated at 3.8% (402 of 10397 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ka/

Co-authored-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Signed-off-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
23 months agoconf: node_device: use separate variables for parsing integers
Ján Tomko [Tue, 30 May 2023 14:59:56 +0000 (16:59 +0200)]
conf: node_device: use separate variables for parsing integers

In virNodeDeviceGetSCSIHostCaps, there is a pattern of reusing
a tmp value and stealing the pointer.

But in two case it is not stolen. Use separate variables for them
to avoid mixing autofree with manual free() calls.

Fixes: 8a0cb5f73ade3900546718eabe70cb064c6bd22c
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agoinclude: Fix 'Since' for new VIR_MIGRATE_PARAM_COMPRESSION_* macros
Michal Privoznik [Wed, 31 May 2023 09:02:21 +0000 (11:02 +0200)]
include: Fix 'Since' for new VIR_MIGRATE_PARAM_COMPRESSION_* macros

In v9.3.0-98-g150ae3e62b two new macros were introduced:
VIR_MIGRATE_PARAM_COMPRESSION_ZLIB_LEVEL and
VIR_MIGRATE_PARAM_COMPRESSION_ZSTD_LEVEL. But both list 9.1.0 as
the version they were introduced in (this is because the patch
was sent in that release time frame). Change the version to the
current release.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
23 months agoNEWS: Document my contributions for upcoming release
Michal Privoznik [Tue, 30 May 2023 07:43:43 +0000 (09:43 +0200)]
NEWS: Document my contributions for upcoming release

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
23 months agoTranslated using Weblate (Korean)
김인수 [Tue, 30 May 2023 05:20:45 +0000 (07:20 +0200)]
Translated using Weblate (Korean)

Currently translated at 100.0% (10397 of 10397 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ko/

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
23 months agoTranslated using Weblate (Ukrainian)
Yuri Chornoivan [Sat, 27 May 2023 15:20:43 +0000 (17:20 +0200)]
Translated using Weblate (Ukrainian)

Currently translated at 100.0% (10397 of 10397 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/uk/

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
23 months agoqemu_command: Generate .memaddr for virtio-mem and virtio-pmem
Michal Privoznik [Tue, 28 Mar 2023 08:44:15 +0000 (10:44 +0200)]
qemu_command: Generate .memaddr for virtio-mem and virtio-pmem

This is fairly trivial. Just set .memaddr attribute if a value
was set in the XML.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2180679
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
23 months agoqemu: Fill virtio-mem/virtio-pmem .memaddr at runtime
Michal Privoznik [Tue, 28 Mar 2023 08:41:39 +0000 (10:41 +0200)]
qemu: Fill virtio-mem/virtio-pmem .memaddr at runtime

After a QEMU domain is started, among other thing we query memory
device information. And while memory address is returned by QEMU
for all models, we store it only for DIMMs and NVDIMMs. Do store
it for VIRTIO_MEM and VIRTIO_PMEM too.

This effectively reports the address the virtio-mem/virtio-pmem
is mapped to in live XML.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
23 months agoconf: Introduce <address/> for virtio-mem and virtio-pmem
Michal Privoznik [Tue, 28 Mar 2023 08:39:55 +0000 (10:39 +0200)]
conf: Introduce <address/> for virtio-mem and virtio-pmem

Both virtio-mem and virtio-pmem devices have '.memaddr' attribute
which controls the address where they are mapped in the guest
memory. Ideally, users do not need to specify this as QEMU does
the right thing and computes addresses automatically on startup.

But soon, we will need to record this address as it is part of
guest ABI. And also, there might be some users that want to
control this value. Now, we are in a bit of a pickle, because
both these device types already have a PCI address, therefore we
can't just use <address/> blindly. But what we can do, is
introduce <address/> under the <target/> element. This is also
more conceptual, as knobs under <target/> control guest visible
config of memory device (and .memaddr surely falls into that
category).

NB, SgxEPCDeviceInfo struct in QMP definition also has .memaddr
attribute, but because of the way we build cmd line there's no
(easy) way to set the attribute. So ignore that for now.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
23 months agoconf: Run virDomainInputDefPostParse() only for VIR_DOMAIN_DEVICE_INPUT
Michal Privoznik [Fri, 26 May 2023 14:15:56 +0000 (16:15 +0200)]
conf: Run virDomainInputDefPostParse() only for VIR_DOMAIN_DEVICE_INPUT

Due to missed break; statement the virDomainInputDefPostParse()
is called not only for VIR_DOMAIN_DEVICE_INPUT but also
VIR_DOMAIN_DEVICE_LEASE and VIR_DOMAIN_DEVICE_NET, which can lead
to all sort of unpredictable results.

Fixes: c4bc4d3b82fbe22e03c986ca896090f481df5c10
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
23 months agoUpdate translation files
Weblate [Fri, 26 May 2023 12:08:02 +0000 (14:08 +0200)]
Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/

Co-authored-by: Weblate <noreply@weblate.org>
Signed-off-by: Fedora Weblate Translation <i18n@lists.fedoraproject.org>
23 months agopo: Refresh potfile for v9.4.0
Jiri Denemark [Fri, 26 May 2023 11:56:42 +0000 (13:56 +0200)]
po: Refresh potfile for v9.4.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
23 months agosync_qemu_models_i386.py: Add missing features
Tim Wiederhake [Wed, 24 May 2023 07:50:14 +0000 (09:50 +0200)]
sync_qemu_models_i386.py: Add missing features

This brings the tool's list of features in sync with qemu
commit 886c0453cbf10eebd42a9ccf89c3e46eb389c357.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agosync_qemu_models_i386.py: Fix complaint from flake8
Tim Wiederhake [Wed, 24 May 2023 08:02:10 +0000 (10:02 +0200)]
sync_qemu_models_i386.py: Fix complaint from flake8

Line was too long.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "vnmi"
Tim Wiederhake [Wed, 24 May 2023 07:33:04 +0000 (09:33 +0200)]
cpu_map: Add missing feature "vnmi"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "stibp-always-on"
Tim Wiederhake [Wed, 24 May 2023 07:32:10 +0000 (09:32 +0200)]
cpu_map: Add missing feature "stibp-always-on"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "prefetchiti"
Tim Wiederhake [Wed, 24 May 2023 07:30:56 +0000 (09:30 +0200)]
cpu_map: Add missing feature "prefetchiti"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "null-sel-clr-base"
Tim Wiederhake [Wed, 24 May 2023 07:29:49 +0000 (09:29 +0200)]
cpu_map: Add missing feature "null-sel-clr-base"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "no-nested-data-bp"
Tim Wiederhake [Wed, 24 May 2023 07:29:03 +0000 (09:29 +0200)]
cpu_map: Add missing feature "no-nested-data-bp"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "lfence-always-serializing"
Tim Wiederhake [Wed, 24 May 2023 07:28:32 +0000 (09:28 +0200)]
cpu_map: Add missing feature "lfence-always-serializing"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "flush-l1d"
Tim Wiederhake [Wed, 24 May 2023 07:25:05 +0000 (09:25 +0200)]
cpu_map: Add missing feature "flush-l1d"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "fb-clear"
Tim Wiederhake [Wed, 24 May 2023 07:23:48 +0000 (09:23 +0200)]
cpu_map: Add missing feature "fb-clear"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "cmpccxadd"
Tim Wiederhake [Wed, 24 May 2023 07:22:31 +0000 (09:22 +0200)]
cpu_map: Add missing feature "cmpccxadd"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "avx-vnni-int8"
Tim Wiederhake [Wed, 24 May 2023 07:21:30 +0000 (09:21 +0200)]
cpu_map: Add missing feature "avx-vnni-int8"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "avx-ne-convert"
Tim Wiederhake [Wed, 24 May 2023 07:20:53 +0000 (09:20 +0200)]
cpu_map: Add missing feature "avx-ne-convert"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "avx-ifma"
Tim Wiederhake [Wed, 24 May 2023 07:18:04 +0000 (09:18 +0200)]
cpu_map: Add missing feature "avx-ifma"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "auto-ibrs"
Tim Wiederhake [Wed, 24 May 2023 07:16:04 +0000 (09:16 +0200)]
cpu_map: Add missing feature "auto-ibrs"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "amx-fp16"
Tim Wiederhake [Wed, 24 May 2023 07:12:45 +0000 (09:12 +0200)]
cpu_map: Add missing feature "amx-fp16"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agocpu_map: Add missing feature "amd-psfd"
Tim Wiederhake [Wed, 24 May 2023 07:10:41 +0000 (09:10 +0200)]
cpu_map: Add missing feature "amd-psfd"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
23 months agodocs: Clarify values reported by virDomainMemoryStats()
Michal Privoznik [Wed, 24 May 2023 08:53:03 +0000 (10:53 +0200)]
docs: Clarify values reported by virDomainMemoryStats()

I was approached by a KubeVirt developer to clarify what value
does VIR_DOMAIN_MEMORY_STAT_DISK_CACHES report, whether it's from
the guest or the host POV. And since I didn't know the answer
even after reading the docs I think we can do better. Clarify the
POV then.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
23 months agodocs: newapi.xsl: Generate overall docs for enums too
Michal Privoznik [Tue, 23 May 2023 16:46:58 +0000 (18:46 +0200)]
docs: newapi.xsl: Generate overall docs for enums too

There are/can be overall docs for enums (e.g.
virDomainModificationImpact) not just individual values. But
these never make it into the generated HTML which is a bit
unfortunate as they can contain valuable information for users.

Generate a block with overall enum documentation, just like we do
for functions.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
23 months agodocs: newapi.xsl: Generate docs on generic typedefs
Michal Privoznik [Wed, 24 May 2023 08:22:47 +0000 (10:22 +0200)]
docs: newapi.xsl: Generate docs on generic typedefs

We have plenty of generic typedefs (that basically just alias a
struct, or our popular virXXXPtr). Because we do not generate
HTML docs for it, the documentation is placed at random places,
e.g.: comment from virDomainPtr typedef ("a virDomainPtr is
pointer to a virDomain private structure ...") ends up after
virDomainProcessSignal enum block.

There are some less weird occurrences of this problem (e.g.
virBlkioParameterPtr), but yet - the typedef appears in TOC.

Therefore, generate a block for each typedef and put its
description there.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
23 months agocpu_map: Add SapphireRapids CPU model
Lin Yang [Thu, 18 May 2023 00:30:57 +0000 (17:30 -0700)]
cpu_map: Add SapphireRapids CPU model

Introduced in QEMU by commit v8.0.0-7eb061b06e.

Signed-off-by: Lin Yang <lin.a.yang@intel.com>
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
23 months agonodedev: update transient mdevs
Boris Fiuczynski [Mon, 8 May 2023 17:10:46 +0000 (19:10 +0200)]
nodedev: update transient mdevs

Instead of updating defined mdevs only add another update for active
devices as well to cover transient mdev devices as well.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2143158
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
23 months agoqemu_hotplug: Temporarily allow emulator thread to access other NUMA nodes during...
Michal Privoznik [Mon, 22 May 2023 13:55:10 +0000 (15:55 +0200)]
qemu_hotplug: Temporarily allow emulator thread to access other NUMA nodes during mem hotplug

Again, this fixes the same problem as one of previous commits,
but this time for memory hotplug. Long story short, if there's a
domain running and the emulator thread is restricted to a subset
of host NUMA nodes, but the memory that's about to be hotplugged
requires memory from a host NUMA node that's not in the set we
need to allow emulator thread to access the node, temporarily.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>