1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-14 12:58:33 +03:00

Compare commits

...

180 Commits

Author SHA1 Message Date
Stefan Berger
b9f54f8792 docs: Clarify what source and name attributes of TPM profile describe
Clarify what source and name attributes of TPM profile describe and
update the version placeholder to the libvirt version when profiles
were first supported, v10.10. Also mention that profiles with prefix
'custom:' in their name can be modified.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2025-03-14 09:16:01 +01:00
Michal Privoznik
eb6c28408d ch: Rework virCHProcessConnectMonitor()
Firstly, let's switch from explicit virCHDriverGetConfig() +
virObjectUnref() combo to g_autoptr(virCHDriverConfig). This
leaves us with the @monitor variable which is initialized to NULL
only to be then set to the retval of virCHMonitorNew() and
returned instantly. Well, the variable is now useless and can be
dropped.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-13 15:51:15 +01:00
Michal Privoznik
5ed2ed8708 ch: Unref @cfg in virCHProcessStop()
At the beginning of virCHProcessStop() the ref to driver config
is obtained (via virCHDriverGetConfig()), but corresponding unref
call is lacking. Use g_autoptr() to make sure the config is
unrefed always.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-13 15:51:15 +01:00
Michal Privoznik
b9a10cf4bb ch: Free @iothreads array in virCHProcessSetupIOThreads()
When the CH driver starts a domain virCHProcessSetupIOThreads()
is called eventually which in turn calls
virCHMonitorGetIOThreads(). The latter returns an array of
iothreads which is never freed leading to a memleak:

130 (104 direct, 26 indirect) bytes in 1 blocks are definitely lost in loss record 1,804 of 1,998
   at 0x484CEF3: calloc (vg_replace_malloc.c:1675)
   by 0x4F0E7A9: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.8000.5)
   by 0xB3A9359: virCHMonitorGetIOThreads (ch_monitor.c:1183)
   by 0xB3AA5BB: virCHProcessSetupIOThreads (ch_process.c:348)
   by 0xB3AAC59: virCHProcessSetup (ch_process.c:480)
   by 0xB3AC75A: virCHProcessStart (ch_process.c:973)
   by 0xB39B7D4: chDomainCreateXML (ch_driver.c:246)
   by 0x4CC9D32: virDomainCreateXML (libvirt-domain.c:188)
   by 0x168F91: remoteDispatchDomainCreateXML (remote_daemon_dispatch_stubs.h:5186)
   by 0x168F18: remoteDispatchDomainCreateXMLHelper (remote_daemon_dispatch_stubs.h:5167)
   by 0x4B20066: virNetServerProgramDispatchCall (virnetserverprogram.c:423)
   by 0x4B1FB99: virNetServerProgramDispatch (virnetserverprogram.c:299)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-13 15:51:15 +01:00
Michal Privoznik
1b25f1e53b ch: Don't leak virCHDomainObjPrivate struct members
There are some members of the virCHDomainObjPrivate struct that
are allocated at various stages of domain lifecycle but then are
never freed:

1) cgroup - allocated in virDomainCgroupSetupCgroup()
2) autoCpuset - this one is actually never allocated (and thus is
                always NULL, but soon it may be used. Just free
                it for now, which is a NOP anyways.
3) autoNodeset - same story as 2).

There are two more members, which shouldn't be freed:

1) driver - this is just a raw pointer to the CH driver (see
   virCHDomainObjPrivateAlloc()).

2) monitor - this member is cleared in virCHProcessStop(), way
             before control even gets to
             virCHDomainObjPrivateFree().

452 (400 direct, 52 indirect) bytes in 1 blocks are definitely lost in loss record 1,944 of 1,998
   at 0x484CEF3: calloc (vg_replace_malloc.c:1675)
   by 0x4F0E7A9: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.8000.5)
   by 0x49479CE: virCgroupNewFromParent (vircgroup.c:893)
   by 0x49481BA: virCgroupNewDomainPartition (vircgroup.c:1068)
   by 0x494915E: virCgroupNewMachineManual (vircgroup.c:1378)
   by 0x49492FE: virCgroupNewMachine (vircgroup.c:1432)
   by 0x4B5E3DE: virDomainCgroupInitCgroup (domain_cgroup.c:377)
   by 0x4B5E9CD: virDomainCgroupSetupCgroup (domain_cgroup.c:524)
   by 0xB3AC693: virCHProcessStart (ch_process.c:951)
   by 0xB39B7D4: chDomainCreateXML (ch_driver.c:246)
   by 0x4CC9D32: virDomainCreateXML (libvirt-domain.c:188)
   by 0x168F91: remoteDispatchDomainCreateXML (remote_daemon_dispatch_stubs.h:5186)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-13 15:51:15 +01:00
Michal Privoznik
9da8db464a ch: Free retval of curl_slist_append()
There are two places where curl_slist_append() is called but
corresponding call to curl_slist_free_all() is missing:
virCHMonitorPutNoContent() and virCHMonitorGet() which leads to
memleaks:

41 (16 direct, 25 indirect) bytes in 1 blocks are definitely lost in loss record 992 of 1,998
   at 0x4845888: malloc (vg_replace_malloc.c:446)
   by 0x5B2F8FE: curl_slist_append (in /usr/lib64/libcurl.so.4.8.0)
   by 0xB3A7B41: virCHMonitorPutNoContent (ch_monitor.c:824)
   by 0xB3A89FF: virCHMonitorBootVM (ch_monitor.c:1030)
   by 0xB3AC6F1: virCHProcessStart (ch_process.c:967)
   by 0xB39B7D4: chDomainCreateXML (ch_driver.c:246)
   by 0x4CC9D32: virDomainCreateXML (libvirt-domain.c:188)
   by 0x168F91: remoteDispatchDomainCreateXML (remote_daemon_dispatch_stubs.h:5186)
   by 0x168F18: remoteDispatchDomainCreateXMLHelper (remote_daemon_dispatch_stubs.h:5167)
   by 0x4B20066: virNetServerProgramDispatchCall (virnetserverprogram.c:423)
   by 0x4B1FB99: virNetServerProgramDispatch (virnetserverprogram.c:299)
   by 0x4B28B5E: virNetServerProcessMsg (virnetserver.c:135)

88 (16 direct, 72 indirect) bytes in 1 blocks are definitely lost in loss record 1,501 of 1,998
   at 0x4845888: malloc (vg_replace_malloc.c:446)
   by 0x5B2F8FE: curl_slist_append (in /usr/lib64/libcurl.so.4.8.0)
   by 0xB3A7E41: virCHMonitorGet (ch_monitor.c:864)
   by 0xB3A92E2: virCHMonitorGetInfo (ch_monitor.c:1157)
   by 0xB3A9CEA: virCHProcessUpdateInfo (ch_process.c:142)
   by 0xB3AAD36: virCHProcessSetup (ch_process.c:492)
   by 0xB3AC75A: virCHProcessStart (ch_process.c:973)
   by 0xB39B7D4: chDomainCreateXML (ch_driver.c:246)
   by 0x4CC9D32: virDomainCreateXML (libvirt-domain.c:188)
   by 0x168F91: remoteDispatchDomainCreateXML (remote_daemon_dispatch_stubs.h:5186)
   by 0x168F18: remoteDispatchDomainCreateXMLHelper (remote_daemon_dispatch_stubs.h:5167)
   by 0x4B20066: virNetServerProgramDispatchCall (virnetserverprogram.c:423)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-13 15:51:15 +01:00
Michal Privoznik
8701ba4feb network: Free inhibitor in networkStateCleanup()
The shutdown inhibitor is created in networkStateInitialize() but
corresponding call to virInhibitorFree() is missing in
networkStateCleanup() leading to a memleak:

116 (72 direct, 44 indirect) bytes in 1 blocks are definitely lost in loss record 1,769 of 1,998
   at 0x484CEF3: calloc (vg_replace_malloc.c:1675)
   by 0x4F0E7A9: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.8000.5)
   by 0x4993B9B: virInhibitorNew (virinhibitor.c:152)
   by 0x5279394: networkStateInitialize (bridge_driver.c:654)
   by 0x4CC74DC: virStateInitialize (libvirt.c:665)
   by 0x15B719: daemonRunStateInit (remote_daemon.c:613)
   by 0x49F2B44: virThreadHelper (virthread.c:256)
   by 0x5356662: start_thread (in /usr/lib64/libc.so.6)
   by 0x53D7DA3: clone (in /usr/lib64/libc.so.6)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-13 15:51:15 +01:00
Peter Krempa
4f1e9d02ea qemu: capabilites: Retire QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING
The capability is no logner used as all qemus support it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
e5d7a871c5 qemu: migration: Always assume support for QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING
The 'transform' attribute of 'bitmaps' was added in qemu-6.0, thus
we can assume all qemus we're willing to use support it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
eb27abb415 qemu: domain: Remove qemuDomainSupportsCheckpointsBlockjobs
The function now serves no real purpose.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
e1bce4ecd2 qemu: capabilites: Retire QEMU_CAPS_INCREMENTAL_BACKUP
All supported qemu versions now support this. Retire the capability.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
0b939c467a qemu: Always assume support for QEMU_CAPS_INCREMENTAL_BACKUP
The support for incremental backup (not the backup api itself) was gated
on support for migrating bitmaps. As the ability to migrate bitmaps was
added in qemu-6.0 we can now assume that all supported qemu versions
support incremental backup.

Remove the interlocking.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
e6815547c8 qemu: capabilities: Retire QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY
All supported qemus have this and we already deleted alternate code.
Retire the feature flag.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
2f4e76a770 qemu: Always assume support for QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY
qemu supports the @allow-write-only-overlay feature since qemu-5.0.
Remove the alternate code paths.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
514c1f8dda qemu: capabilities: Retire QEMU_CAPS_BLOCKDEV_REOPEN
'blockdev-reopen' is supported since qemu-6.1. Since we now don't have
any code using this capability we can retire it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
4983cb62e6 qemu: Always assume support for QEMU_CAPS_BLOCKDEV_REOPEN
'blockdev-reopen' is supported since qemu-6.1, thus we can now remove
the interlocks.

Document the change to 'mirror' as this patch removes the last clue why
we overwrite the mirror's readonly state to false unconditionally.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
5ec6318c05 qemu: capabilities: Retire QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT
The capability is no longer used as all qemus already support the
feature.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
a8ac578419 qemu: monitor: Always assume support for QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT
The flat mode of 'query-named-block-nodes' is supported since qemu-5.0.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
52ec7929b0 qemu: capabilities: Retire QEMU_CAPS_OBJECT_JSON
Now that we dropped support for old qemus which didn't support JSON
props for -object we can retire the capability.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
f46e2bf3b0 util: Drop 'virQEMUBuildCommandLineJSONArrayBitmap'
It was used to convert JSON arrays in legacy -object commandline
conversion. Since we now exclusively use JSON with -object, this
infrastructure is no longer needed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
af227c6ab0 qemu: monitor: Drop support for extra wrapper for 'object_add'
The QAPIfication of objects removed the extra wrapper object which we
were adding in the monitor code to simplify the other callers.

Now that we support only qemus which don't require this we can drop the
support code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
51f7b35612 qemuBuildObjectCommandlineFromJSON: Assume all qemus support QEMU_CAPS_OBJECT_JSON
'-object' was qapified (meaning it supports JSON props) in qemu-6.0,
thus now that we require qemu-6.2 we can drop the compatibility code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
554a5e508a qemu: capabilities: Retire QEMU_CAPS_COMPAT_DEPRECATED
The capability always exists in qemu and is no longer checked.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
57cbe6a569 qemuBuildCompatDeprecatedCommandLine: Assume that QEMU_CAPS_COMPAT_DEPRECATED is supported
Bumping minimum version of qemu to 6.2 means that the '-compat' option
is now always supported.

As we were unable to detect it in any other way we based this capability
on QEMU_CAPS_OBJECT_JSON.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:38:16 +01:00
Peter Krempa
67d2787807 domainbackupxml2xml: Add test case with unix socket server for pull mode backup
While we show the example in the docs we don't have an example XML for
exercising the parser/formatter and schema.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-13 15:36:46 +01:00
Peter Krempa
5d95391203 docs: formatdomain: Clarify configuration of iothread <-> virtqueue mapping
Add an example for the automatic/round-robin mapping of iothreads which
users should preferrably use. Until now the example contained even the
full mapping which could push users to use that instead.

Mention that the queues are then automatically distributed among the
iothreads.

Also clarify the need to set 'queues' when mapping threads explicitly
and how the queues are identified.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-12 12:56:58 +01:00
Peter Krempa
0ee6848ca5 virDomainIothreadMappingDefParse: Fix usage of virXMLNodeGetSubelementList
virXMLNodeGetSubelementList always returns a non-NULL pointers thus we
should check the length instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-12 12:56:58 +01:00
Peter Krempa
fcd47086f4 virXMLNodeGetSubelementList: Document return value semantics
The returned value is always non-NULL. Callers need to check the length
of the returned array instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-12 12:56:58 +01:00
Peter Krempa
482a2d119b qemu: Use modern header formatting in 'qemu_command.h'
The file used intermixed style. Convert the last outliers to the new
formatting style.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-12 12:56:58 +01:00
Peter Krempa
080c7fd341 qemu: process: Remove un-updated 'qemuProcessStartWarnShmem'
The checks in qemuProcessStartWarnShmem are no longer current. Since
previous patch made it fatal for vhost-user interfaces to be configured
without shared memory this warning code can be deleted.

Resolves: https://issues.redhat.com/browse/RHEL-80533
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-12 12:56:58 +01:00
Peter Krempa
0d20632179 qemuValidateDomainDeviceDefNetwork: Require shared memory for all vhost-user interfaces
Currently we produce only a warning into the log if a non-passt
vhost-user interface is configured with shared memory.

Since we do make it fatal with all other vhost-user types, fix the check
to trigger also for normal-vhost-user interfaces.

Since passt-based vhost-user interfaces are checked separately the check
will no longer be required.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-12 12:56:58 +01:00
Peter Krempa
779a975355 qemuxmlconftest: Include shared memory 'net-vhostuser' test cases
The vhost-user protocol requires shared memory support to work properly.

Our test XMLs didn't have it configured as for interface the check if
shared memory is present only produces a warning instead of a proper
error.

Upcoming patches will be moving the check to become fatal so the test
cases need to be fixed first.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-12 12:56:58 +01:00
Peter Krempa
2daf61ffec qemuNodeGetSEVInfo: Use virTypedParamList to construct return value
Simplify the code by using the modern helpers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-12 12:56:58 +01:00
Peter Krempa
710e90fc69 qemuDomainGetLaunchSecurityInfo: Use virTypedParamList to construct return value
Simplify the code by using the modern helpers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-12 12:56:58 +01:00
Peter Krempa
20e0bc3fbd qemuDomainGetLaunchSecurityInfo: Don't forget unlock VM object on (impossible) error
If 'vm->def->sec->sectype' would be invalid; which is currently not
possible; we'd not unlock the domain object. Fix the logic even when the
bug currently can't happen.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-12 12:56:58 +01:00
Daniel P. Berrangé
defca11627 src: expand docs for guest stats constant version handling
Explain that the 11.2.0 release dates are mostly reflecting when the
constant was first added, not when the key was introduced.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:01:17 +00:00
Daniel P. Berrangé
c27bced958 src: expand docs for guest stats array handling
Give an overview of how arrays are handled and represented in
the typed parameters returned by the guest stats API.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:01:16 +00:00
Daniel P. Berrangé
728b22be92 src: document that no constants are provided for custom VM stats
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:01:16 +00:00
Daniel P. Berrangé
5d9f73628b src: add constants for domain stats 'dirtyrate.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:01:06 +00:00
Daniel P. Berrangé
b1c0ec1767 src: add constants for domain stats 'memory.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:00:54 +00:00
Daniel P. Berrangé
ca0aa86fbb src: add constants for domain stats 'iothread.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:00:45 +00:00
Daniel P. Berrangé
69e8341f10 src: add constants for domain stats 'perf.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:00:35 +00:00
Daniel P. Berrangé
4661ceb067 src: add constants for domain stats 'block.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:00:24 +00:00
Daniel P. Berrangé
88bae83ea9 src: add constants for domain stats 'net.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:00:11 +00:00
Daniel P. Berrangé
b040ee0c98 src: add constants for domain stats 'vcpu.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 10:00:02 +00:00
Daniel P. Berrangé
6a16c3ca8c src: add constants for domain stats 'balloon.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:59:48 +00:00
Daniel P. Berrangé
947306957e src: add constants for domain stats 'cpu.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:59:37 +00:00
Daniel P. Berrangé
df0513fa36 src: add constants for domain stats 'state.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the domain stats data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the domain stats
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:59:25 +00:00
Daniel P. Berrangé
8927d4eedc src: expand docs for guest info constant version handling
Explain that the 11.2.0 release dates are mostly reflecting when the
constant was first added, not when the key was introduced.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:59:13 +00:00
Daniel P. Berrangé
5436eba3a8 src: expand docs for guest info array handling
Give an overview of how arrays are handled and represented in
the typed parameters returned by the guest info API.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:59:02 +00:00
Daniel P. Berrangé
325b5701ae src: add constants for guest info 'load.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:59:01 +00:00
Daniel P. Berrangé
9e725c1ccd src: add constants for guest info 'if.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:58:51 +00:00
Daniel P. Berrangé
d28a49cd6d src: add constants for guest info 'disk.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:58:41 +00:00
Daniel P. Berrangé
c9a8c55f96 src: add constants for guest info 'fs.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:58:30 +00:00
Daniel P. Berrangé
941d11fe71 src: add constant for the guest info 'hostname' parameter
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:58:16 +00:00
Daniel P. Berrangé
e7a122a192 src: add constants for guest info 'timezone.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:58:07 +00:00
Daniel P. Berrangé
7192539cec src: add constants for guest info 'os.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:57:56 +00:00
Daniel P. Berrangé
0a19b61a6c src: add constants for guest info 'user.' parameters
Contrary to most APIs returning typed parameters, there are no constants
defined for the guest info data keys. This is was because many of the
keys needs to be dynamically constructed using one or more array index
values.

It is possible to define constants while still supporting dynamic
array indexes by simply defining the prefixes and suffixes as constants.
The consuming code can then combine the constants with array index
value.

With this approach, it is practical to add constants for the guest info
API keys.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-12 09:57:28 +00:00
Pavel Hrdina
278b8334eb qemu: snapshot: error out early when reverting snapshot for VM with non-file disk
Before this patch the code would start the revert process by destroying
the VM and preparing to revert where it would fail with following error:

    error: unsupported configuration: source for disk 'sdb' is not a regular file; refusing to generate external snapshot name

and leaving user with offline VM even if it was running.

Make the check before we start the revert process to not destroy VMs.

Resolves: https://issues.redhat.com/browse/RHEL-30971
Resolves: https://issues.redhat.com/browse/RHEL-79928
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-11 17:51:11 +01:00
Michal Privoznik
fc47a37a7a security: Don't stop restoring labels too early
The point of virSecurityManagerRestoreAllLabel() function is to
restore ALL labels and be tolerant to possible errors, i.e.
continue restoring seclabels and NOT return early.

Well, in two implementations of this internal API this type of
problem was found:

1) virSecurityDACRestoreAllLabel() returned early if
   virSecurityDACRestoreGraphicsLabel() failed, or when
   def->sec->sectype equals to an impossible value.

2) virSecuritySELinuxRestoreAllLabel() returned early if
   virSecuritySELinuxRestoreMemoryLabel() failed.

Fix all three places.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-11 15:05:41 +01:00
Martin Kletzander
63c0f15f09 docs: Correct dbus graphics' accepted p2p values
The attribute is used (and formatted) as virTristateBool() and even in
schema defined as virYesNo, so the values are supposed to be `yes` and
`no`.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-11 14:54:36 +01:00
Shalini Chellathurai Saroja
b0527a8f8e tests: update capabilities for QEMU 9.2.0 on s390x
Update the replies and xml files for QEMU 9.2.0 on s390x based on
the released QEMU tag v9.2.0 with commit Id
ae35f033b874c627d81d51070187fbf55f0bf1a7.

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-11 14:03:46 +01:00
Jiri Denemark
477a81fedb esx: Refactor esxVI_LookupHostScsiTopologyLunListByTargetName
With a specific combination of compiler options gcc reported the
following bogus warning (I added a context to it to make the issue
visible):

../src/esx/esx_vi.c: In function ‘esxVI_LookupHostScsiTopologyLunListByTargetName’:
../src/esx/esx_vi.c:4674:32: error: potential null pointer dereference [-Werror=null-dereference]
 4671 |     if (!found || !hostScsiTopologyTarget)
 4672 |         goto cleanup;
 4673 |
 4674 |     if (!hostScsiTopologyTarget->lun) {
      |          ~~~~~~~~~~~~~~~~~~~~~~^~~~~

Most likely this is caused by found and hostScsiTopologyTarget doing
essentially the same thing as found is true if and only if
hostScsiTopologyTarget is non-NULL. The found variable is completely
redundant. Removing it would be enough, but I decided to make the code a
little bit easier to read by not using the iterator variable directly.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-11 12:20:21 +01:00
Praveen K Paladugu
cc33c02ad5 ch: Enable SEV SNP support
Enable SEV-SNP support for ch guests.

Co-Authored-by: Smit Gardhariya <sgardhariya@microsoft.com>
Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 14:40:04 +01:00
Praveen K Paladugu
695a4f38b5 util: Introduce virStringFormatHex
virStringFormatHex converts an input byte array into hex string and
returns it.

Signed-off-by: Praveen K Paladugu <praveenkpaladugu@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 14:39:59 +01:00
Michal Privoznik
9d1e4b25ba security: Set seclabels on UEFI shim
Again, trivial. Just copy what is done for kernel and initrd.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-10 13:54:59 +01:00
Michal Privoznik
39c1784ca0 qemu_command: Generate cmd line for UEFI shim
Trivial.

Resolves: https://issues.redhat.com/browse/RHEL-68043
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-10 13:54:42 +01:00
Michal Privoznik
b136e492c5 qemu_validate: Check whether UEFI shim is supported
If UEFI shim is specified in domain XML but QEMU is too old, then
report an error.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-10 13:53:06 +01:00
Michal Privoznik
30be3b0d9d qemu_capabilities: Introduce QEMU_CAPS_MACHINE_SHIM
In its commit v9.2.0-323-ga5bd044b15 QEMU introduced another
command line option: -shim. It's used to load kernel. Track
presence of it via QEMU_CAPS_MACHINE_SHIM.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-10 13:51:42 +01:00
Michal Privoznik
6b63334233 conf: Introduce os/shim element
For secure boot environments where <loader/> is signed, it may be
unfeasible to keep the binary up to date (esp. when revoking
certificates contained within). To address that, QEMU introduced
'-shim' cmd line option which side loads another UEFI binary
which can then contain new certification authorities or list of
revocations. Expose it as <shim/> element that's nested under
<os/>, just like kernel and initrd are.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-10 13:32:46 +01:00
Peter Krempa
17945b8ec9 qemucapabilitiestest: Add data for the qemu-10.0 dev cycle on x86_64 for the '+amdsev' variant
Add data based on 'v9.2.0-2369-g98c7362b1e'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:29 +01:00
Peter Krempa
c941fec220 qemucapabilitiestest: Update 'caps_10.0.0_x86_64' to 'v9.2.0-2369-g98c7362b1e'
Notable changes:
 - 'uefi-vars-x64', 'uefi-vars-sysbus' qom type added
 - 'YongFeng-v1-x86_64-cpu' added
 - 'accel' qom type removed
 - 'addr' field of devices changed type to 'str'
 - 'vfio-pci' gained experimental feature 'x-migration-multifd-transfer'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:29 +01:00
Peter Krempa
5cc3803d1d qemu: block: Drop 'sheepdog' protocol support
As now no supported qemu version supports the 'sheepdog' protocol drop
the code for configuring the blockdev layer.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:29 +01:00
Peter Krempa
8824af826d qemu: capabilities: Bump minimum qemu to qemu-6.2
Following minimum versions are needed based on our support policy:

             CentOS Stream 9: 9.1
                   Debian 12: 7.2
                   Fedora 40: 8.2
          openSUSE Leap 15.6: 8.2
                Ubuntu 22.04: 6.2
               FreeBSD ports: 9.2
              macOS homebrew: 9.2
              macOS macports: 9.2

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:29 +01:00
Peter Krempa
cbe39cfa8e qemucapabilitiesdata: Drop un-updated 'qemu_8.0.0_riscv64' data
The riscv64 qemu-8.0 data were not updated to the release version. Drop
them instead of trying to do archaeology.

They are not used in any 'qemuxmlconftest' case.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
Peter Krempa
81098ff4c6 qemucapabilitiesdata: Drop un-updated 'caps_7.0.0_aarch64' data
The aarch-64 qemu-7.0 data were not updated to the release version. Drop
them instead of trying to do archaeology.

They are not used in any 'qemuxmlconftest' case.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
Peter Krempa
623312ecfb qemucapabilitiesdata: Drop un-updated 'qemu_6.2.0_aarch64' data
We'll be bumping to qemu-6.2 as minimum and the aarch64 qemu-6.2 data
were not updated to the release version. Drop them instead of trying to
do archaeology.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
Peter Krempa
991ac7372f qemucapabilitiestest: Drop unused fake data 'caps_7.0.0_aarch64+hvf'
The 'caps_7.0.0_aarch64+hvf' caps dump is fake; obtained from copying
and doctoring the 'caps_7.0.0_aarch64' file (see commit 12aedb414578d3 )

Remove it now that it was superseded by a dump obtained from a proper
hvf-enabled host.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
Peter Krempa
c63055dc38 qemucapabilitiestest: Add 'qemu_9.2.0.aarch64+hvf' test data
The data is collected from an MacOS host with latest released qemu from
homebrew.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
Peter Krempa
ac3291f8db qemucapabilitiestest: Drop qemu-6.1 data
Soon we'll bump to qemu-6.2 as minimum.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
Peter Krempa
58193c5b25 qemucapabilitiestest: Drop qemu-6.0 data
Soon we'll bump to qemu-6.2 as minimum.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
Peter Krempa
4ddc5cdddc qemucapabilitiestest: Drop qemu-5.2 data
Soon we'll bump to qemu-6.2 as minimum.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:28 +01:00
Peter Krempa
ab10e9b003 qemuxmlconftest: Drop tests pinned to qemu-6.1
Upcoming patches will bump minimum qemu version to 6.2 so we need to
purge old tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:27 +01:00
Peter Krempa
9d3e9e0bc7 qemuxmlconftest: Drop tests pinned to qemu-6.0
Upcoming patches will bump minimum qemu version to 6.2 so we need to
purge old tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:27 +01:00
Peter Krempa
f642c029f5 qemuxmlconftest: Drop tests pinned to qemu-5.2
Upcoming patches will bump minimum qemu version to 6.2 so we need to
purge old tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:27 +01:00
Peter Krempa
f976d1b06c conf: Drop support for 'sheepdog' disks
In upcoming patches we'll update minimum supported qemu version to
qemu-6.2 which no longer supports 'sheepdog'. This was the only
hypervisor driver that supported it.

Reject any config containing sheepdog disks when validating the XML,
remove the positive test cases in qemu and replace them by a negative
test case. This will still excercise the XML schema, but will prepare
for removal of the internal code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-10 13:09:27 +01:00
Pavel Hrdina
23c3900054 ci: refresh with 'lcitool manifest'
- Remove EOL Debian 11

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-07 15:46:21 +01:00
Alexander Kuznetsov
d23a516eba util: netdevvlan: Change return type of virNetDevVlanCopy to void
This function return value is invariant since 1022e0ee, so change
its type and remove all dependent checks.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Alexander Rudyuk <a.rudyuk@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-07 14:48:01 +01:00
Pavel Hrdina
c4b7d29610 util: virxml: unexport virXMLFormatElementInternal
It is no longer used anywhere else.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:18:46 +01:00
Pavel Hrdina
e042ff6dd0 domain_conf: refactor virDomainLoaderDefFormatNvram
Use the new virXMLFormatDirect in order to remove usage of
virXMLFormatInternal.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:18:44 +01:00
Pavel Hrdina
aedfdaa3f6 conf: use virXMLFormatElementDirect
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:18:41 +01:00
Pavel Hrdina
4cc562651f util: virxml: introduce virXMLFormatElementDirect
This can be used to format XML where the element has direct value
instead of any subelement. For example:

    <maxMemory slots='16' unit='KiB'>1524288</maxMemory>

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:18:38 +01:00
Nicolás Gal
915b2bfcfe Translated using Weblate (Spanish)
Currently translated at 52.6% (5704 of 10838 strings)

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

Signed-off-by: Nicolás Gal <nialegal@yandex.com>
2025-03-07 13:53:57 +01:00
Pavel Hrdina
798d87539d domain_conf: graphics: properly escape user provided strings when formatting XML
This was reported on virt-manager issue tracker as it was possible to
provide `listen` attribute with properly escaped characters but libvirt
would format XML without escaping it.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
Pavel Hrdina
6786ae80a3 domain_conf: graphics: fix error messages when formatting XML
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
Pavel Hrdina
1ef5926a80 domain_conf: graphics: move remaining VNC formatting
Now we are able to move the rest into virDomainGraphicsDefFormatVNC
without breaking order of elements in the resulting XML.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
Pavel Hrdina
15599d3481 domain_conf: graphics: move remaining spice formatting
Now we are able to move the rest into virDomainGraphicsDefFormatSpice
without breaking order of elements in the resulting XML.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
Pavel Hrdina
08925c0bea domain_conf: graphics: move listens formatting to relevant graphics types
Only VNC, RDP and Spice graphics types are using listen elements so call
the function only where it is needed.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
Pavel Hrdina
5f97b846f0 domain_conf: graphics: extract listen formatting to separate function
This will be used in specific graphics types that are using listen
elements.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
Pavel Hrdina
4c2c7720fe domain_conf: graphics: extract DBus formatting to separate function
virDomainGraphicsDefFormat function was way too long so split it into
separate functions for each graphics type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
Pavel Hrdina
e95d362ba7 domain_conf: graphics: extract EGL-Headless formatting to separate function
virDomainGraphicsDefFormat function was way too long so split it into
separate functions for each graphics type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
Pavel Hrdina
287c1a761e domain_conf: graphics: extract Spice formatting to separate function
virDomainGraphicsDefFormat function was way too long so split it into
separate functions for each graphics type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
Pavel Hrdina
a93ea4cd84 domain_conf: graphics: extract Desktop formatting to separate function
virDomainGraphicsDefFormat function was way too long so split it into
separate functions for each graphics type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
Pavel Hrdina
c2dcb47413 domain_conf: graphics: extract RDP formatting to separate function
virDomainGraphicsDefFormat function was way too long so split it into
separate functions for each graphics type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
Pavel Hrdina
7a05d981eb domain_conf: graphics: extract SDL formatting to separate function
virDomainGraphicsDefFormat function was way too long so split it into
separate functions for each graphics type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:27 +01:00
Pavel Hrdina
9774254ce3 domain_conf: graphics: extract VNC formatting to separate function
virDomainGraphicsDefFormat function was way too long so split it into
separate functions for each graphics type.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:26 +01:00
Pavel Hrdina
227bf2c9de domain_conf: modernize graphics formatting
Use separate buffers for attributes and children elements to make the
code cleaner and to use the virXMLFormatElement() function.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:26 +01:00
Pavel Hrdina
8d055b7d61 domain_conf: graphics: use a function to format audio element
Removes code duplication.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:26 +01:00
Pavel Hrdina
320273df54 domain_conf: graphics: use a function to format gl element
Removes code duplication.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-07 14:01:26 +01:00
Daniel P. Berrangé
288f90feb3 qemu: support MSDM ACPI table type
The MSDM ACPI table is a replacement for the SLIC table type, now
sometimes used by Microsoft for Windows Licensing checks:

  https://learn.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653305(v=vs.85)

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/748
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-07 13:00:10 +00:00
Daniel P. Berrangé
32765cd14e conf: support MSDM ACPI table type
The MSDM ACPI table is an alternative for the SLIC table type,
sometimes used by Microsoft for Windows Licensing checks:

  https://learn.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653305(v=vs.85)

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-07 13:00:10 +00:00
Daniel P. Berrangé
dac6ecba6f libxl: support 'rawset' ACPI table type
This fixes representation of the 'acpi_firmware' config in the Xen
driver, which repesents a concatenation of tables of any type.

Use of 'type=slic' is accepted on input for backwards compatibility.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-07 13:00:10 +00:00
Daniel P. Berrangé
fe0cf62e0f qemu: support 'raw' ACPI table type
This allows passing a single ACPI table of any type through to QEMU with
the signture autodetected from the header.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-07 13:00:10 +00:00
Daniel P. Berrangé
513ef8f028 src: introduce 'raw' and 'rawset' ACPI table types
The QEMU driver has only accepted type=slic even though QEMU is able to
accept individual tables of any type, without needing to specify a
signature. Introduce type=raw to address this usage scenario. Contrary
to other types, this one may appear multiple times.

The Xen driver has mistakenly accepted type=slic and use it to set the
Xen acpi_firmware setting, which performs a simple passthrough of
multiple concatenated data table. Introduce type=rawset to address
this usage scenario.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-07 13:00:10 +00:00
Daniel P. Berrangé
3d94587655 src: validate permitted ACPI table types in libxl/qemu drivers
This forces us to update the drivers when defining new table types
to avoid incorrectly accepting them by default.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-07 13:00:10 +00:00
Daniel P. Berrangé
55f48d3852 conf: introduce support for multiple ACPI tables
Currently we parse

   <os>
     <acpi>
       <table type="slic">...path...</table>
     </acpi>
   </os>

into a flat 'char *slic_table' field which is rather an anti-pattern
as it has special cased a single attribute type.

This rewrites the internal design to permit multiple table types to
be parsed, should we add more in future. Each type is currently
permitted to only appear once.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-07 13:00:10 +00:00
Dion Bosschieter
92de6563c6 nwfilter: Fix deadlock between nwfilter-list and VM startup/migration
The `nwfilterBindingCreateXML` and `nwfilterConnectListAllNWFilters`
APIs can acquire locks on multiple instances of virNWFilterObj. There
is no guarantee they will acquire these locks in the same order as
each other. Thus there is a potential for deadlock if they run
concurrently acquiring locks on the same filter objects.

This flaw has always existed, but historically was rare, because
virNWFilterObjList previously used an array. This meant iteration
over filters had a fixed order, matching order of loading filters
into libvirt.  The set of filter references would have to be just
right to expose the lock ordering deadlock.

In 8.2.0, commit c4fb52dc72b312431a3a28e3a163b38441a95665 switched
to use a hash table, introducing non-determinism to the iteration
order, as hash buckets vary based on the hash seed. As such almost
any filter with references is exposed to the deadlock risk now.

It is not easy  to guarantee lock ordering on the virNWFilterObj
instances, so acquiring `driverMutex` first, will serve to serialize
all lock acquisition on virNWFilterObj instances, avoiding the
deadlock scenario.

The major cost is that concurrency of the driver is significantly
reduced, with few other APIs able to run in parallel with updating
firewall rules.

A long term solution to this problem needs significant changes

 * The mutex on virNWFilterObj would need to change to a R/W
   lock.
 * The filter instantiation/teardown process would need to split
   into two phases. The first phase would resolve all the required
   virNWFilterObj instances & acquire read locks, while holding
   the 'driverMutex'. The second phase of running iptables/ebtables
   commands would then run without driverMutex held.
 * The filter define/undefine APIs would need to acquire write
   locks, other APIs only read locks.

This would allow concurrency of filter instantiation/teardown
with everything except for filter defnie/undefine, which was
the original desire.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
[DPB: rewrite commit message & add inline comment]
Signed-off-by: Dion Bosschieter <dionbosschieter@gmail.com>
2025-03-07 12:38:57 +00:00
Alexander Kuznetsov
8acc0b76c6 qemu: snapshot: Remove dead code in qemuSnapshotDeleteBlockJobFinishing()
qemuSnapshotDeleteBlockJobFinishing() returns only 0 and 1. Convert it
to bool and remove the dead code handling -1 return in the caller.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Reported-by: Reported-by: Andrey Slepykh <a.slepykh@fobos-nt.ru>
Signed-off-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-06 15:04:06 +01:00
Yalan Zhang
628989369b docs: Fix formatting in formatdomain.rst
The combination of italics and the since tag does not work together.

Remove it from the paragraph about using passt with vhostuser,
as well as the parentheses around it.

Signed-off-by: Yalan Zhang <yalzhang@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2025-03-06 14:36:48 +01:00
Peter Krempa
07d8755523 domain_caps: Don't leak 'cpu0_id' in 'virSEVCapabilitiesFree'
Freeing the 'virSEVCapability' object leaked the 'cpu0_id' field since
its introduction.

Fixes: 0236e6154c46603bc443eda2f05c8ce511c55b08
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2025-03-06 14:06:46 +01:00
Peter Krempa
bddb2363e8 qemuxmlconftest: Add '+amdsev' versions of the rest of 'launch-security-sev*' cases
While the 'launch-security-sev-direct' and 'launch-security-sev-snp'
cases use "latest" caps, they use the non-sev variant and add-in the
relevant capabilities.

To do the test properly we can add '+amdsev' variant which uses caps
fetched from a real host that does support all the capabilities.

The output files are identical, although they are not added as symlinks
to prevent headaches if they do diverge at some point.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:26 +01:00
Peter Krempa
8a852c3a90 qemuxmlconftest: Add 'latest' version of 'launch-security-sev*' originally using 6.0.0
The 'launch-security-sev' and
'launch-security-sev-missing-platform-info' tests run agains the
qemu-6.0.0 caps which were manually doctored to support SEV.

Since we now have the '+amdsev' variant dumped from a more modern qemu
add another invocation of the tests.

The only relevant difference in the output data is 'cbitpos' being '51'
on the new platform, for the test case which explicitly doesn't
configure it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:26 +01:00
Peter Krempa
59e528ea0d qemuxmlconftest: Propery discriminate output files for caps variants
While the 'qemuxmlconftest' was able to load capability variants the
output file name didn't include the variant thus it was not possible to
test the same input file both on the default variant and on an explicit
variant.

Include the variant in the output file name and adjust two output file
names.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:26 +01:00
Peter Krempa
4492348b96 qemucapabilitiestest: Add test data for 'qemu-9.2' on a SEV-enabled AMD host
Introduce the test data as 'qemu_9.2.0.x86_64+amdsev' to test
SEV-related capability code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:25 +01:00
Peter Krempa
0e58c04fc9 qemucapabilitiesdata: Document '+amdsev' variant
Upcoming patch will introduce test data from an SEV-enabled host.
Document the new variant.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:25 +01:00
Peter Krempa
b7657a6d2e domaincapstest: Allow tests of all capability variants
Currently only the default variant ("") and "+hvf" are present in our
test data but upcoming patches will add another variant.

Upcoming test variants may not require any special handling so we should
be able to handle them using the default code path now that 'variant' is
properly propagated inside the test code.

Remove the restriction to test only the default ("") and "+hvf" variant
and modify the documentation to state that any other variant is tested
the same way as the default one.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:25 +01:00
Peter Krempa
af68ab6b26 domaincapstest: Use proper input file based on 'variant' in 'fillQemuCaps'
The qemu part of 'domaincapstest' supports testing of the '+hvf' variant
of files, but doesn't properly pick the input file. The input file lacks
the variant part thus the wrong file is used.

Propagate the variant and select the correct input file.

Fixes: 738c5bae888cfa72ed359899cf1a41fed9dbb0f5
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:25 +01:00
Peter Krempa
107cf9992f qemu: capabilities: Parse 'cpu0Id' from capability cache XML
The 'cpu0Id' field is formatted into the caps cache XML but not parsed
back; thus restart of the daemon will make it vanish.

Fixes: 0236e6154c46603bc443eda2f05c8ce511c55b08
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2025-03-06 13:04:25 +01:00
Laine Stump
25270737d3 conf: change virDomainDefAddImplicitControllers() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:45 -05:00
Laine Stump
fd6cfeeeea conf: change virDomainDefMaybeAddSmartcardController() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:45 -05:00
Laine Stump
be9a0f4764 conf: change virDomainDefMaybeAddVirtioSerialController() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:45 -05:00
Laine Stump
74e36dfce0 conf: change virDomainDefAddDiskControllersForType() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:45 -05:00
Laine Stump
7cfcfcc403 conf: change virDomainDefMaybeAddHostdevSCSIcontroller() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
Laine Stump
250d6ac2a0 conf: change virDomainDefMaybeAddController() to return true/false
This function can't fail, but it has always returned 1 if a controller
is added and 0 if not, and there is one place that checks for a 1
return, so we remove the -1 return and change it to return true/false
instead of 1/0.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
Laine Stump
cc82b06036 hyperv: change hypervDomainDefAppendController() to return void
It can't fail. And as a result, hypervDomainDefAppendSCSIController() and
hypervDomainDefAppendIDEController() can also be changed to return void.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
Laine Stump
e207c9c17e conf: change virDomainDefAddUSBController() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
Laine Stump
b0ef70aca9 conf: stop checking for NULL return from virDomainDefAddController()
It can't fail, so the caller doesn't need to check the return.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
Laine Stump
b62ce44a61 conf: stop checking for NULL return from virDomainControllerDefNew()
It can't fail, so the caller doesn't need to check the return.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
Laine Stump
3d263290df conf: change qemuDomainDefAddImplicitInputDevice() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
Laine Stump
b7da649e6e libxl: change xenDomainDefAddImplicitInputDevice() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
Laine Stump
8733ce0151 conf: change virDomainDefMaybeAddInput() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
Laine Stump
2f8fde6680 conf: change virDomainShmemDefInsert() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
Laine Stump
1456fe2c54 conf: change virDomainFSInsert() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
Laine Stump
5c5135849b conf: change virDomainNetInsert() to return void
It can't fail.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 16:56:44 -05:00
Pavel Hrdina
9bd83854f7 ci: refresh with 'lcitool manifest'
Replace Alpine Linux v3.19 with v3.21.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 11:23:30 +01:00
Pavel Hrdina
49b2a75e04 ci: use Fedora 41 to run integration tests
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 11:23:29 +01:00
Pavel Hrdina
7762cbc308 ci: use iptables to run libvirt-tck
On current Fedora libvirt uses nftables by default but the libvirt-tck
tests are not ready for it and most of the nwfilter tests fail. We need
to keep using iptables for now.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2025-03-05 11:23:12 +01:00
Cleber Rosa
b98a474a44 docs/api.rst: revert erroneously change of Once -> OnDevice
Commit af1b89d1d for some reason changed a perfectly fine statement to
one that I could not understand.  Let's revert it.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-04 09:31:36 +01:00
Michal Privoznik
e5299ddf86 meson: Generate runstatedir according to newer standard
While previously FHS 2.3 defined /var/run as a place to store
runtime information [1] it's no longer 2004 and newer
specification was released which favors /run [2]. Since it was
released 10 years ago, maybe it's time we start honouring it.

On majority of Linux systems (if not all), /var/run is a symlink
to /run anyways.

Users can still pass old location via -Drunstatedir.

1: https://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA
2: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s15.html

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-04 08:36:21 +01:00
Roman Bogorodskiy
100dd5f3a7 virDomainHostdevDefNew: update users not to check return value
virDomainHostdevDefNew() has been using g_new0() for a while now. As it
calls abort() on OOM, it's not necessary to check whether
the return value is NULL.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2025-03-03 19:22:37 +01:00
Jim Fehlig
5e3e924248 qemu: Add support for 'image_format' typed parameter
Add support for the 'image_format' typed parameter in virDomainSaveParams.
The parameter overrides the 'save_image_format' setting in qemu.conf.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-03 10:05:30 -07:00
Jim Fehlig
fdb7b1e19a include: Define constant for save image format
Add a new VIR_DOMAIN_SAVE_PARAM_IMAGE_FORMAT typed parameter for
specifying the save image format. A format specified via the
virDomainSaveParams API overrides the save_image_format setting
in qemu.conf. The 'raw' format remains the default.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-03 10:05:24 -07:00
Jim Fehlig
ec50e0cf63 qemu: Check for valid save image formats when loading driver config
Checking for valid 'foo_image_format' settings in qemu.conf is not done
until the settings are used. Move the checks to
virQEMUDriverConfigLoadSaveEntry, allowing to report incorrect format
settings at driver startup.

This change was made easier by also changing the corresponding fields
in the virQEMUDriverConfig to 'int', which is more in line with the
other fields that represent enumerated types.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-03 10:05:18 -07:00
Jim Fehlig
1564607cd0 qemu: Change return value of SaveImageGetCompressionProgram
qemuSaveImageGetCompressionProgram is a bit overloaded. Along with
getting a compression program, it checks the validity of the image
format and returns the integer representation of the format. Change
the function to only handle retrieving the specified compression
program, returning success or failure. Checking the validity of
the image format can be left to the calling functions.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-03 10:05:11 -07:00
Jim Fehlig
757fa62cfd qemu: Don't ignore dump image format errors
Long ago, without justification, commit 48cb9f0542 changed
qemuGetCompressionProgram (since renamed to
qemuSaveImageGetCompressionProgram) to ignore configuration errors
for dump operations. Like the other save-related operations, user
provided configuration should be verified and an error reported if
it cannot be honored.

Remove the special handling of configuration errors in
qemuSaveImageGetCompressionProgram and change the dump logic to
fail when dump image format cannot be supported.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-03 10:05:06 -07:00
Jim Fehlig
1a5692a6e1 qemu: Move declaration of virQEMUSaveFormat to header file
Allow use of the enum outside of qemu_saveimage.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-03 10:04:56 -07:00
Peter Krempa
1bbb1a02d9 schemas: domaincaps: Add missing schema for '<cpu0Id>'
Fixes: 0236e6154c46603bc443eda2f05c8ce511c55b08
Resolves: https://issues.redhat.com/browse/RHEL-81890
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-03 17:00:32 +01:00
Peter Krempa
e088895a62 qemuPrepareNVRAMFile: Fix NVRAM image conversion check
In case when user provides custom paths (those not covered by the JSON
firmware descriptor files or  the default locations) for the
loader and nvram template no auto-detection will be performed and user's
config will be taken at face value. Historically when 'templateFormat'
didn't exist we assumed that the 'format' field covers both.

Thus if 'templateFormat' is VIR_STORAGE_FILE_NONE we need to skip the
check forbidding image format conversion for 'file' backed to avoid
breaking legacy configs with manual/non-detected format assuming that
user picked the correct format.

Add a comment to the declaration of 'nvramTemplateFormat' noting the
above for future reference.

Resolves: https://issues.redhat.com/browse/RHEL-81731
Fixes: 2aa644a2fc8
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-03 16:59:35 +01:00
Ján Tomko
a479c3465e conf: metadata: remove metadata node if all metadata is removed
When removing the last child element from a network or domain
metadata, free the metadata node itself as well, to prevent
displaying an empty metadata element.

https://issues.redhat.com/browse/RHEL-27172

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-03 16:17:34 +01:00
Ján Tomko
0b69d47774 conf: metadata: ignore empty metadata element
Do not copy the <metadata> node to domain/network definition
if its empty.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-03 16:17:34 +01:00
Ján Tomko
633c55dbd6 conf: obj: remove extra empty line
Originally present in virDomainDefSetMetadata it got copied to
virNetworkDefSetMetadata too.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-03 16:17:34 +01:00
Ján Tomko
66d6fd7ffa conf: networkobj: fix indentation
'Network' has one more letter than 'Domain' where these helpers
were copied from. Shift the unaligned lines by one.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-03 16:17:34 +01:00
Jiri Denemark
282f38ad3d cpu_map: arm: Add AmpereOne CPU models
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-03 16:10:38 +01:00
Jiri Denemark
7d78044165 cpu_arm: Report vendor ID for unknown PVRs
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-03-03 16:10:37 +01:00
Peter Krempa
40b83176af qemuDomainGetGuestInfo: Remove temporary infrastructure
Now that the refactor was completed the helper infrastructure can be
removed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:20 +01:00
Peter Krempa
9f4c6ebc39 qemuDomainGetGuestInfo: Convert hostname code to virTypedParamList
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:20 +01:00
Peter Krempa
dd59d0f77d qemuAgentGetUsers: Convert to virTypedParamList
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:20 +01:00
Peter Krempa
0f5bb2c20d qemuAgentGetOSInfo: Convert to virTypedParamList
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:20 +01:00
Peter Krempa
52fd07c9f0 qemuAgentGetTimezone: Convert to virTypedParamList
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:20 +01:00
Peter Krempa
3d0203709f qemuAgentFSInfoFormatParams: Convert interface code to virTypedParamList
Also remove stale TODO comment as we already report disk target.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:20 +01:00
Peter Krempa
1dc68d6c6e qemuAgentDiskInfoFormatParams: Convert interface code to virTypedParamList
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:19 +01:00
Peter Krempa
3c75bae720 virDomainInterfaceFormatParams: Convert interface code to virTypedParamList
Also deletes pre-existing broken formatting.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:19 +01:00
Peter Krempa
2391a96141 qemuDomainGetGuestInfo: Convert load code to virTypedParamList
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:19 +01:00
Peter Krempa
d6b34d0de8 qemuDomainGetGuestInfo: Prepare for refactor to virTypedParamList
Use of raw typed param APIs is very clunky. Prepare
qemuDomainGetGuestInfo for step-by-step refactor to virTypedParamList.

The two lists will coexist until the refactor is complete.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:19 +01:00
Peter Krempa
89a57e7fe0 qemu: Report disk bus as reported by agent in virDomainGetGuestInfo
KubeVirt decided to report this to the users. In order to allow them to
use proper APIs expose the field as well.

Resolves: https://issues.redhat.com/browse/RHEL-80688
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2025-03-03 15:08:19 +01:00
Martin Kletzander
71e75ce092 virsh: Add support for VIR_DOMAIN_GUEST_INFO_LOAD
Resolves: https://issues.redhat.com/browse/RHEL-71883
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-03 14:27:45 +01:00
Martin Kletzander
b4cf9c8cba qemu: Add support for VIR_DOMAIN_GUEST_INFO_LOAD
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-03 14:27:44 +01:00
Martin Kletzander
1669d91ead qemu_agent: Add qemuAgentGetLoadAvg()
With qemu guest agent 9.3 we are able to get the load averages with a
new command.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-03 14:27:44 +01:00
Martin Kletzander
c52c449fd4 Add load average information type into virDomainGetGuestInfo
The public API part.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2025-03-03 14:27:43 +01:00
Jiri Denemark
e9cb690d21 Post-release version bump to 11.2.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2025-03-03 13:42:18 +01:00
300 changed files with 62627 additions and 330946 deletions

View File

@ -8,6 +8,20 @@ the changes introduced by each of them.
For a more fine-grained view, use the `git log`_.
v11.2.0 (unreleased)
====================
* **Security**
* **Removed features**
* **New features**
* **Improvements**
* **Bug fixes**
v11.1.0 (2025-03-03)
====================

View File

@ -1,117 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture arm64
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-aarch64-linux-gnu \
libacl1-dev:arm64 \
libapparmor-dev:arm64 \
libattr1-dev:arm64 \
libaudit-dev:arm64 \
libblkid-dev:arm64 \
libc6-dev:arm64 \
libcap-ng-dev:arm64 \
libcurl4-gnutls-dev:arm64 \
libdevmapper-dev:arm64 \
libfuse-dev:arm64 \
libglib2.0-dev:arm64 \
libglusterfs-dev:arm64 \
libgnutls28-dev:arm64 \
libiscsi-dev:arm64 \
libjson-c-dev:arm64 \
libnl-3-dev:arm64 \
libnl-route-3-dev:arm64 \
libnuma-dev:arm64 \
libparted-dev:arm64 \
libpcap0.8-dev:arm64 \
libpciaccess-dev:arm64 \
librbd-dev:arm64 \
libreadline-dev:arm64 \
libsanlock-dev:arm64 \
libsasl2-dev:arm64 \
libselinux1-dev:arm64 \
libssh-dev:arm64 \
libssh2-1-dev:arm64 \
libtirpc-dev:arm64 \
libudev-dev:arm64 \
libxen-dev:arm64 \
libxml2-dev:arm64 \
systemtap-sdt-dev:arm64
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/aarch64-linux-gnu-gcc'\n\
ar = '/usr/bin/aarch64-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/aarch64-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'aarch64'\n\
cpu = 'aarch64'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/aarch64-linux-gnu
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-cc
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-gcc
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="aarch64-linux-gnu"
export MESON_OPTS="--cross-file=aarch64-linux-gnu"

View File

@ -1,116 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture armel
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-arm-linux-gnueabi \
libacl1-dev:armel \
libapparmor-dev:armel \
libattr1-dev:armel \
libaudit-dev:armel \
libblkid-dev:armel \
libc6-dev:armel \
libcap-ng-dev:armel \
libcurl4-gnutls-dev:armel \
libdevmapper-dev:armel \
libfuse-dev:armel \
libglib2.0-dev:armel \
libglusterfs-dev:armel \
libgnutls28-dev:armel \
libiscsi-dev:armel \
libjson-c-dev:armel \
libnl-3-dev:armel \
libnl-route-3-dev:armel \
libnuma-dev:armel \
libparted-dev:armel \
libpcap0.8-dev:armel \
libpciaccess-dev:armel \
librbd-dev:armel \
libreadline-dev:armel \
libsanlock-dev:armel \
libsasl2-dev:armel \
libselinux1-dev:armel \
libssh-dev:armel \
libssh2-1-dev:armel \
libtirpc-dev:armel \
libudev-dev:armel \
libxml2-dev:armel \
systemtap-sdt-dev:armel
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/arm-linux-gnueabi-gcc'\n\
ar = '/usr/bin/arm-linux-gnueabi-gcc-ar'\n\
strip = '/usr/bin/arm-linux-gnueabi-strip'\n\
pkgconfig = '/usr/bin/arm-linux-gnueabi-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'arm'\n\
cpu = 'arm'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabi
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabi-cc
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabi-gcc
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="arm-linux-gnueabi"
export MESON_OPTS="--cross-file=arm-linux-gnueabi"

View File

@ -1,117 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture armhf
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-arm-linux-gnueabihf \
libacl1-dev:armhf \
libapparmor-dev:armhf \
libattr1-dev:armhf \
libaudit-dev:armhf \
libblkid-dev:armhf \
libc6-dev:armhf \
libcap-ng-dev:armhf \
libcurl4-gnutls-dev:armhf \
libdevmapper-dev:armhf \
libfuse-dev:armhf \
libglib2.0-dev:armhf \
libglusterfs-dev:armhf \
libgnutls28-dev:armhf \
libiscsi-dev:armhf \
libjson-c-dev:armhf \
libnl-3-dev:armhf \
libnl-route-3-dev:armhf \
libnuma-dev:armhf \
libparted-dev:armhf \
libpcap0.8-dev:armhf \
libpciaccess-dev:armhf \
librbd-dev:armhf \
libreadline-dev:armhf \
libsanlock-dev:armhf \
libsasl2-dev:armhf \
libselinux1-dev:armhf \
libssh-dev:armhf \
libssh2-1-dev:armhf \
libtirpc-dev:armhf \
libudev-dev:armhf \
libxen-dev:armhf \
libxml2-dev:armhf \
systemtap-sdt-dev:armhf
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/arm-linux-gnueabihf-gcc'\n\
ar = '/usr/bin/arm-linux-gnueabihf-gcc-ar'\n\
strip = '/usr/bin/arm-linux-gnueabihf-strip'\n\
pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'arm'\n\
cpu = 'armhf'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabihf
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-cc
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-gcc
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="arm-linux-gnueabihf"
export MESON_OPTS="--cross-file=arm-linux-gnueabihf"

View File

@ -1,116 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture i386
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-i686-linux-gnu \
libacl1-dev:i386 \
libapparmor-dev:i386 \
libattr1-dev:i386 \
libaudit-dev:i386 \
libblkid-dev:i386 \
libc6-dev:i386 \
libcap-ng-dev:i386 \
libcurl4-gnutls-dev:i386 \
libdevmapper-dev:i386 \
libfuse-dev:i386 \
libglib2.0-dev:i386 \
libglusterfs-dev:i386 \
libgnutls28-dev:i386 \
libiscsi-dev:i386 \
libjson-c-dev:i386 \
libnl-3-dev:i386 \
libnl-route-3-dev:i386 \
libnuma-dev:i386 \
libparted-dev:i386 \
libpcap0.8-dev:i386 \
libpciaccess-dev:i386 \
librbd-dev:i386 \
libreadline-dev:i386 \
libsanlock-dev:i386 \
libsasl2-dev:i386 \
libselinux1-dev:i386 \
libssh-dev:i386 \
libssh2-1-dev:i386 \
libtirpc-dev:i386 \
libudev-dev:i386 \
libxml2-dev:i386 \
systemtap-sdt-dev:i386
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/i686-linux-gnu-gcc'\n\
ar = '/usr/bin/i686-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/i686-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'x86'\n\
cpu = 'i686'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/i686-linux-gnu
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-cc
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-gcc
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="i686-linux-gnu"
export MESON_OPTS="--cross-file=i686-linux-gnu"

View File

@ -1,116 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture mips64el
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-mips64el-linux-gnuabi64 \
libacl1-dev:mips64el \
libapparmor-dev:mips64el \
libattr1-dev:mips64el \
libaudit-dev:mips64el \
libblkid-dev:mips64el \
libc6-dev:mips64el \
libcap-ng-dev:mips64el \
libcurl4-gnutls-dev:mips64el \
libdevmapper-dev:mips64el \
libfuse-dev:mips64el \
libglib2.0-dev:mips64el \
libglusterfs-dev:mips64el \
libgnutls28-dev:mips64el \
libiscsi-dev:mips64el \
libjson-c-dev:mips64el \
libnl-3-dev:mips64el \
libnl-route-3-dev:mips64el \
libnuma-dev:mips64el \
libparted-dev:mips64el \
libpcap0.8-dev:mips64el \
libpciaccess-dev:mips64el \
librbd-dev:mips64el \
libreadline-dev:mips64el \
libsanlock-dev:mips64el \
libsasl2-dev:mips64el \
libselinux1-dev:mips64el \
libssh-dev:mips64el \
libssh2-1-dev:mips64el \
libtirpc-dev:mips64el \
libudev-dev:mips64el \
libxml2-dev:mips64el \
systemtap-sdt-dev:mips64el
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/mips64el-linux-gnuabi64-gcc'\n\
ar = '/usr/bin/mips64el-linux-gnuabi64-gcc-ar'\n\
strip = '/usr/bin/mips64el-linux-gnuabi64-strip'\n\
pkgconfig = '/usr/bin/mips64el-linux-gnuabi64-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'mips64'\n\
cpu = 'mips64el'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/mips64el-linux-gnuabi64
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips64el-linux-gnuabi64-cc
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips64el-linux-gnuabi64-gcc
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="mips64el-linux-gnuabi64"
export MESON_OPTS="--cross-file=mips64el-linux-gnuabi64"

View File

@ -1,116 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture mipsel
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-mipsel-linux-gnu \
libacl1-dev:mipsel \
libapparmor-dev:mipsel \
libattr1-dev:mipsel \
libaudit-dev:mipsel \
libblkid-dev:mipsel \
libc6-dev:mipsel \
libcap-ng-dev:mipsel \
libcurl4-gnutls-dev:mipsel \
libdevmapper-dev:mipsel \
libfuse-dev:mipsel \
libglib2.0-dev:mipsel \
libglusterfs-dev:mipsel \
libgnutls28-dev:mipsel \
libiscsi-dev:mipsel \
libjson-c-dev:mipsel \
libnl-3-dev:mipsel \
libnl-route-3-dev:mipsel \
libnuma-dev:mipsel \
libparted-dev:mipsel \
libpcap0.8-dev:mipsel \
libpciaccess-dev:mipsel \
librbd-dev:mipsel \
libreadline-dev:mipsel \
libsanlock-dev:mipsel \
libsasl2-dev:mipsel \
libselinux1-dev:mipsel \
libssh-dev:mipsel \
libssh2-1-dev:mipsel \
libtirpc-dev:mipsel \
libudev-dev:mipsel \
libxml2-dev:mipsel \
systemtap-sdt-dev:mipsel
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/mipsel-linux-gnu-gcc'\n\
ar = '/usr/bin/mipsel-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/mipsel-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/mipsel-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'mips'\n\
cpu = 'mipsel'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/mipsel-linux-gnu
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-cc
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-gcc
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="mipsel-linux-gnu"
export MESON_OPTS="--cross-file=mipsel-linux-gnu"

View File

@ -1,116 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture ppc64el
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-powerpc64le-linux-gnu \
libacl1-dev:ppc64el \
libapparmor-dev:ppc64el \
libattr1-dev:ppc64el \
libaudit-dev:ppc64el \
libblkid-dev:ppc64el \
libc6-dev:ppc64el \
libcap-ng-dev:ppc64el \
libcurl4-gnutls-dev:ppc64el \
libdevmapper-dev:ppc64el \
libfuse-dev:ppc64el \
libglib2.0-dev:ppc64el \
libglusterfs-dev:ppc64el \
libgnutls28-dev:ppc64el \
libiscsi-dev:ppc64el \
libjson-c-dev:ppc64el \
libnl-3-dev:ppc64el \
libnl-route-3-dev:ppc64el \
libnuma-dev:ppc64el \
libparted-dev:ppc64el \
libpcap0.8-dev:ppc64el \
libpciaccess-dev:ppc64el \
librbd-dev:ppc64el \
libreadline-dev:ppc64el \
libsanlock-dev:ppc64el \
libsasl2-dev:ppc64el \
libselinux1-dev:ppc64el \
libssh-dev:ppc64el \
libssh2-1-dev:ppc64el \
libtirpc-dev:ppc64el \
libudev-dev:ppc64el \
libxml2-dev:ppc64el \
systemtap-sdt-dev:ppc64el
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/powerpc64le-linux-gnu-gcc'\n\
ar = '/usr/bin/powerpc64le-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/powerpc64le-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/powerpc64le-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'ppc64'\n\
cpu = 'powerpc64le'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/powerpc64le-linux-gnu
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/powerpc64le-linux-gnu-cc
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/powerpc64le-linux-gnu-gcc
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="powerpc64le-linux-gnu"
export MESON_OPTS="--cross-file=powerpc64le-linux-gnu"

View File

@ -1,116 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture s390x
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y dpkg-dev
apt-get install --no-install-recommends -y \
gcc-s390x-linux-gnu \
libacl1-dev:s390x \
libapparmor-dev:s390x \
libattr1-dev:s390x \
libaudit-dev:s390x \
libblkid-dev:s390x \
libc6-dev:s390x \
libcap-ng-dev:s390x \
libcurl4-gnutls-dev:s390x \
libdevmapper-dev:s390x \
libfuse-dev:s390x \
libglib2.0-dev:s390x \
libglusterfs-dev:s390x \
libgnutls28-dev:s390x \
libiscsi-dev:s390x \
libjson-c-dev:s390x \
libnl-3-dev:s390x \
libnl-route-3-dev:s390x \
libnuma-dev:s390x \
libparted-dev:s390x \
libpcap0.8-dev:s390x \
libpciaccess-dev:s390x \
librbd-dev:s390x \
libreadline-dev:s390x \
libsanlock-dev:s390x \
libsasl2-dev:s390x \
libselinux1-dev:s390x \
libssh-dev:s390x \
libssh2-1-dev:s390x \
libtirpc-dev:s390x \
libudev-dev:s390x \
libxml2-dev:s390x \
systemtap-sdt-dev:s390x
mkdir -p /usr/local/share/meson/cross
printf "[binaries]\n\
c = '/usr/bin/s390x-linux-gnu-gcc'\n\
ar = '/usr/bin/s390x-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/s390x-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/s390x-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 's390x'\n\
cpu = 's390x'\n\
endian = 'big'\n" > /usr/local/share/meson/cross/s390x-linux-gnu
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-cc
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-gcc
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"
export ABI="s390x-linux-gnu"
export MESON_OPTS="--cross-file=s390x-linux-gnu"

View File

@ -1,100 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
function install_buildenv() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get dist-upgrade -y
apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
clang \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gcc \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libacl1-dev \
libapparmor-dev \
libattr1-dev \
libaudit-dev \
libblkid-dev \
libc6-dev \
libcap-ng-dev \
libclang-dev \
libcurl4-gnutls-dev \
libdevmapper-dev \
libfuse-dev \
libglib2.0-dev \
libglusterfs-dev \
libgnutls28-dev \
libiscsi-dev \
libjson-c-dev \
libnetcf-dev \
libnl-3-dev \
libnl-route-3-dev \
libnuma-dev \
libparted-dev \
libpcap0.8-dev \
libpciaccess-dev \
librbd-dev \
libreadline-dev \
libsanlock-dev \
libsasl2-dev \
libselinux1-dev \
libssh-dev \
libssh2-1-dev \
libtirpc-dev \
libudev-dev \
libxen-dev \
libxml2-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
systemtap-sdt-dev \
wireshark-dev \
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
}
export CCACHE_WRAPPERSDIR="/usr/libexec/ccache-wrappers"
export LANG="en_US.UTF-8"
export MAKE="/usr/bin/make"
export NINJA="/usr/bin/ninja"
export PYTHON="/usr/bin/python3"

View File

@ -4,7 +4,7 @@
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/alpine:3.19
FROM docker.io/library/alpine:3.21
RUN apk update && \
apk upgrade && \

View File

@ -1,123 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture arm64 && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-aarch64-linux-gnu \
libacl1-dev:arm64 \
libapparmor-dev:arm64 \
libattr1-dev:arm64 \
libaudit-dev:arm64 \
libblkid-dev:arm64 \
libc6-dev:arm64 \
libcap-ng-dev:arm64 \
libcurl4-gnutls-dev:arm64 \
libdevmapper-dev:arm64 \
libfuse-dev:arm64 \
libglib2.0-dev:arm64 \
libglusterfs-dev:arm64 \
libgnutls28-dev:arm64 \
libiscsi-dev:arm64 \
libjson-c-dev:arm64 \
libnl-3-dev:arm64 \
libnl-route-3-dev:arm64 \
libnuma-dev:arm64 \
libparted-dev:arm64 \
libpcap0.8-dev:arm64 \
libpciaccess-dev:arm64 \
librbd-dev:arm64 \
libreadline-dev:arm64 \
libsanlock-dev:arm64 \
libsasl2-dev:arm64 \
libselinux1-dev:arm64 \
libssh-dev:arm64 \
libssh2-1-dev:arm64 \
libtirpc-dev:arm64 \
libudev-dev:arm64 \
libxen-dev:arm64 \
libxml2-dev:arm64 \
systemtap-sdt-dev:arm64 && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/aarch64-linux-gnu-gcc'\n\
ar = '/usr/bin/aarch64-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/aarch64-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'aarch64'\n\
cpu = 'aarch64'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/aarch64-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-gcc
ENV ABI "aarch64-linux-gnu"
ENV MESON_OPTS "--cross-file=aarch64-linux-gnu"

View File

@ -1,122 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture armel && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-arm-linux-gnueabi \
libacl1-dev:armel \
libapparmor-dev:armel \
libattr1-dev:armel \
libaudit-dev:armel \
libblkid-dev:armel \
libc6-dev:armel \
libcap-ng-dev:armel \
libcurl4-gnutls-dev:armel \
libdevmapper-dev:armel \
libfuse-dev:armel \
libglib2.0-dev:armel \
libglusterfs-dev:armel \
libgnutls28-dev:armel \
libiscsi-dev:armel \
libjson-c-dev:armel \
libnl-3-dev:armel \
libnl-route-3-dev:armel \
libnuma-dev:armel \
libparted-dev:armel \
libpcap0.8-dev:armel \
libpciaccess-dev:armel \
librbd-dev:armel \
libreadline-dev:armel \
libsanlock-dev:armel \
libsasl2-dev:armel \
libselinux1-dev:armel \
libssh-dev:armel \
libssh2-1-dev:armel \
libtirpc-dev:armel \
libudev-dev:armel \
libxml2-dev:armel \
systemtap-sdt-dev:armel && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/arm-linux-gnueabi-gcc'\n\
ar = '/usr/bin/arm-linux-gnueabi-gcc-ar'\n\
strip = '/usr/bin/arm-linux-gnueabi-strip'\n\
pkgconfig = '/usr/bin/arm-linux-gnueabi-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'arm'\n\
cpu = 'arm'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabi && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabi-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabi-gcc
ENV ABI "arm-linux-gnueabi"
ENV MESON_OPTS "--cross-file=arm-linux-gnueabi"

View File

@ -1,123 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture armhf && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-arm-linux-gnueabihf \
libacl1-dev:armhf \
libapparmor-dev:armhf \
libattr1-dev:armhf \
libaudit-dev:armhf \
libblkid-dev:armhf \
libc6-dev:armhf \
libcap-ng-dev:armhf \
libcurl4-gnutls-dev:armhf \
libdevmapper-dev:armhf \
libfuse-dev:armhf \
libglib2.0-dev:armhf \
libglusterfs-dev:armhf \
libgnutls28-dev:armhf \
libiscsi-dev:armhf \
libjson-c-dev:armhf \
libnl-3-dev:armhf \
libnl-route-3-dev:armhf \
libnuma-dev:armhf \
libparted-dev:armhf \
libpcap0.8-dev:armhf \
libpciaccess-dev:armhf \
librbd-dev:armhf \
libreadline-dev:armhf \
libsanlock-dev:armhf \
libsasl2-dev:armhf \
libselinux1-dev:armhf \
libssh-dev:armhf \
libssh2-1-dev:armhf \
libtirpc-dev:armhf \
libudev-dev:armhf \
libxen-dev:armhf \
libxml2-dev:armhf \
systemtap-sdt-dev:armhf && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/arm-linux-gnueabihf-gcc'\n\
ar = '/usr/bin/arm-linux-gnueabihf-gcc-ar'\n\
strip = '/usr/bin/arm-linux-gnueabihf-strip'\n\
pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'arm'\n\
cpu = 'armhf'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabihf && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-gcc
ENV ABI "arm-linux-gnueabihf"
ENV MESON_OPTS "--cross-file=arm-linux-gnueabihf"

View File

@ -1,122 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture i386 && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-i686-linux-gnu \
libacl1-dev:i386 \
libapparmor-dev:i386 \
libattr1-dev:i386 \
libaudit-dev:i386 \
libblkid-dev:i386 \
libc6-dev:i386 \
libcap-ng-dev:i386 \
libcurl4-gnutls-dev:i386 \
libdevmapper-dev:i386 \
libfuse-dev:i386 \
libglib2.0-dev:i386 \
libglusterfs-dev:i386 \
libgnutls28-dev:i386 \
libiscsi-dev:i386 \
libjson-c-dev:i386 \
libnl-3-dev:i386 \
libnl-route-3-dev:i386 \
libnuma-dev:i386 \
libparted-dev:i386 \
libpcap0.8-dev:i386 \
libpciaccess-dev:i386 \
librbd-dev:i386 \
libreadline-dev:i386 \
libsanlock-dev:i386 \
libsasl2-dev:i386 \
libselinux1-dev:i386 \
libssh-dev:i386 \
libssh2-1-dev:i386 \
libtirpc-dev:i386 \
libudev-dev:i386 \
libxml2-dev:i386 \
systemtap-sdt-dev:i386 && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/i686-linux-gnu-gcc'\n\
ar = '/usr/bin/i686-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/i686-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/i686-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'x86'\n\
cpu = 'i686'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/i686-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-linux-gnu-gcc
ENV ABI "i686-linux-gnu"
ENV MESON_OPTS "--cross-file=i686-linux-gnu"

View File

@ -1,122 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture mips64el && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-mips64el-linux-gnuabi64 \
libacl1-dev:mips64el \
libapparmor-dev:mips64el \
libattr1-dev:mips64el \
libaudit-dev:mips64el \
libblkid-dev:mips64el \
libc6-dev:mips64el \
libcap-ng-dev:mips64el \
libcurl4-gnutls-dev:mips64el \
libdevmapper-dev:mips64el \
libfuse-dev:mips64el \
libglib2.0-dev:mips64el \
libglusterfs-dev:mips64el \
libgnutls28-dev:mips64el \
libiscsi-dev:mips64el \
libjson-c-dev:mips64el \
libnl-3-dev:mips64el \
libnl-route-3-dev:mips64el \
libnuma-dev:mips64el \
libparted-dev:mips64el \
libpcap0.8-dev:mips64el \
libpciaccess-dev:mips64el \
librbd-dev:mips64el \
libreadline-dev:mips64el \
libsanlock-dev:mips64el \
libsasl2-dev:mips64el \
libselinux1-dev:mips64el \
libssh-dev:mips64el \
libssh2-1-dev:mips64el \
libtirpc-dev:mips64el \
libudev-dev:mips64el \
libxml2-dev:mips64el \
systemtap-sdt-dev:mips64el && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/mips64el-linux-gnuabi64-gcc'\n\
ar = '/usr/bin/mips64el-linux-gnuabi64-gcc-ar'\n\
strip = '/usr/bin/mips64el-linux-gnuabi64-strip'\n\
pkgconfig = '/usr/bin/mips64el-linux-gnuabi64-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'mips64'\n\
cpu = 'mips64el'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/mips64el-linux-gnuabi64 && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips64el-linux-gnuabi64-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips64el-linux-gnuabi64-gcc
ENV ABI "mips64el-linux-gnuabi64"
ENV MESON_OPTS "--cross-file=mips64el-linux-gnuabi64"

View File

@ -1,122 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture mipsel && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-mipsel-linux-gnu \
libacl1-dev:mipsel \
libapparmor-dev:mipsel \
libattr1-dev:mipsel \
libaudit-dev:mipsel \
libblkid-dev:mipsel \
libc6-dev:mipsel \
libcap-ng-dev:mipsel \
libcurl4-gnutls-dev:mipsel \
libdevmapper-dev:mipsel \
libfuse-dev:mipsel \
libglib2.0-dev:mipsel \
libglusterfs-dev:mipsel \
libgnutls28-dev:mipsel \
libiscsi-dev:mipsel \
libjson-c-dev:mipsel \
libnl-3-dev:mipsel \
libnl-route-3-dev:mipsel \
libnuma-dev:mipsel \
libparted-dev:mipsel \
libpcap0.8-dev:mipsel \
libpciaccess-dev:mipsel \
librbd-dev:mipsel \
libreadline-dev:mipsel \
libsanlock-dev:mipsel \
libsasl2-dev:mipsel \
libselinux1-dev:mipsel \
libssh-dev:mipsel \
libssh2-1-dev:mipsel \
libtirpc-dev:mipsel \
libudev-dev:mipsel \
libxml2-dev:mipsel \
systemtap-sdt-dev:mipsel && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/mipsel-linux-gnu-gcc'\n\
ar = '/usr/bin/mipsel-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/mipsel-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/mipsel-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'mips'\n\
cpu = 'mipsel'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/mipsel-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-gcc
ENV ABI "mipsel-linux-gnu"
ENV MESON_OPTS "--cross-file=mipsel-linux-gnu"

View File

@ -1,122 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture ppc64el && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-powerpc64le-linux-gnu \
libacl1-dev:ppc64el \
libapparmor-dev:ppc64el \
libattr1-dev:ppc64el \
libaudit-dev:ppc64el \
libblkid-dev:ppc64el \
libc6-dev:ppc64el \
libcap-ng-dev:ppc64el \
libcurl4-gnutls-dev:ppc64el \
libdevmapper-dev:ppc64el \
libfuse-dev:ppc64el \
libglib2.0-dev:ppc64el \
libglusterfs-dev:ppc64el \
libgnutls28-dev:ppc64el \
libiscsi-dev:ppc64el \
libjson-c-dev:ppc64el \
libnl-3-dev:ppc64el \
libnl-route-3-dev:ppc64el \
libnuma-dev:ppc64el \
libparted-dev:ppc64el \
libpcap0.8-dev:ppc64el \
libpciaccess-dev:ppc64el \
librbd-dev:ppc64el \
libreadline-dev:ppc64el \
libsanlock-dev:ppc64el \
libsasl2-dev:ppc64el \
libselinux1-dev:ppc64el \
libssh-dev:ppc64el \
libssh2-1-dev:ppc64el \
libtirpc-dev:ppc64el \
libudev-dev:ppc64el \
libxml2-dev:ppc64el \
systemtap-sdt-dev:ppc64el && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/powerpc64le-linux-gnu-gcc'\n\
ar = '/usr/bin/powerpc64le-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/powerpc64le-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/powerpc64le-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 'ppc64'\n\
cpu = 'powerpc64le'\n\
endian = 'little'\n" > /usr/local/share/meson/cross/powerpc64le-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/powerpc64le-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/powerpc64le-linux-gnu-gcc
ENV ABI "powerpc64le-linux-gnu"
ENV MESON_OPTS "--cross-file=powerpc64le-linux-gnu"

View File

@ -1,122 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libclang-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"
RUN export DEBIAN_FRONTEND=noninteractive && \
dpkg --add-architecture s390x && \
eatmydata apt-get update && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
eatmydata apt-get install --no-install-recommends -y \
gcc-s390x-linux-gnu \
libacl1-dev:s390x \
libapparmor-dev:s390x \
libattr1-dev:s390x \
libaudit-dev:s390x \
libblkid-dev:s390x \
libc6-dev:s390x \
libcap-ng-dev:s390x \
libcurl4-gnutls-dev:s390x \
libdevmapper-dev:s390x \
libfuse-dev:s390x \
libglib2.0-dev:s390x \
libglusterfs-dev:s390x \
libgnutls28-dev:s390x \
libiscsi-dev:s390x \
libjson-c-dev:s390x \
libnl-3-dev:s390x \
libnl-route-3-dev:s390x \
libnuma-dev:s390x \
libparted-dev:s390x \
libpcap0.8-dev:s390x \
libpciaccess-dev:s390x \
librbd-dev:s390x \
libreadline-dev:s390x \
libsanlock-dev:s390x \
libsasl2-dev:s390x \
libselinux1-dev:s390x \
libssh-dev:s390x \
libssh2-1-dev:s390x \
libtirpc-dev:s390x \
libudev-dev:s390x \
libxml2-dev:s390x \
systemtap-sdt-dev:s390x && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
printf "[binaries]\n\
c = '/usr/bin/s390x-linux-gnu-gcc'\n\
ar = '/usr/bin/s390x-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/s390x-linux-gnu-strip'\n\
pkgconfig = '/usr/bin/s390x-linux-gnu-pkg-config'\n\
\n\
[host_machine]\n\
system = 'linux'\n\
cpu_family = 's390x'\n\
cpu = 's390x'\n\
endian = 'big'\n" > /usr/local/share/meson/cross/s390x-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-gcc
ENV ABI "s390x-linux-gnu"
ENV MESON_OPTS "--cross-file=s390x-linux-gnu"

View File

@ -1,103 +0,0 @@
# THIS FILE WAS AUTO-GENERATED
#
# $ lcitool manifest ci/manifest.yml
#
# https://gitlab.com/libvirt/libvirt-ci
FROM docker.io/library/debian:11-slim
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y eatmydata && \
eatmydata apt-get dist-upgrade -y && \
eatmydata apt-get install --no-install-recommends -y \
augeas-lenses \
augeas-tools \
bash-completion \
black \
ca-certificates \
ccache \
clang \
codespell \
cpp \
diffutils \
dwarves \
ebtables \
flake8 \
gcc \
gettext \
git \
grep \
iproute2 \
iptables \
kmod \
libacl1-dev \
libapparmor-dev \
libattr1-dev \
libaudit-dev \
libblkid-dev \
libc6-dev \
libcap-ng-dev \
libclang-dev \
libcurl4-gnutls-dev \
libdevmapper-dev \
libfuse-dev \
libglib2.0-dev \
libglusterfs-dev \
libgnutls28-dev \
libiscsi-dev \
libjson-c-dev \
libnetcf-dev \
libnl-3-dev \
libnl-route-3-dev \
libnuma-dev \
libparted-dev \
libpcap0.8-dev \
libpciaccess-dev \
librbd-dev \
libreadline-dev \
libsanlock-dev \
libsasl2-dev \
libselinux1-dev \
libssh-dev \
libssh2-1-dev \
libtirpc-dev \
libudev-dev \
libxen-dev \
libxml2-dev \
libxml2-utils \
locales \
lvm2 \
make \
meson \
nfs-common \
ninja-build \
numad \
open-iscsi \
perl-base \
pkgconf \
policykit-1 \
python3 \
python3-docutils \
python3-pytest \
qemu-utils \
sed \
systemtap-sdt-dev \
wireshark-dev \
xsltproc && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
dpkg-reconfigure locales && \
rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
ENV MAKE "/usr/bin/make"
ENV NINJA "/usr/bin/ninja"
ENV PYTHON "/usr/bin/python3"

View File

@ -33,15 +33,15 @@ x86_64-almalinux-9-clang:
TARGET_BASE_IMAGE: docker.io/library/almalinux:9
x86_64-alpine-319:
x86_64-alpine-321:
extends: .native_build_job
needs:
- job: x86_64-alpine-319-container
- job: x86_64-alpine-321-container
optional: true
allow_failure: false
variables:
NAME: alpine-319
TARGET_BASE_IMAGE: docker.io/library/alpine:3.19
NAME: alpine-321
TARGET_BASE_IMAGE: docker.io/library/alpine:3.21
x86_64-alpine-edge:
@ -70,30 +70,6 @@ x86_64-centos-stream-9:
- libvirt-rpms
x86_64-debian-11:
extends: .native_build_job
needs:
- job: x86_64-debian-11-container
optional: true
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
x86_64-debian-11-clang:
extends: .native_build_job
needs:
- job: x86_64-debian-11-container
optional: true
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
x86_64-debian-12:
extends: .native_build_job
needs:
@ -246,110 +222,6 @@ x86_64-ubuntu-2404-clang:
# Cross build jobs
aarch64-debian-11:
extends: .cross_build_job
needs:
- job: aarch64-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: aarch64
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
armv6l-debian-11:
extends: .cross_build_job
needs:
- job: armv6l-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: armv6l
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
armv7l-debian-11:
extends: .cross_build_job
needs:
- job: armv7l-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: armv7l
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
i686-debian-11:
extends: .cross_build_job
needs:
- job: i686-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: i686
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
mips64el-debian-11:
extends: .cross_build_job
needs:
- job: mips64el-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: mips64el
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
mipsel-debian-11:
extends: .cross_build_job
needs:
- job: mipsel-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: mipsel
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
ppc64le-debian-11:
extends: .cross_build_job
needs:
- job: ppc64le-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: ppc64le
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
s390x-debian-11:
extends: .cross_build_job
needs:
- job: s390x-debian-11-container
optional: true
allow_failure: false
variables:
CROSS: s390x
JOB_OPTIONAL: 1
NAME: debian-11
TARGET_BASE_IMAGE: docker.io/library/debian:11-slim
aarch64-debian-12:
extends: .cross_build_job
needs:

View File

@ -14,11 +14,11 @@ x86_64-almalinux-9-container:
NAME: almalinux-9
x86_64-alpine-319-container:
x86_64-alpine-321-container:
extends: .container_job
allow_failure: false
variables:
NAME: alpine-319
NAME: alpine-321
x86_64-alpine-edge-container:
@ -35,14 +35,6 @@ x86_64-centos-stream-9-container:
NAME: centos-stream-9
x86_64-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11
x86_64-debian-12-container:
extends: .container_job
allow_failure: false
@ -109,70 +101,6 @@ x86_64-ubuntu-2404-container:
# Cross container jobs
aarch64-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-aarch64
armv6l-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-armv6l
armv7l-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-armv7l
i686-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-i686
mips64el-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-mips64el
mipsel-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-mipsel
ppc64le-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-ppc64le
s390x-debian-11-container:
extends: .container_job
allow_failure: false
variables:
JOB_OPTIONAL: 1
NAME: debian-11-cross-s390x
aarch64-debian-12-container:
extends: .container_job
allow_failure: false

View File

@ -29,23 +29,23 @@ centos-stream-9-tests:
# and libvirt-python CI jobs, so the new target needs to be introduced
# there before it can be used here. The VM template for the target
# also needs to be created on the runner host.
fedora-40-tests:
fedora-41-tests:
extends: .integration_tests
variables:
# needed by libvirt-gitlab-executor
DISTRO: fedora-40
DISTRO: fedora-41
# can be overridden in forks to set a different runner tag
LIBVIRT_CI_INTEGRATION_RUNNER_TAG: redhat-vm-host
tags:
- $LIBVIRT_CI_INTEGRATION_RUNNER_TAG
needs:
- x86_64-fedora-40
- x86_64-fedora-41
- project: libvirt/libvirt-perl
job: x86_64-fedora-40
job: x86_64-fedora-41
ref: master
artifacts: true
- project: libvirt/libvirt-python
job: x86_64-fedora-40
job: x86_64-fedora-41
ref: master
artifacts: true
@ -53,22 +53,22 @@ fedora-40-tests:
# and libvirt-python CI jobs, so the new target needs to be introduced
# there before it can be used here. The VM template for the target
# also needs to be created on the runner host.
.fedora-40-upstream-qemu-tests:
.fedora-41-upstream-qemu-tests:
extends: .integration_tests
variables:
# needed by libvirt-gitlab-executor
DISTRO: fedora-40
DISTRO: fedora-41
# can be overridden in forks to set a different runner tag
LIBVIRT_CI_INTEGRATION_RUNNER_TAG: redhat-vm-host
tags:
- $LIBVIRT_CI_INTEGRATION_RUNNER_TAG
needs:
- x86_64-fedora-40
- x86_64-fedora-41
- project: libvirt/libvirt-perl
job: x86_64-fedora-40
job: x86_64-fedora-41
ref: master
artifacts: true
- project: libvirt/libvirt-python
job: x86_64-fedora-40
job: x86_64-fedora-41
ref: master
artifacts: true

View File

@ -124,6 +124,9 @@ run_integration() {
DAEMONS="virtinterfaced virtlockd virtlogd virtnetworkd virtnodedevd virtnwfilterd virtproxyd virtqemud virtsecretd virtstoraged"
fi
# Force libvirt to use iptables to make sure libvirt-tck tests don't fail
run_cmd_quiet sudo augtool set /files/etc/libvirt/network.conf/firewall_backend "'iptables'"
echo "DAEMONS=$DAEMONS"
for daemon in $DAEMONS
do

View File

@ -19,7 +19,7 @@ targets:
RPM: skip
CC: clang
alpine-319: x86_64
alpine-321: x86_64
alpine-edge:
jobs:
@ -34,46 +34,6 @@ targets:
paths:
- libvirt-rpms
debian-11:
jobs:
- arch: x86_64
builds: false
- arch: x86_64
suffix: -clang
builds: false
- arch: aarch64
containers: false
builds: false
- arch: armv6l
containers: false
builds: false
- arch: armv7l
builds: false
- arch: i686
containers: false
builds: false
- arch: mips64el
containers: false
builds: false
- arch: mipsel
containers: false
builds: false
- arch: ppc64le
containers: false
builds: false
- arch: s390x
containers: false
builds: false
debian-12:
jobs:
- arch: x86_64

View File

@ -26,7 +26,7 @@ name will default to a preselected hypervisor, but it's probably not a
wise thing to do in most cases. See the `connection URI <uri.html>`__
page for a full descriptions of the values allowed.
OnDevice the application obtains a
Once the application obtains a
`virConnectPtr <html/libvirt-libvirt-host.html#virConnectPtr>`__
connection to the hypervisor it can then use it to manage the
hypervisor's available domains and related virtualization resources,

View File

@ -397,6 +397,7 @@ and full virtualized guests.
<kernel>/root/f8-i386-vmlinuz</kernel>
<initrd>/root/f8-i386-initrd</initrd>
<cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
<shim>/path/to/shim.efi</shim>
<dtb>/root/ppc.dtb</dtb>
</os>
...
@ -417,6 +418,10 @@ and full virtualized guests.
The contents of this element specify arguments to be passed to the kernel (or
installer) at boot time. This is often used to specify an alternate primary
console (eg serial port), or the installation media source / kickstart file
``shim``
Use specified fully-qualified path to load an initial UEFI bootloader that
handles chaining to a trusted full bootloader under secure boot
environments.
``dtb``
The contents of this element specify the fully-qualified path to the
(optional) device tree binary (dtb) image in the host OS.
@ -490,9 +495,26 @@ These options apply to any form of booting of the guest OS.
...
``acpi``
The ``table`` element contains a fully-qualified path to the ACPI table. The
``type`` attribute contains the ACPI table type (currently only ``slic`` is
supported) :since:`Since 1.3.5 (QEMU)` :since:`Since 5.9.0 (Xen)`
The ``table`` element contains a fully-qualified path to the ACPI table,
with the ``type`` attribute dictating what data must be present in the
file:
* ``raw``: a single ACPI table with header and data, with ACPI
signature auto-detected from header (:since:`Since 11.2.0 (QEMU)`).
* ``rawset``: concatenation of multiple ACPI tables with header
and data, each with any ACPI signature, auto-detected from header
(:since:`Since 11.2.0 (Xen)`).
* ``slic``: a single ACPI table with header and data, providing
software licensing information. The ACPI table signature in the
header will be forced to ``SLIC`` (:since:`Since 1.3.5 (QEMU)`,
mis-interpreted as ``rawset`` :since:`Since 5.9.0 (Xen)`).
* ``msdm``: a single ACPI table with header and data, providing
Microsoft Data Management information. The ACPI table signature
in the header will be forced to ``MSDM``
(:since:`Since 11.2.0 (QEMU)`).
Each type may be used only once, except for ``raw`` which can
appear multiple times.
SMBIOS System Information
@ -3442,10 +3464,27 @@ paravirtualized driver is specified via the ``disk`` element.
*Note:* ``iothread`` is mutually exclusive with ``iothreads``.
- The optional ``iothreads`` sub-element allows specifying multiple IOThreads
via the ``iothread`` sub-element with attribute ``id`` the disk will use
for I/O operations. Optionally the ``iothread`` element can have multiple
``queue`` subelements specifying that given iothread should be used to
handle given queues. :since:`Since 10.0.0 (QEMU 9.0, virtio disks only)`.
Example::
for I/O operations. The virt queues (see ``queues`` attribute below) are
automatically distributed among the configured iothreads.
Optionally the ``iothread`` element can have multiple ``queue``
subelements with mandatory ``id`` atribute specifying that the iothread
should be used to handle given virt queue. If queue mapping is present
the ``queues`` attribute of ``driver`` must be configured and all
configured virt queues must be included in the mapping. The
``virtio-blk`` device exposes request virt queues ``0`` to ``N-1`` where
N is the number of queues configured for the device.
:since:`Since 10.0.0 (QEMU 9.0, virtio disks only)`.
Examples::
<driver name='qemu' queues='4'>
<iothreads>
<iothread id='2'/>
<iothread id='3'/>
</iothreads>
</driver>
<driver name='qemu' queues='3'>
<iothreads>
@ -5154,13 +5193,13 @@ destined for the host toward the guest instead), and a socket between
passt and QEMU forwards that traffic on to the guest (and back out,
of course).
*(:since:`Since 11.1.0 (QEMU and KVM only)` you may prefer to use the
:since:`Since 11.1.0 (QEMU and KVM only)` you may prefer to use the
passt backend with the more efficient and performant type='vhostuser'
rather than type='user'. All the options related to passt in the
paragraphs below here also apply when using the passt backend with
type='vhostuser'; any other details specific to vhostuser are
described* `here
<formatdomain.html#vhost-user-connection-with-passt-backend>`__.)
described `here
<formatdomain.html#vhost-user-connection-with-passt-backend>`__.
Similar to SLIRP, passt has an internal DHCP server that provides a
@ -6718,7 +6757,7 @@ interaction with the admin.
<graphics type='dbus'/>
``p2p`` (accepts ``on`` or ``off``) enables peer-to-peer connections,
``p2p`` (accepts ``yes`` or ``no``) enables peer-to-peer connections,
established through virDomainOpenGraphics() APIs.
``address`` (accepts a `D-Bus address
@ -8426,27 +8465,32 @@ Example: usage of external TPM emulator :since:`Since 9.0.0`
``profile``
The ``profile`` node is used to set a profile for a TPM 2.0 given in the
source attribute. This profile will be set when the TPM is initially
created and after that cannot be changed anymore. Once a profile has been
set the name attribute will be updated with the name of the profile that
is running. If no profile is provided, then swtpm will use the latest
built-in 'default' profile or the default profile set in swtpm_setup.conf.
Otherwise swtpm_setup will search for a profile with the given name with
appended .json suffix in a configurable local and then in a distro
directory. If none could be found in either, it will fall back trying to
use a built-in one.
``source`` attribute. This attribute describes the name of the file under
which the profile is stored, e.g. 'local:restricted' describes a locally
created profile with name 'restricted.json' that is found in the directory
pointed to by swtpm_setup.conf's local_profiles_dir. This profile will be set
when the TPM is initially created and after that the profile cannot be
changed anymore. Once a profile has been set, the ``name`` attribute will be
updated with the profile's name from its JSON description, for example
'custom:restricted'. If no profile is provided, then swtpm will use the
latest built-in 'default' profile or the default profile set in
swtpm_setup.conf. Otherwise swtpm_setup will search for a profile with the
given name with appended .json suffix in a configurable local and then in a
distro directory. If none could be found in either, it will fall back trying
to use a built-in one.
The built-in 'null' profile provides backwards compatibility with
libtpms v0.9 but also restricts the user to use only TPM features that were
available at the time of libtpms v0.9. The built-in 'custom' profile is the
only profile that a user can modify and where the ``removeDisabled``
available at the time of libtpms v0.9. The built-in 'custom' profile, or
those with the prefix 'custom:' in the name, are the
only profiles that a user can modify and where the ``removeDisabled``
attribute has any effect. This attribute is particularly useful when a host
is running in FIPS mode and therefore some crypto algorithms (camellia,
tdes, unpadded RSA encryption, 1024-bit RSA keys, and others) are
disabled. When it is set to ``check`` (recommended) then only those
algorithms that are currently disabled will automatically be removed from
the 'custom' profile, while when it is set to ``fips-host`` then all
potentially disabled algorithms will be removed. :since:`Since 10.??.0`
potentially disabled algorithms will be removed. :since:`Since 10.10.0`
TPM profiles provided by a distro can be referenced with the 'distro:'
prefix. Locally created TPM profiles can be referenced with the

View File

@ -2930,7 +2930,7 @@ Success is always reported in this case.
You can limit the types of information that are returned by specifying one or
more flags. Available information types flags are *--user*, *--os*,
*--timezone*, *--hostname*, *--filesystem*, *--disk* and *--interface*.
*--timezone*, *--hostname*, *--filesystem*, *--disk*, *--interface* and *--load*.
If an explicitly requested information type is not supported by the guest agent
at that point, the processes will provide an exit code of 1.
@ -2999,6 +2999,7 @@ returned:
* ``disk.<num>.serial`` - optional disk serial number
* ``disk.<num>.alias`` - the device alias of the disk (e.g. sda)
* ``disk.<num>.guest_alias`` - optional alias assigned to the disk
* ``disk.<num>.guest_bus`` - bus type as reported by the guest
*--interface* returns:
* ``if.count`` - the number of interfaces defined on this domain
@ -3009,6 +3010,12 @@ returned:
* ``if.<num>.addr.<num1>.addr`` - the IP address of addr <num1>
* ``if.<num>.addr.<num1>.prefix`` - the prefix of IP address of addr <num1>
*--load* returns:
* ``load.1m`` - average load in guest for last 1 minute
* ``load.5m`` - average load in guest for last 5 minutes
* ``load.15m`` - average load in guest for last 15 minutes
guestvcpus
----------

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
project(
'libvirt', 'c',
version: '11.1.0',
version: '11.2.0',
license: 'LGPLv2+',
meson_version: '>= 0.56.0',
default_options: [
@ -82,7 +82,7 @@ endif
runstatedir = get_option('runstatedir')
if runstatedir == ''
runstatedir = localstatedir / 'run'
runstatedir = '/run'
endif
initconfdir = get_option('initconfdir')

View File

@ -27,7 +27,7 @@ msgstr ""
"Project-Id-Version: libvirt\n"
"Report-Msgid-Bugs-To: https://libvirt.org/bugs.html\n"
"POT-Creation-Date: 2025-02-24 10:18+0000\n"
"PO-Revision-Date: 2025-02-11 12:00+0000\n"
"PO-Revision-Date: 2025-03-03 21:00+0000\n"
"Last-Translator: Nicolás Gal <nialegal@yandex.com>\n"
"Language-Team: Spanish <https://translate.fedoraproject.org/projects/libvirt/"
"libvirt/es/>\n"
@ -36,7 +36,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.9.2\n"
"X-Generator: Weblate 5.10.2\n"
msgid ""
"\n"
@ -863,18 +863,19 @@ msgstr ""
#, c-format
msgid "%1$s: Failed to open the event monitor FIFO(%2$s) read end!"
msgstr ""
"%1$s: No se pudo abrir el monitor de eventos FIFO(%2$s) para la lectura!"
#, c-format
msgid "%1$s: Failed to parse and process events"
msgstr ""
msgstr "%1$s: Error al analizar y procesar eventos"
#, c-format
msgid "%1$s: Failed to process JSON event doc: %2$s"
msgstr ""
msgstr "%1$s: Error al procesar el documento de evento JSON: %2$s"
#, c-format
msgid "%1$s: Failed to read ch events!: %2$s"
msgstr ""
msgstr "%1$s: ¡Error al leer eventos ch!: %2$s"
#, c-format
msgid "%1$s: File '%2$s' is too large\n"
@ -896,7 +897,7 @@ msgstr ""
#, c-format
msgid "%1$s: Invalid JSON event doc: %2$s"
msgstr ""
msgstr "%1$s: Documento de evento JSON no válido: %2$s"
#, c-format
msgid "%1$s: Invalid netmask '%2$s' for address '%3$s' (both must be IPv4)"
@ -1335,15 +1336,21 @@ msgid ""
"'--copy-storage-synchronous-writes' requires one of '--copy-storage-all', '--"
"copy-storage-inc'"
msgstr ""
"'--copy-storage-synchronous-writes' requiere una de las siguientes opciones: "
"'--copy-storage-all' o '--copy-storage-inc'"
msgid ""
"'--migrate-disks' requires one of '--copy-storage-all', '--copy-storage-inc'"
msgstr ""
"'--migrate-disks' requiere una de las siguientes opciones: '--copy-storage-"
"all' o '--copy-storage-inc'"
msgid ""
"'--migrate-disks-detect-zeroes' requires one of '--copy-storage-all', '--"
"copy-storage-inc'"
msgstr ""
"'--migrate-disks-detect-zeroes' requiere una de las siguientes opciones "
"'--copy-storage-all' o '--copy-storage-inc'"
#, fuzzy
msgid ""
@ -1544,6 +1551,8 @@ msgstr ""
msgid "'queue' count must be configured for explicit iothread to queue mapping"
msgstr ""
"Debe asignarse un valor a 'queue' para mapeos explícitos de iothread a cola "
"(queue)"
msgid "'queues' is only supported by virtio-scsi controller"
msgstr "El controlador virtio-scsi solo admite 'queues'"
@ -1552,6 +1561,8 @@ msgid ""
"'reconnect' attribute is not supported when source mode='server' for "
"<interface type='vhostuser'>"
msgstr ""
"el atributo 'reconnect' no es compatible cuando el origen es del tipo "
"mode='server' para una interfaz <interface type='vhostuser'>"
msgid ""
"'restrictive' mode is required in memnode element when mode is 'restrictive' "

View File

@ -94,14 +94,13 @@ bhyveDomainDefPostParse(virDomainDef *def,
return -1;
/* Add an implicit PCI root controller */
if (virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 0,
VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT) < 0)
return -1;
virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 0,
VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT);
if (bhyveDomainDefNeedsISAController(def))
if (virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_ISA, 0,
VIR_DOMAIN_CONTROLLER_MODEL_ISA_DEFAULT) < 0)
return -1;
if (bhyveDomainDefNeedsISAController(def)) {
virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_ISA, 0,
VIR_DOMAIN_CONTROLLER_MODEL_ISA_DEFAULT);
}
return 0;
}

View File

@ -65,6 +65,9 @@ virCHDomainObjPrivateFree(void *data)
virChrdevFree(priv->chrdevs);
g_free(priv->machineName);
virBitmapFree(priv->autoCpuset);
virBitmapFree(priv->autoNodeset);
virCgroupFree(priv->cgroup);
g_free(priv);
}

View File

@ -131,28 +131,50 @@ virCHMonitorBuildPayloadJson(virJSONValue *content, virDomainDef *vmdef)
{
g_autoptr(virJSONValue) payload = virJSONValueNewObject();
if (vmdef->os.kernel == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Kernel image path in this domain is not defined"));
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Kernel image path is not defined. With sev_snp=on, pass an igvm path"));
return -1;
}
if (vmdef->sec &&
vmdef->sec->sectype == VIR_DOMAIN_LAUNCH_SECURITY_SEV_SNP) {
if (virJSONValueObjectAppendString(payload, "igvm", vmdef->os.kernel) < 0)
return -1;
if (vmdef->sec->data.sev_snp.host_data) {
size_t len;
const size_t host_data_len = 32;
g_autofree unsigned char *buf = NULL;
g_autofree char *host_data = NULL;
/* Libvirt provided host_data is base64 encoded and cloud-hypervisor
requires host_data as hex encoded. Base64 decode and hex encode
before sending to cloud-hypervisor.*/
buf = g_base64_decode(vmdef->sec->data.sev_snp.host_data, &len);
if (len != host_data_len) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Invalid host_data provided. Expected '%1$ld' bytes"),
host_data_len);
return -1;
}
host_data = virStringFormatHex(buf, host_data_len);
if (virJSONValueObjectAppendString(payload, "host_data",
host_data) < 0)
return -1;
}
} else {
if (virJSONValueObjectAppendString(payload, "kernel", vmdef->os.kernel) < 0)
return -1;
}
if (vmdef->os.cmdline) {
if (virJSONValueObjectAppendString(payload, "cmdline", vmdef->os.cmdline) < 0)
return -1;
}
if (vmdef->os.initrd != NULL) {
if (virJSONValueObjectAppendString(payload, "initramfs", vmdef->os.initrd) < 0)
if (virJSONValueObjectAdd(&payload,
"s:kernel", vmdef->os.kernel,
"S:cmdline", vmdef->os.cmdline,
"S:initramfs", vmdef->os.initrd,
NULL) < 0)
return -1;
}
if (virJSONValueObjectAppend(content, "payload", &payload) < 0)
return -1;
return -1;
return 0;
}
@ -426,6 +448,23 @@ virCHMonitorBuildDevicesJson(virJSONValue *content,
return 0;
}
static int
virCHMonitorBuildPlatformJson(virJSONValue *content, virDomainDef *vmdef)
{
if (vmdef->sec &&
vmdef->sec->sectype == VIR_DOMAIN_LAUNCH_SECURITY_SEV_SNP) {
g_autoptr(virJSONValue) platform = virJSONValueNewObject();
if (virJSONValueObjectAppendBoolean(platform, "sev_snp", 1) < 0)
return -1;
if (virJSONValueObjectAppend(content, "platform", &platform) < 0)
return -1;
}
return 0;
}
static int
virCHMonitorBuildVMJson(virCHDriver *driver, virDomainDef *vmdef,
char **jsonstr)
@ -454,6 +493,8 @@ virCHMonitorBuildVMJson(virCHDriver *driver, virDomainDef *vmdef,
return -1;
}
if (virCHMonitorBuildPlatformJson(content, vmdef) < 0)
return -1;
if (virCHMonitorBuildDisksJson(content, vmdef) < 0)
return -1;
@ -798,6 +839,8 @@ virCHMonitorPutNoContent(virCHMonitor *mon, const char *endpoint,
if (responseCode == 200 || responseCode == 204)
ret = 0;
curl_slist_free_all(headers);
return ret;
}
@ -843,6 +886,7 @@ virCHMonitorGet(virCHMonitor *mon, const char *endpoint, virJSONValue **response
cleanup:
g_free(data.content);
curl_slist_free_all(headers);
/* reset the libcurl handle to avoid leaking a stack pointer to data */
curl_easy_reset(mon->handle);

View File

@ -53,13 +53,9 @@ virCHProcessConnectMonitor(virCHDriver *driver,
virDomainObj *vm,
int logfile)
{
virCHMonitor *monitor = NULL;
virCHDriverConfig *cfg = virCHDriverGetConfig(driver);
g_autoptr(virCHDriverConfig) cfg = virCHDriverGetConfig(driver);
monitor = virCHMonitorNew(vm, cfg, logfile);
virObjectUnref(cfg);
return monitor;
return virCHMonitorNew(vm, cfg, logfile);
}
static void
@ -344,6 +340,7 @@ virCHProcessSetupIOThreads(virDomainObj *vm)
virDomainIOThreadInfo **iothreads = NULL;
size_t i;
int niothreads;
int ret = -1;
if ((niothreads = virCHMonitorGetIOThreads(priv->monitor, &iothreads)) < 0)
return -1;
@ -351,9 +348,16 @@ virCHProcessSetupIOThreads(virDomainObj *vm)
for (i = 0; i < niothreads; i++) {
VIR_DEBUG("IOThread index = %zu , tid = %d", i, iothreads[i]->iothread_id);
if (virCHProcessSetupIOThread(vm, iothreads[i]) < 0)
return -1;
goto cleanup;
}
return 0;
ret = 0;
cleanup:
for (i = 0; i < niothreads; i++) {
virDomainIOThreadInfoFree(iothreads[i]);
}
g_free(iothreads);
return ret;
}
static int
@ -989,11 +993,11 @@ virCHProcessStop(virCHDriver *driver,
virDomainObj *vm,
virDomainShutoffReason reason)
{
g_autoptr(virCHDriverConfig) cfg = virCHDriverGetConfig(driver);
int ret;
int retries = 0;
unsigned int hostdev_flags = VIR_HOSTDEV_SP_PCI;
virCHDomainObjPrivate *priv = vm->privateData;
virCHDriverConfig *cfg = virCHDriverGetConfig(driver);
virDomainDef *def = vm->def;
size_t i;

View File

@ -1625,11 +1625,7 @@ virDomainVirtioSerialAddrSetAutoaddController(virDomainDef *def,
{
int contidx;
if (virDomainDefMaybeAddController(def,
VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL,
idx, -1) < 0)
return -1;
virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL, idx, -1);
contidx = virDomainControllerFind(def, VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL, idx);
if (virDomainVirtioSerialAddrSetAddController(addrs, def->controllers[contidx]) < 0)

View File

@ -75,6 +75,7 @@ virSEVCapabilitiesFree(virSEVCapability *cap)
g_free(cap->pdh);
g_free(cap->cert_chain);
g_free(cap->cpu0_id);
g_free(cap);
}

File diff suppressed because it is too large Load Diff

View File

@ -2362,6 +2362,13 @@ struct _virDomainLoaderDef {
virStorageSource *nvram;
bool newStyleNVRAM;
char *nvramTemplate; /* user override of path to master nvram */
/* Historically it was assumed that the format of the template and the
* actual nvram image are identical, which is no longer true.
*
* Note: if 'nvramTemplate' comes from the user and is not overriden by
* auto-detection nvramTemplateFormat may be VIR_STORAGE_FILE_NONE. Code
* shall assume that the template format matches if it isn't provided.
*/
virStorageFileFormat nvramTemplateFormat;
};
@ -2474,6 +2481,27 @@ typedef enum {
VIR_ENUM_DECL(virDomainOsDefFirmwareFeature);
typedef enum {
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAW,
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAWSET,
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_SLIC,
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_MSDM,
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST
} virDomainOsACPITable;
VIR_ENUM_DECL(virDomainOsACPITable);
struct _virDomainOSACPITableDef {
virDomainOsACPITable type;
char *path;
};
typedef struct _virDomainOSACPITableDef virDomainOSACPITableDef;
void virDomainOSACPITableDefFree(virDomainOSACPITableDef *def);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainOSACPITableDef, virDomainOSACPITableDefFree);
struct _virDomainOSDef {
int type;
virDomainOsDefFirmware firmware;
@ -2494,9 +2522,11 @@ struct _virDomainOSDef {
char *kernel;
char *initrd;
char *cmdline;
char *shim;
char *dtb;
char *root;
char *slic_table;
size_t nacpiTables;
virDomainOSACPITableDef **acpiTables;
virDomainLoaderDef *loader;
char *bootloader;
char *bootloaderArgs;
@ -3984,7 +4014,7 @@ int virDomainNetFindIdx(virDomainDef *def, virDomainNetDef *net);
virDomainNetDef *virDomainNetFind(virDomainDef *def, const char *device);
virDomainNetDef *virDomainNetFindByName(virDomainDef *def, const char *ifname);
bool virDomainHasNet(virDomainDef *def, virDomainNetDef *net);
int virDomainNetInsert(virDomainDef *def, virDomainNetDef *net);
void virDomainNetInsert(virDomainDef *def, virDomainNetDef *net);
void virDomainNetUpdate(virDomainDef *def, size_t netidx, virDomainNetDef *newnet);
bool virDomainNetBackendIsEqual(virDomainNetBackend *src,
virDomainNetBackend *dst);
@ -4123,7 +4153,7 @@ int virDiskNameToBusDeviceIndex(virDomainDiskDef *disk,
virDomainFSDef *virDomainGetFilesystemForTarget(virDomainDef *def,
const char *target);
int virDomainFSInsert(virDomainDef *def, virDomainFSDef *fs);
void virDomainFSInsert(virDomainDef *def, virDomainFSDef *fs);
int virDomainFSIndexByName(virDomainDef *def, const char *name);
virDomainFSDef *virDomainFSRemove(virDomainDef *def, size_t i);
ssize_t virDomainFSDefFind(virDomainDef *def,
@ -4203,8 +4233,8 @@ virDomainMemoryFindByDeviceAlias(virDomainDef *def,
const char *alias)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virDomainShmemDefInsert(virDomainDef *def, virDomainShmemDef *shmem)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
void virDomainShmemDefInsert(virDomainDef *def, virDomainShmemDef *shmem)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
bool virDomainShmemDefEquals(virDomainShmemDef *src, virDomainShmemDef *dst)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
ssize_t virDomainShmemDefFind(virDomainDef *def, virDomainShmemDef *shmem)
@ -4363,14 +4393,14 @@ virDomainDefAddController(virDomainDef *def,
virDomainControllerType type,
int idx,
int model);
int
void
virDomainDefAddUSBController(virDomainDef *def, int idx, int model);
int
bool
virDomainDefMaybeAddController(virDomainDef *def,
virDomainControllerType type,
int idx,
int model);
int
void
virDomainDefMaybeAddInput(virDomainDef *def,
int type,
int bus);

View File

@ -476,6 +476,13 @@ virDomainDiskDefValidateSourceChainOne(const virStorageSource *src)
{
virStorageType actualType = virStorageSourceGetActualType(src);
if (virStorageSourceGetActualType(src) == VIR_STORAGE_TYPE_NETWORK &&
src->protocol == VIR_STORAGE_NET_PROTOCOL_SHEEPDOG) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("'sheepdog' protocol is no longer supported by any hypervisor driver"));
return -1;
}
if (src->type == VIR_STORAGE_TYPE_NETWORK && src->auth) {
virStorageAuthDef *authdef = src->auth;
int actUsage;
@ -1726,6 +1733,12 @@ virDomainDefOSValidate(const virDomainDef *def,
}
}
if (def->os.shim && !def->os.kernel) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("shim only allowed with kernel option"));
return -1;
}
return 0;
}

View File

@ -1898,7 +1898,8 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt,
}
/* Extract custom metadata */
if ((metadataNode = virXPathNode("./metadata[1]", ctxt)) != NULL) {
if ((metadataNode = virXPathNode("./metadata[1]", ctxt)) != NULL &&
xmlFirstElementChild(metadataNode)) {
def->metadata = xmlCopyNode(metadataNode, 1);
virXMLNodeSanitizeNamespaces(def->metadata);
}

View File

@ -262,7 +262,7 @@ virNodeDeviceCapVPDFormatCustomField(virBuffer *buf,
virBufferAsprintf(&attrBuf, " index='%c'", field->idx);
virBufferEscapeString(&content, "%s", field->value);
virXMLFormatElementInternal(buf, fieldtype, &attrBuf, &content, false, false);
virXMLFormatElementDirect(buf, fieldtype, &attrBuf, &content);
}
static void

View File

@ -438,6 +438,11 @@
<data type="unsignedInt"/>
</element>
</optional>
<optional>
<element name="cpu0Id">
<data type="string"/>
</element>
</optional>
</element>
</define>

View File

@ -1552,6 +1552,11 @@
<text/>
</element>
</optional>
<optional>
<element name="shim">
<text/>
</element>
</optional>
<optional>
<element name="dtb">
<ref name="absFilePath"/>
@ -7180,7 +7185,12 @@
<zeroOrMore>
<element name="table">
<attribute name="type">
<value>slic</value>
<choice>
<value>raw</value>
<value>rawset</value>
<value>slic</value>
<value>msdm</value>
</choice>
</attribute>
<ref name="absFilePath"/>
</element>

View File

@ -1908,9 +1908,9 @@ virNetworkObjUpdateModificationImpact(virNetworkObj *obj,
*/
static int
virNetworkObjGetDefs(virNetworkObj *net,
unsigned int flags,
virNetworkDef **liveDef,
virNetworkDef **persDef)
unsigned int flags,
virNetworkDef **liveDef,
virNetworkDef **persDef)
{
if (liveDef)
*liveDef = NULL;
@ -1954,8 +1954,8 @@ virNetworkObjGetDefs(virNetworkObj *net,
*/
static virNetworkDef *
virNetworkObjGetOneDefState(virNetworkObj *net,
unsigned int flags,
bool *live)
unsigned int flags,
bool *live)
{
if (flags & VIR_NETWORK_UPDATE_AFFECT_LIVE &&
flags & VIR_NETWORK_UPDATE_AFFECT_CONFIG) {
@ -1993,7 +1993,7 @@ virNetworkObjGetOneDefState(virNetworkObj *net,
*/
static virNetworkDef *
virNetworkObjGetOneDef(virNetworkObj *net,
unsigned int flags)
unsigned int flags)
{
return virNetworkObjGetOneDefState(net, flags, NULL);
}
@ -2001,9 +2001,9 @@ virNetworkObjGetOneDef(virNetworkObj *net,
char *
virNetworkObjGetMetadata(virNetworkObj *net,
int type,
const char *uri,
unsigned int flags)
int type,
const char *uri,
unsigned int flags)
{
virNetworkDef *def;
char *ret = NULL;
@ -2051,10 +2051,10 @@ virNetworkObjGetMetadata(virNetworkObj *net,
static int
virNetworkDefSetMetadata(virNetworkDef *def,
int type,
const char *metadata,
const char *key,
const char *uri)
int type,
const char *metadata,
const char *key,
const char *uri)
{
g_autoptr(xmlDoc) doc = NULL;
xmlNodePtr old;
@ -2083,7 +2083,6 @@ virNetworkDefSetMetadata(virNetworkDef *def,
case VIR_NETWORK_METADATA_ELEMENT:
if (metadata) {
/* parse and modify the xml from the user */
if (!(doc = virXMLParseStringCtxt(metadata, _("(metadata_xml)"), NULL)))
return -1;
@ -2115,6 +2114,8 @@ virNetworkDefSetMetadata(virNetworkDef *def,
return -1;
}
new = NULL;
} else if (!xmlFirstElementChild(def->metadata)) {
g_clear_pointer(&def->metadata, xmlFreeNode);
}
break;
@ -2128,14 +2129,14 @@ virNetworkDefSetMetadata(virNetworkDef *def,
int
virNetworkObjSetMetadata(virNetworkObj *net,
int type,
const char *metadata,
const char *key,
const char *uri,
virNetworkXMLOption *xmlopt,
const char *stateDir,
const char *configDir,
unsigned int flags)
int type,
const char *metadata,
const char *key,
const char *uri,
virNetworkXMLOption *xmlopt,
const char *stateDir,
const char *configDir,
unsigned int flags)
{
virNetworkDef *def;
virNetworkDef *persistentDef;
@ -2156,7 +2157,7 @@ virNetworkObjSetMetadata(virNetworkObj *net,
if (persistentDef) {
if (virNetworkDefSetMetadata(persistentDef, type, metadata, key,
uri) < 0)
uri) < 0)
return -1;
if (virNetworkSaveConfig(configDir, persistentDef, xmlopt) < 0)

View File

@ -604,6 +604,8 @@ virCPUarmCpuDataFromRegs(virCPUarmData *data)
/* parse the corresponding vendor_id bits */
data->vendor_id = (cpuid >> 24) & 0xff;
VIR_DEBUG("CPU vendor 0x%02llx, pvr 0x%03llx", data->vendor_id, data->pvr);
features = g_new0(char *, MAX_CPU_FLAGS + 1);
/* shift bit map mask to parse for CPU flags */
@ -635,8 +637,8 @@ virCPUarmDecode(virCPUDef *cpu,
if (!(model = virCPUarmModelFindByPVR(map, cpuData->pvr))) {
virReportError(VIR_ERR_OPERATION_FAILED,
_("Cannot find CPU model with PVR 0x%1$03llx"),
cpuData->pvr);
_("Cannot find CPU model with PVR 0x%1$03llx, vendor id 0x%2$02llx"),
cpuData->pvr, cpuData->vendor_id);
return -1;
}

View File

@ -0,0 +1,6 @@
<cpus>
<model name='Ampere-1'>
<vendor name='Ampere'/>
<pvr value='0xac3'/>
</model>
</cpus>

View File

@ -0,0 +1,6 @@
<cpus>
<model name='Ampere-1a'>
<vendor name='Ampere'/>
<pvr value='0xac4'/>
</model>
</cpus>

View File

@ -13,4 +13,5 @@
<vendor name='Marvell' value='0x56'/>
<vendor name='Intel' value='0x69'/>
<vendor name='Phytium' value='0x70'/>
<vendor name='Ampere' value='0xc0'/>
</cpus>

View File

@ -222,5 +222,10 @@
<include filename='arm_FT-2000plus.xml'/>
<include filename='arm_Tengyun-S2500.xml'/>
</group>
<group name='Ampere-based CPU models'>
<include filename='arm_Ampere-1.xml'/>
<include filename='arm_Ampere-1a.xml'/>
</group>
</arch>
</cpus>

View File

@ -4616,7 +4616,6 @@ esxVI_LookupHostScsiTopologyLunListByTargetName
esxVI_HostScsiTopologyInterface *hostScsiInterfaceList = NULL;
esxVI_HostScsiTopologyInterface *hostScsiInterface = NULL;
esxVI_HostScsiTopologyTarget *hostScsiTopologyTarget = NULL;
bool found = false;
esxVI_HostInternetScsiTargetTransport *candidate = NULL;
ESX_VI_CHECK_ARG_LIST(hostScsiTopologyLunList);
@ -4653,22 +4652,20 @@ esxVI_LookupHostScsiTopologyLunListByTargetName
/* See vSphere API documentation about HostScsiTopologyInterface */
for (hostScsiInterface = hostScsiInterfaceList;
hostScsiInterface && !found;
hostScsiInterface && !hostScsiTopologyTarget;
hostScsiInterface = hostScsiInterface->_next) {
for (hostScsiTopologyTarget = hostScsiInterface->target;
hostScsiTopologyTarget;
hostScsiTopologyTarget = hostScsiTopologyTarget->_next) {
candidate = esxVI_HostInternetScsiTargetTransport_DynamicCast
(hostScsiTopologyTarget->transport);
esxVI_HostScsiTopologyTarget *target;
for (target = hostScsiInterface->target; target; target = target->_next) {
candidate = esxVI_HostInternetScsiTargetTransport_DynamicCast(target->transport);
if (candidate && STREQ(candidate->iScsiName, name)) {
found = true;
hostScsiTopologyTarget = target;
break;
}
}
}
if (!found || !hostScsiTopologyTarget)
if (!hostScsiTopologyTarget)
goto cleanup;
if (!hostScsiTopologyTarget->lun) {

View File

@ -1169,35 +1169,29 @@ hypervDomainAttachSyntheticEthernetAdapter(virDomainPtr domain,
/*
* Functions for deserializing device entries
*/
static int
static void
hypervDomainDefAppendController(virDomainDef *def,
int idx,
virDomainControllerType controllerType)
{
virDomainControllerDef *controller = NULL;
if (!(controller = virDomainControllerDefNew(controllerType)))
return -1;
virDomainControllerDef *controller = virDomainControllerDefNew(controllerType);
controller->idx = idx;
VIR_APPEND_ELEMENT(def->controllers, def->ncontrollers, controller);
return 0;
}
static int
static void
hypervDomainDefAppendIDEController(virDomainDef *def)
{
return hypervDomainDefAppendController(def, 0, VIR_DOMAIN_CONTROLLER_TYPE_IDE);
hypervDomainDefAppendController(def, 0, VIR_DOMAIN_CONTROLLER_TYPE_IDE);
}
static int
static void
hypervDomainDefAppendSCSIController(virDomainDef *def, int idx)
{
return hypervDomainDefAppendController(def, idx, VIR_DOMAIN_CONTROLLER_TYPE_SCSI);
hypervDomainDefAppendController(def, idx, VIR_DOMAIN_CONTROLLER_TYPE_SCSI);
}
@ -1464,18 +1458,12 @@ hypervDomainDefParseStorage(hypervPrivate *priv,
ideChannels[channel] = entry;
if (!hasIdeController) {
/* Hyper-V represents its PIIX4 controller's two channels as separate objects. */
if (hypervDomainDefAppendIDEController(def) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Could not add IDE controller"));
return -1;
}
hypervDomainDefAppendIDEController(def);
hasIdeController = true;
}
} else if (entry->data->ResourceType == MSVM_RASD_RESOURCETYPE_PARALLEL_SCSI_HBA) {
scsiControllers[scsi_idx++] = entry;
if (hypervDomainDefAppendSCSIController(def, scsi_idx - 1) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Could not parse SCSI controller"));
return -1;
}
hypervDomainDefAppendSCSIController(def, scsi_idx - 1);
}
entry = entry->next;

View File

@ -1010,6 +1010,9 @@ virDomainSaveFlags(virDomainPtr domain, const char *to,
* If VIR_DOMAIN_SAVE_PARAM_FILE is not provided then a managed save is
* performed (see virDomainManagedSave).
*
* See VIR_DOMAIN_SAVE_PARAM_* for detailed description of accepted save
* parameters.
*
* Returns 0 in case of success and -1 in case of failure.
*
* Since: 8.4.0
@ -12237,134 +12240,44 @@ virConnectGetDomainCapabilities(virConnectPtr conn,
* (although not necessarily implemented for each hypervisor):
*
* VIR_DOMAIN_STATS_STATE:
* Return domain state and reason for entering that state. The typed
* parameter keys are in this format:
*
* "state.state" - state of the VM, returned as int from virDomainState enum
* "state.reason" - reason for entering given state, returned as int from
* virDomain*Reason enum corresponding to given state.
* Return domain state and reason for entering that state.
* The VIR_DOMAIN_STATS_STATE_* constants define the known typed
* parameter keys.
*
* VIR_DOMAIN_STATS_CPU_TOTAL:
* Return CPU statistics and usage information. The typed parameter keys
* are in this format:
*
* "cpu.time" - total cpu time spent for this domain in nanoseconds
* as unsigned long long.
* "cpu.user" - user cpu time spent in nanoseconds as unsigned long long.
* "cpu.system" - system cpu time spent in nanoseconds as unsigned long
* long.
* "cpu.haltpoll.success.time" - halt-polling cpu usage about the VCPU polled
* until a virtual interrupt was delivered in
* nanoseconds as unsigned long long.
* "cpu.haltpoll.fail.time" - halt-polling cpu usage about the VCPU had to schedule
* out (either because the maximum poll time was reached
* or it needed to yield the CPU) in nanoseconds as
* unsigned long long.
* "cpu.cache.monitor.count" - the number of cache monitors for this domain
* "cpu.cache.monitor.<num>.name" - the name of cache monitor <num>
* "cpu.cache.monitor.<num>.vcpus" - vcpu list of cache monitor <num>
* "cpu.cache.monitor.<num>.bank.count" - the number of cache banks in
* cache monitor <num>
* "cpu.cache.monitor.<num>.bank.<index>.id" - host allocated cache id for
* bank <index> in cache
* monitor <num>
* "cpu.cache.monitor.<num>.bank.<index>.bytes" - the number of bytes of
* last level cache that the
* domain is using on cache
* bank <index>
* Return CPU statistics and usage information.
* The VIR_DOMAIN_STATS_CPU_* constants define the known typed
* parameter keys.
*
* VIR_DOMAIN_STATS_BALLOON:
* Return memory balloon device information.
* The typed parameter keys are in this format:
*
* "balloon.current" - the memory in kiB currently used
* as unsigned long long.
* "balloon.maximum" - the maximum memory in kiB allowed
* as unsigned long long.
* "balloon.swap_in" - the amount of data read from swap space (in KiB)
* as unsigned long long
* "balloon.swap_out" - the amount of memory written out to swap space
* (in KiB) as unsigned long long
* "balloon.major_fault" - the number of page faults when disk IO was
* required as unsigned long long
* "balloon.minor_fault" - the number of other page faults
* as unsigned long long
* "balloon.unused" - the amount of memory left unused by the system
* (in KiB) as unsigned long long
* "balloon.available" - the amount of usable memory as seen by the domain
* (in KiB) as unsigned long long
* "balloon.rss" - Resident Set Size of running domain's process
* (in KiB) as unsigned long long
* "balloon.usable" - the amount of memory which can be reclaimed by balloon
* without causing host swapping (in KiB)
* as unsigned long long
* "balloon.last-update" - timestamp of the last update of statistics
* (in seconds) as unsigned long long
* "balloon.disk_caches" - the amount of memory that can be reclaimed
* without additional I/O, typically disk (in KiB)
* as unsigned long long
* "balloon.hugetlb_pgalloc" - the number of successful huge page allocations
* from inside the domain via virtio balloon
* as unsigned long long
* "balloon.hugetlb_pgfail" - the number of failed huge page allocations
* from inside the domain via virtio balloon
* as unsigned long long
* The VIR_DOMAIN_STATS_BALLOON_* constants define the known typed
* parameter keys.
*
* VIR_DOMAIN_STATS_VCPU:
* Return virtual CPU statistics.
* Due to VCPU hotplug, the vcpu.<num>.* array could be sparse.
* The actual size of the array corresponds to "vcpu.current".
* The array size will never exceed "vcpu.maximum".
* The typed parameter keys are in this format:
* The VIR_DOMAIN_STATS_VCPU_* constants define the known typed
* parameter keys.
*
* "vcpu.current" - current number of online virtual CPUs as unsigned int.
* "vcpu.maximum" - maximum number of online virtual CPUs as unsigned int.
* "vcpu.<num>.state" - state of the virtual CPU <num>, as int
* from virVcpuState enum.
* "vcpu.<num>.time" - virtual cpu time spent by virtual CPU <num>
* as unsigned long long.
* "vcpu.<num>.wait" - time the vCPU <num> wants to run, but the host
* scheduler has something else running ahead of it.
* "vcpu.<num>.halted" - virtual CPU <num> is halted, may indicate the
* processor is idle or even disabled, depending
* on the architecture)
* "vcpu.<num>.delay" - time the vCPU <num> thread was enqueued by the
* host scheduler, but was waiting in the queue
* instead of running. Exposed to the VM as a steal
* time. (in nanoseconds)
*
* This group of statistics also reports additional hypervisor-originating
* per-vCPU stats. The hypervisor-specific statistics in this group have the
* following naming scheme:
* This group of statistics also reports additional hypervisor-originating
* per-vCPU stats. The hypervisor-specific statistics in this group have the
* following naming scheme:
*
* "vcpu.<num>.$NAME.$TYPE"
*
* $NAME - name of the statistics field provided by the hypervisor
* Where $NAME is an arbitrary choice of the hypervisor driver, for
* which no API constants are defined.
* The $TYPE values are defined by VIR_DOMAIN_STATS_CUSTOM_TYPE_*
* constants.
*
* $TYPE - Type of the value. The following types are returned:
* 'cur' - current instant value
* 'sum' - aggregate value
* 'max' - peak value
*
* The returned value may be either an unsigned long long or a boolean.
* Meaning is hypervisor specific. Please see the disclaimer for the
* VIR_DOMAIN_STATS_VM group below.
* The returned value may be either an unsigned long long or a boolean.
* Meaning is hypervisor specific. Please see the disclaimer for the
* VIR_DOMAIN_STATS_VM group below.
*
* VIR_DOMAIN_STATS_INTERFACE:
* Return network interface statistics (from domain point of view).
* The typed parameter keys are in this format:
*
* "net.count" - number of network interfaces on this domain
* as unsigned int.
* "net.<num>.name" - name of the interface <num> as string.
* "net.<num>.rx.bytes" - bytes received as unsigned long long.
* "net.<num>.rx.pkts" - packets received as unsigned long long.
* "net.<num>.rx.errs" - receive errors as unsigned long long.
* "net.<num>.rx.drop" - receive packets dropped as unsigned long long.
* "net.<num>.tx.bytes" - bytes transmitted as unsigned long long.
* "net.<num>.tx.pkts" - packets transmitted as unsigned long long.
* "net.<num>.tx.errs" - transmission errors as unsigned long long.
* "net.<num>.tx.drop" - transmit packets dropped as unsigned long long.
* The VIR_DOMAIN_STATS_NET_* constants define the known typed
* parameter keys.
*
* VIR_DOMAIN_STATS_BLOCK:
* Return block devices statistics. By default,
@ -12373,112 +12286,13 @@ virConnectGetDomainCapabilities(virConnectPtr conn,
* VIR_CONNECT_GET_ALL_DOMAINS_STATS_BACKING to @flags will expand the
* array to cover backing chains (block.count corresponds to the number
* of host resources used together to provide the guest disks).
* The typed parameter keys are in this format:
*
* "block.count" - number of block devices in the subsequent list,
* as unsigned int.
* "block.<num>.name" - name of the block device <num> as string.
* matches the target name (vda/sda/hda) of the
* block device. If the backing chain is listed,
* this name is the same for all host resources tied
* to the same guest device.
* "block.<num>.backingIndex" - unsigned int giving the <backingStore>
* index, only used when backing images
* are listed.
* "block.<num>.path" - string describing the source of block device <num>,
* if it is a file or block device (omitted for network
* sources and drives with no media inserted).
* "block.<num>.rd.reqs" - number of read requests as unsigned long long.
* "block.<num>.rd.bytes" - number of read bytes as unsigned long long.
* "block.<num>.rd.times" - total time (ns) spent on reads as
* unsigned long long.
* "block.<num>.wr.reqs" - number of write requests as unsigned long long.
* "block.<num>.wr.bytes" - number of written bytes as unsigned long long.
* "block.<num>.wr.times" - total time (ns) spent on writes as
* unsigned long long.
* "block.<num>.fl.reqs" - total flush requests as unsigned long long.
* "block.<num>.fl.times" - total time (ns) spent on cache flushing as
* unsigned long long.
* "block.<num>.errors" - Xen only: the 'oo_req' value as
* unsigned long long.
* "block.<num>.allocation" - offset of the highest written sector
* as unsigned long long.
* "block.<num>.capacity" - logical size in bytes of the block device
* backing image as unsigned long long.
* "block.<num>.physical" - physical size in bytes of the container of the
* backing image as unsigned long long.
* "block.<num>.threshold" - current threshold for delivering the
* VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD
* event in bytes. See virDomainSetBlockThreshold.
* The VIR_DOMAIN_STATS_BLOCK_* constants define the known typed
* parameter keys.
*
* VIR_DOMAIN_STATS_PERF:
* Return perf event statistics.
* The typed parameter keys are in this format:
*
* "perf.cmt" - the usage of l3 cache (bytes) by applications running on
* the platform as unsigned long long. It is produced by cmt
* perf event.
* "perf.mbmt" - the total system bandwidth (bytes/s) from one level of
* cache to another as unsigned long long. It is produced
* by mbmt perf event.
* "perf.mbml" - the amount of data (bytes/s) sent through the memory
* controller on the socket as unsigned long long. It is
* produced by mbml perf event.
* "perf.cache_misses" - the count of cache misses as unsigned long long.
* It is produced by cache_misses perf event.
* "perf.cache_references" - the count of cache hits as unsigned long long.
* It is produced by cache_references perf event.
* "perf.instructions" - The count of instructions as unsigned long long.
* It is produced by instructions perf event.
* "perf.cpu_cycles" - The count of cpu cycles (total/elapsed) as an
* unsigned long long. It is produced by cpu_cycles
* perf event.
* "perf.branch_instructions" - The count of branch instructions as
* unsigned long long. It is produced by
* branch_instructions perf event.
* "perf.branch_misses" - The count of branch misses as unsigned long
* long. It is produced by branch_misses perf event.
* "perf.bus_cycles" - The count of bus cycles as unsigned long
* long. It is produced by bus_cycles perf event.
* "perf.stalled_cycles_frontend" - The count of stalled cpu cycles in the
* frontend of the instruction processor
* pipeline as unsigned long long. It is
* produced by stalled_cycles_frontend
* perf event.
* "perf.stalled_cycles_backend" - The count of stalled cpu cycles in the
* backend of the instruction processor
* pipeline as unsigned long long. It is
* produced by stalled_cycles_backend
* perf event.
* "perf.ref_cpu_cycles" - The count of total cpu cycles not affected by
* CPU frequency scaling by applications running
* as unsigned long long. It is produced by the
* ref_cpu_cycles perf event.
* "perf.cpu_clock" - The count of cpu clock time as unsigned long long.
* It is produced by the cpu_clock perf event.
* "perf.task_clock" - The count of task clock time as unsigned long long.
* It is produced by the task_clock perf event.
* "perf.page_faults" - The count of page faults as unsigned long long.
* It is produced by the page_faults perf event
* "perf.context_switches" - The count of context switches as unsigned long
* long. It is produced by the context_switches
* perf event.
* "perf.cpu_migrations" - The count of cpu migrations, from one logical
* processor to another, as unsigned long
* long. It is produced by the cpu_migrations
* perf event.
* "perf.page_faults_min" - The count of minor page faults as unsigned
* long long. It is produced by the
* page_faults_min perf event.
* "perf.page_faults_maj" - The count of major page faults as unsigned
* long long. It is produced by the
* page_faults_maj perf event.
* "perf.alignment_faults" - The count of alignment faults as unsigned
* long long. It is produced by the
* alignment_faults perf event
* "perf.emulation_faults" - The count of emulation faults as unsigned
* long long. It is produced by the
* emulation_faults perf event
* The VIR_DOMAIN_STATS_PERF_* constants define the known typed
* parameter keys.
*
* VIR_DOMAIN_STATS_IOTHREAD:
* Return IOThread statistics if available. IOThread polling is a
@ -12499,70 +12313,19 @@ virConnectGetDomainCapabilities(virConnectPtr conn,
* which could quickly exceed poll-max-ns; however, a poll-shrink of
* 10 would cut that polling time more gradually.
*
* The typed parameter keys are in this format:
*
* "iothread.count" - maximum number of IOThreads in the subsequent list
* as unsigned int. Each IOThread in the list will
* will use it's iothread_id value as the <id>. There
* may be fewer <id> entries than the iothread.count
* value if the polling values are not supported.
* "iothread.<id>.poll-max-ns" - maximum polling time in ns as an unsigned
* long long. A 0 (zero) means polling is
* disabled.
* "iothread.<id>.poll-grow" - polling time factor as an unsigned int or
* unsigned long long if exceeding range of
* unsigned int.
* A 0 (zero) indicates to allow the underlying
* hypervisor to choose how to grow the
* polling time.
* "iothread.<id>.poll-shrink" - polling time divisor as an unsigned int or
* unsigned long long if exceeding range of
* unsigned int.
* A 0 (zero) indicates to allow the underlying
* hypervisor to choose how to shrink the
* polling time.
* The VIR_DOMAIN_STATS_IOTHREAD_* constants define the known typed
* parameter keys.
*
* VIR_DOMAIN_STATS_MEMORY:
* Return memory bandwidth statistics and the usage information. The typed
* parameter keys are in this format:
*
* "memory.bandwidth.monitor.count" - the number of memory bandwidth
* monitors for this domain
* "memory.bandwidth.monitor.<num>.name" - the name of monitor <num>
* "memory.bandwidth.monitor.<num>.vcpus" - the vcpu list of monitor <num>
* "memory.bandwidth.monitor.<num>.node.count" - the number of memory
* controller in monitor <num>
* "memory.bandwidth.monitor.<num>.node.<index>.id" - host allocated memory
* controller id for controller
* <index> of monitor <num>
* "memory.bandwidth.monitor.<num>.node.<index>.bytes.local" - the
* accumulative bytes consumed by @vcpus that passing
* through the memory controller in the same processor
* that the scheduled host CPU belongs to.
* "memory.bandwidth.monitor.<num>.node.<index>.bytes.total" - the total
* bytes consumed by @vcpus that passing through all
* memory controllers, either local or remote controller.
* The VIR_DOMAIN_STATS_MEMORY_* constants define the known typed
* parameter keys.
*
* VIR_DOMAIN_STATS_DIRTYRATE:
* Return memory dirty rate information. The typed parameter keys are in
* this format:
*
* "dirtyrate.calc_status" - the status of last memory dirty rate calculation,
* returned as int from virDomainDirtyRateStatus
* enum.
* "dirtyrate.calc_start_time" - the start time of last memory dirty rate
* calculation as long long.
* "dirtyrate.calc_period" - the period of last memory dirty rate calculation
* as int.
* "dirtyrate.megabytes_per_second" - the calculated memory dirty rate in
* MiB/s as long long. It is produced
* only if the calc_status is measured.
* "dirtyrate.calc_mode" - the calculation mode used last measurement, either
* of these 3 'page-sampling,dirty-bitmap,dirty-ring'
* values returned.
* "dirtyrate.vcpu.<num>.megabytes_per_second" - the calculated memory dirty
* rate for a virtual cpu as
* unsigned long long.
* Return memory dirty rate information.
* The VIR_DOMAIN_STATS_DIRTYRATE_* constants define the known typed
* parameter keys.
*
* VIR_DOMAIN_STATS_VM:
* Return hypervisor-specific statistics. Note that the naming and meaning
@ -12572,14 +12335,12 @@ virConnectGetDomainCapabilities(virConnectPtr conn,
*
* "vm.$NAME.$TYPE"
*
* $NAME - name of the statistics field provided by the hypervisor
* Where $NAME is an arbitrary choice of the hypervisor driver, for
* which no API constants are defined.
* The $TYPE values are defined by VIR_DOMAIN_STATS_CUSTOM_TYPE_*
* constants.
*
* $TYPE - Type of the value. The following types are returned:
* 'cur' - current instant value
* 'sum' - aggregate value
* 'max' - peak value
*
* The returned value may be either an unsigned long long or a boolean.
* The returned value may be either an unsigned long long or a boolean.
*
* WARNING:
* The stats reported in this group are runtime-collected and
@ -12629,6 +12390,63 @@ virConnectGetDomainCapabilities(virConnectPtr conn,
* VIR_CONNECT_GET_ALL_DOMAINS_STATS_SHUTOFF and/or
* VIR_CONNECT_GET_ALL_DOMAINS_STATS_OTHER for all other states.
*
* In a number of cases the parameters returned are representing
* arrays of data items. In these cases multiple VIR_DOMAIN_STATS*
* constants will need to be concatenated to form a complete typed
* parameter key. The design pattern for handling array entries is
* as follows
*
* - VIR_DOMAIN_STATS_nnnnn_COUNT
*
* Defines the upper limit on the number of elements that will
* be returned. In some cases the array information may be
* sparsely populated, so it is not considered an error if a
* given element does not exist. Applications should check for
* each possible element upto the declared limit.
*
* - VIR_DOMAIN_STATS_nnnnn_PREFIX
*
* Defines the prefix to be used to construct the typed parameter
* key for an array element, including the trailing '.'. The prefix
* must have an array index appended, along with a suffix.
*
* - VIR_DOMAIN_STATS_nnnnn_SUFFIX_mmmmm
*
* Defines the suffix for accessing a particular data item within
* the array element, including the leading '.'. The suffix must
* have an array prefix and index prepended.
*
* As an example, assuming a printf-like formatting approach an
* application would construct a key as follows:
*
* format(VIR_DOMAIN_STATS_CPU_CACHE_MONITOR_PREFIX +
* "%d" +
* VIR_DOMAIN_STATS_CPU_CACHE_MONITOR_SUFFIX_VCPUS
* index)
*
* Which, when index==3, would result in the key "cpu.cache.monitor.3.vcpus"
*
* In some cases there may be nested arrays, in which case the key
* is formed by concatenating multiple prefixes and suffixes with
* mutliple array indexes. For example:
*
* format(VIR_DOMAIN_STATS_CPU_CACHE_MONITOR_PREFIX +
* "%d" +
* VIR_DOMAIN_STATS_CPU_CACHE_MONITOR_SUFFIX_BANK_PREFIX +
* "%d" +
* VIR_DOMAIN_STATS_CPU_CACHE_MONITOR_SUFFIX_BANK_SUFFIX_BYTES
* monindex, bankindex)
*
* Which, when monindex==3 and bankindex==7, would result in the
* key "cpu.cache.monitor.3.bank.7.bytes".
*
* NB, for the VIR_DOMAIN_STATS_* constants, if the `Since`
* tag is set to `11.2.0` this is usually representing the
* release when the constant was first introduced to the public
* API. Most of these typed parameter keys will have been
* introduced in earlier libvirt releases, prior to the definition
* of the constants.
*
* Returns the count of returned statistics structures on success, -1 on error.
* The requested data are returned in the @retStats parameter. The returned
* array should be freed by the caller. See virDomainStatsRecordListFree.
@ -13199,98 +13017,46 @@ virDomainSetVcpu(virDomainPtr domain,
* (although not necessarily implemented for each hypervisor):
*
* VIR_DOMAIN_GUEST_INFO_USERS:
* returns information about users that are currently logged in within the
* guest domain. The typed parameter keys are in this format:
*
* "user.count" - the number of active users on this domain as an
* unsigned int
* "user.<num>.name" - username of the user as a string
* "user.<num>.domain" - domain of the user as a string (may only be
* present on certain guest types)
* "user.<num>.login-time" - the login time of a user in milliseconds
* since the epoch as unsigned long long
* Return information about users that are currently logged in within the
* guest domain.
* The VIR_DOMAIN_GUEST_INFO_USER_* constants define the known typed parameter
* keys.
*
* VIR_DOMAIN_GUEST_INFO_OS:
* Return information about the operating system running within the guest. The
* typed parameter keys are in this format:
*
* "os.id" - a string identifying the operating system
* "os.name" - the name of the operating system, suitable for presentation
* to a user, as a string
* "os.pretty-name" - a pretty name for the operating system, suitable for
* presentation to a user, as a string
* "os.version" - the version of the operating system suitable for
* presentation to a user, as a string
* "os.version-id" - the version id of the operating system suitable for
* processing by scripts, as a string
* "os.kernel-release" - the release of the operating system kernel, as a
* string
* "os.kernel-version" - the version of the operating system kernel, as a
* string
* "os.machine" - the machine hardware name as a string
* "os.variant" - a specific variant or edition of the operating system
* suitable for presentation to a user, as a string
* "os.variant-id" - the id for a specific variant or edition of the
* operating system, as a string
* Return information about the operating system running within the guest.
* The VIR_DOMAIN_GUEST_INFO_OS_* constants define the known typed parameter
* keys.
*
* VIR_DOMAIN_GUEST_INFO_TIMEZONE:
* Returns information about the timezone within the domain. The typed
* parameter keys are in this format:
*
* "timezone.name" - the name of the timezone as a string
* "timezone.offset" - the offset to UTC in seconds as an int
*
* VIR_DOMAIN_GUEST_INFO_FILESYSTEM:
* Returns information about the filesystems within the domain. The typed
* parameter keys are in this format:
*
* "fs.count" - the number of filesystems defined on this domain
* as an unsigned int
* "fs.<num>.mountpoint" - the path to the mount point for the filesystem
* "fs.<num>.name" - device name in the guest (e.g. "sda1")
* "fs.<num>.fstype" - the type of filesystem
* "fs.<num>.total-bytes" - the total size of the filesystem
* "fs.<num>.used-bytes" - the number of bytes used in the filesystem
* "fs.<num>.disk.count" - the number of disks targeted by this filesystem
* "fs.<num>.disk.<num>.alias" - the device alias of the disk (e.g. sda)
* "fs.<num>.disk.<num>.serial" - the serial number of the disk
* "fs.<num>.disk.<num>.device" - the device node of the disk
*
* VIR_DOMAIN_GUEST_INFO_DISKS:
* Returns information about the disks within the domain. The typed
* parameter keys are in this format:
*
* "disk.count" - the number of disks defined on this domain
* as an unsigned int
* "disk.<num>.name" - device node (Linux) or device UNC (Windows)
* "disk.<num>.partition" - whether this is a partition or disk
* "disk.<num>.dependency.count" - the number of device dependencies
* e.g. for LVs of the LVM this will
* hold the list of PVs, for LUKS encrypted volume this will
* contain the disk where the volume is placed. (Linux)
* "disk.<num>.dependency.<num>.name" - a dependency
* "disk.<num>.serial" - optional disk serial number (as string)
* "disk.<num>.alias" - the device alias of the disk (e.g. sda)
* "disk.<num>.guest_alias" - optional alias assigned to the disk, on Linux
* this is a name assigned by device mapper
* Returns information about the timezone within the domain.
* The VIR_DOMAIN_GUEST_INFO_TIMEZONE_* constants define the known typed parameter
* keys.
*
* VIR_DOMAIN_GUEST_INFO_HOSTNAME:
* Returns information about the hostname of the domain. The typed
* parameter keys are in this format:
* Returns information about the hostname of the domain.
* The VIR_DOMAIN_GUEST_INFO_HOSTNAME_* constants define the known typed parameter
* keys.
*
* "hostname" - the hostname of the domain
* VIR_DOMAIN_GUEST_INFO_FILESYSTEM:
* Returns information about the filesystems within the domain.
* The VIR_DOMAIN_GUEST_INFO_FS_* constants define the known typed parameter
* keys.
*
* VIR_DOMAIN_GUEST_INFO_DISKS:
* Returns information about the disks within the domain.
* The VIR_DOMAIN_GUEST_INFO_DISK_* constants define the known typed parameter
* keys.
*
* VIR_DOMAIN_GUEST_INFO_INTERFACES:
* Returns information about the interfaces within the domain. The typed
* parameter keys are in this format:
* Returns information about the interfaces within the domain.
* The VIR_DOMAIN_GUEST_INFO_IF_* constants define the known typed parameter
* keys.
*
* "if.count" - the number of interfaces defined on this domain
* "if.<num>.name" - name in the guest (e.g. ``eth0``) for interface <num>
* "if.<num>.hwaddr" - hardware address in the guest for interface <num>
* "if.<num>.addr.count - the number of IP addresses of interface <num>
* "if.<num>.addr.<num1>.type" - the IP address type of addr <num1> (e.g. ipv4)
* "if.<num>.addr.<num1>.addr" - the IP address of addr <num1>
* "if.<num>.addr.<num1>.prefix" - the prefix of IP address of addr <num1>
* VIR_DOMAIN_GUEST_INFO_LOAD:
* Returns load (the number of processes in the runqueue or waiting for disk
* I/O).
* The VIR_DOMAIN_GUEST_INFO_LOAD_* constants define the known typed parameter
* keys.
*
* Using 0 for @types returns all information groups supported by the given
* hypervisor.
@ -13298,6 +13064,63 @@ virDomainSetVcpu(virDomainPtr domain,
* This API requires the VM to run. The caller is responsible for calling
* virTypedParamsFree to free memory returned in @params.
*
* In a number of cases the parameters returned are representing
* arrays of data items. In these cases multiple VIR_DOMAIN_GUEST_INFO*
* constants will need to be concatenated to form a complete typed
* parameter key. The design pattern for handling array entries is
* as follows
*
* - VIR_DOMAIN_GUEST_INFO_nnnnn_COUNT
*
* Defines the upper limit on the number of elements that will
* be returned. In some cases the array information may be
* sparsely populated, so it is not considered an error if a
* given element does not exist. Applications should check for
* each possible element upto the declared limit.
*
* - VIR_DOMAIN_GUEST_INFO_nnnnn_PREFIX
*
* Defines the prefix to be used to construct the typed parameter
* key for an array element, including the trailing '.'. The prefix
* must have an array index appended, along with a suffix.
*
* - VIR_DOMAIN_GUEST_INFO_nnnnn_SUFFIX_mmmmm
*
* Defines the suffix for accessing a particular data item within
* the array element, including the leading '.'. The suffix must
* have an array prefix and index prepended.
*
* As an example, assuming a printf-like formatting approach an
* application would construct a key as follows:
*
* format(VIR_DOMAIN_GUEST_INFO_FS_PREFIX +
* "%d" +
* VIR_DOMAIN_GUEST_INFO_FS_SUFFIX_NAME,
* index)
*
* Which, when index==3, would result in the key "fs.3.name"
*
* In some cases there may be nested arrays, in which case the key
* is formed by concatenating multiple prefixes and suffixes with
* mutliple array indexes. For example:
*
* format(VIR_DOMAIN_GUEST_INFO_FS_PREFIX +
* "%d" +
* VIR_DOMAIN_GUEST_INFO_FS_SUFFIX_DISK_PREFIX +
* "%d" +
* VIR_DOMAIN_GUEST_INFO_FS_SUFFIX_DISK_SUFFIX_SERIAL
* fsindex, diskindex)
*
* Which, when fsindex==3 and diskindex==7, would result in the
* key "fs.3.disk.7.serial".
*
* NB, for the VIR_DOMAIN_GUEST_INFO_* constants, if the `Since`
* tag is set to `11.2.0` this is usually representing the
* release when the constant was first introduced to the public
* API. Most of these typed parameter keys will have been
* introduced in earlier libvirt releases, prior to the definition
* of the constants.
*
* Returns 0 on success, -1 on error.
*
* Since: 5.7.0

View File

@ -611,6 +611,8 @@ virDomainObjTaint;
virDomainObjUpdateModificationImpact;
virDomainObjWait;
virDomainObjWaitUntil;
virDomainOsACPITableTypeFromString;
virDomainOsACPITableTypeToString;
virDomainOsDefFirmwareTypeFromString;
virDomainOsDefFirmwareTypeToString;
virDomainOSTypeFromString;
@ -3277,7 +3279,6 @@ virProcessWait;
# util/virqemu.h
virQEMUBuildBufferEscapeComma;
virQEMUBuildCommandLineJSON;
virQEMUBuildCommandLineJSONArrayBitmap;
virQEMUBuildCommandLineJSONArrayNumbered;
virQEMUBuildCommandLineJSONArrayObjectsStr;
@ -3462,6 +3463,7 @@ virSkipToDigit;
virStrcpy;
virStringBufferIsPrintable;
virStringFilterChars;
virStringFormatHex;
virStringHasCaseSuffix;
virStringHasChars;
virStringHasControlChars;
@ -3779,8 +3781,8 @@ virXMLBufferCreate;
virXMLCheckIllegalChars;
virXMLExtractNamespaceXML;
virXMLFormatElement;
virXMLFormatElementDirect;
virXMLFormatElementEmpty;
virXMLFormatElementInternal;
virXMLFormatMetadata;
virXMLNewNode;
virXMLNodeContentString;

View File

@ -582,8 +582,9 @@ libxlMakeDomBuildInfo(virDomainDef *def,
VIR_TRISTATE_SWITCH_ON);
#endif
/* copy SLIC table path to acpi_firmware */
b_info->u.hvm.acpi_firmware = g_strdup(def->os.slic_table);
/* copy the table path to acpi_firmware */
if (def->os.nacpiTables)
b_info->u.hvm.acpi_firmware = g_strdup(def->os.acpiTables[0]->path);
if (def->nsounds > 0) {
/*
@ -2102,9 +2103,7 @@ libxlMakeDefaultUSBControllers(virDomainDef *def,
x_controllers = g_new0(libxl_device_usbctrl, ncontrollers);
for (i = 0; i < ncontrollers; i++) {
if (!(l_controller = virDomainControllerDefNew(VIR_DOMAIN_CONTROLLER_TYPE_USB)))
goto error;
l_controller = virDomainControllerDefNew(VIR_DOMAIN_CONTROLLER_TYPE_USB);
l_controller->model = VIR_DOMAIN_CONTROLLER_MODEL_USB_QUSB2;
l_controller->idx = i;
l_controller->opts.usbopts.ports = 8;

View File

@ -266,8 +266,7 @@ libxlDomainDefPostParse(virDomainDef *def,
}
/* add implicit input devices */
if (xenDomainDefAddImplicitInputDevice(def) < 0)
return -1;
xenDomainDefAddImplicitInputDevice(def);
/* For x86_64 HVM */
if (def->os.type == VIR_DOMAIN_OSTYPE_HVM &&
@ -292,8 +291,7 @@ libxlDomainDefPostParse(virDomainDef *def,
/* add implicit xenbus device */
if (virDomainControllerFindByType(def, VIR_DOMAIN_CONTROLLER_TYPE_XENBUS) == -1)
if (virDomainDefAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_XENBUS, -1, -1) == NULL)
return -1;
virDomainDefAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_XENBUS, -1, -1);
return 0;
}
@ -306,6 +304,7 @@ libxlDomainDefValidate(const virDomainDef *def,
libxlDriverPrivate *driver = opaque;
g_autoptr(libxlDriverConfig) cfg = libxlDriverConfigGet(driver);
bool reqSecureBoot = false;
size_t i;
if (!virCapabilitiesDomainSupported(cfg->caps, def->os.type,
def->os.arch,
@ -330,6 +329,33 @@ libxlDomainDefValidate(const virDomainDef *def,
return -1;
}
for (i = 0; i < def->os.nacpiTables; i++) {
switch (def->os.acpiTables[i]->type) {
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_SLIC: /* Back compat for historical mistake,
* functionally the same as 'rawset' */
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAWSET:
break;
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAW:
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_MSDM:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("ACPI table type '%1$s' is not supported"),
virDomainOsACPITableTypeToString(def->os.acpiTables[i]->type));
return -1;
default:
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST:
virReportEnumRangeError(virDomainOsACPITable,
def->os.acpiTables[i]->type);
return -1;
}
}
if (def->os.nacpiTables > 1) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Only a single ACPI table is supported"));
return -1;
}
if (def->nsounds > 0) {
virDomainSoundDef *snd = def->sounds[0];

View File

@ -3205,10 +3205,7 @@ libxlDomainAttachHostUSBDevice(libxlDriverPrivate *driver,
if (ports <= usbdevs) {
/* no free ports, we will create a new usb controller */
virDomainControllerDef *controller;
if (!(controller = virDomainControllerDefNew(VIR_DOMAIN_CONTROLLER_TYPE_USB)))
goto cleanup;
virDomainControllerDef *controller = virDomainControllerDefNew(VIR_DOMAIN_CONTROLLER_TYPE_USB);
controller->model = VIR_DOMAIN_CONTROLLER_MODEL_USB_QUSB2;
controller->idx = -1;
@ -3508,7 +3505,6 @@ static int
libxlDomainAttachDeviceConfig(virDomainDef *vmdef, virDomainDeviceDef *dev)
{
virDomainDiskDef *disk;
virDomainNetDef *net;
virDomainHostdevDef *hostdev;
virDomainControllerDef *controller;
virDomainHostdevDef *found;
@ -3542,16 +3538,13 @@ libxlDomainAttachDeviceConfig(virDomainDef *vmdef, virDomainDeviceDef *dev)
break;
case VIR_DOMAIN_DEVICE_NET:
net = dev->data.net;
if (virDomainHasNet(vmdef, net)) {
if (virDomainHasNet(vmdef, dev->data.net)) {
virReportError(VIR_ERR_INVALID_ARG,
_("network device with mac %1$s already exists"),
virMacAddrFormat(&net->mac, mac));
virMacAddrFormat(&dev->data.net->mac, mac));
return -1;
}
if (virDomainNetInsert(vmdef, net))
return -1;
dev->data.net = NULL;
virDomainNetInsert(vmdef, g_steal_pointer(&dev->data.net));
break;
case VIR_DOMAIN_DEVICE_HOSTDEV:

View File

@ -445,9 +445,7 @@ xenParsePCI(char *entry)
}
}
if (!(hostdev = virDomainHostdevDefNew()))
return NULL;
hostdev = virDomainHostdevDefNew();
hostdev->managed = false;
hostdev->writeFiltering = filtered;
hostdev->source.subsys.type = VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI;
@ -2390,7 +2388,7 @@ xenFormatConfigCommon(virConf *conf,
}
int
void
xenDomainDefAddImplicitInputDevice(virDomainDef *def)
{
virDomainInputBus implicitInputBus = VIR_DOMAIN_INPUT_BUS_XEN;
@ -2398,15 +2396,6 @@ xenDomainDefAddImplicitInputDevice(virDomainDef *def)
if (def->os.type == VIR_DOMAIN_OSTYPE_HVM)
implicitInputBus = VIR_DOMAIN_INPUT_BUS_PS2;
if (virDomainDefMaybeAddInput(def,
VIR_DOMAIN_INPUT_TYPE_MOUSE,
implicitInputBus) < 0)
return -1;
if (virDomainDefMaybeAddInput(def,
VIR_DOMAIN_INPUT_TYPE_KBD,
implicitInputBus) < 0)
return -1;
return 0;
virDomainDefMaybeAddInput(def, VIR_DOMAIN_INPUT_TYPE_MOUSE, implicitInputBus);
virDomainDefMaybeAddInput(def, VIR_DOMAIN_INPUT_TYPE_KBD, implicitInputBus);
}

View File

@ -65,4 +65,4 @@ int xenFormatConfigCommon(virConf *conf,
char *xenMakeIPList(virNetDevIPInfo *guestIP);
int xenDomainDefAddImplicitInputDevice(virDomainDef *def);
void xenDomainDefAddImplicitInputDevice(virDomainDef *def);

View File

@ -106,6 +106,7 @@ xenParseXLOS(virConf *conf, virDomainDef *def, virCaps *caps)
g_autofree char *bios = NULL;
g_autofree char *bios_path = NULL;
g_autofree char *boot = NULL;
g_autofree char *slic = NULL;
int val = 0;
if (xenConfigGetString(conf, "bios", &bios, NULL) < 0)
@ -133,8 +134,15 @@ xenParseXLOS(virConf *conf, virDomainDef *def, virCaps *caps)
}
}
if (xenConfigCopyStringOpt(conf, "acpi_firmware", &def->os.slic_table) < 0)
if (xenConfigCopyStringOpt(conf, "acpi_firmware", &slic) < 0)
return -1;
if (slic != NULL) {
def->os.nacpiTables = 1;
def->os.acpiTables = g_new0(virDomainOSACPITableDef *, 1);
def->os.acpiTables[0] = g_new0(virDomainOSACPITableDef, 1);
def->os.acpiTables[0]->type = VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAWSET;
def->os.acpiTables[0]->path = g_steal_pointer(&slic);
}
if (xenConfigCopyStringOpt(conf, "kernel", &def->os.kernel) < 0)
return -1;
@ -861,9 +869,7 @@ xenParseXLUSBController(virConf *conf, virDomainDef *def)
else
usbctrl_type = VIR_DOMAIN_CONTROLLER_MODEL_USB_QUSB2;
if (!(controller = virDomainControllerDefNew(VIR_DOMAIN_CONTROLLER_TYPE_USB)))
return -1;
controller = virDomainControllerDefNew(VIR_DOMAIN_CONTROLLER_TYPE_USB);
controller->type = VIR_DOMAIN_CONTROLLER_TYPE_USB;
controller->model = usbctrl_type;
controller->opts.usbopts.ports = usbctrl_ports;
@ -924,9 +930,7 @@ xenParseXLUSB(virConf *conf, virDomainDef *def)
key = nextkey;
}
if (!(hostdev = virDomainHostdevDefNew()))
return -1;
hostdev = virDomainHostdevDefNew();
hostdev->managed = false;
hostdev->source.subsys.type = VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB;
hostdev->source.subsys.u.usb.bus = busNum;
@ -1134,8 +1138,9 @@ xenFormatXLOS(virConf *conf, virDomainDef *def)
return -1;
}
if (def->os.slic_table &&
xenConfigSetString(conf, "acpi_firmware", def->os.slic_table) < 0)
if (def->os.nacpiTables &&
xenConfigSetString(conf, "acpi_firmware",
def->os.acpiTables[0]->path) < 0)
return -1;
if (def->os.kernel &&

View File

@ -2961,7 +2961,6 @@ lxcDomainAttachDeviceConfig(virDomainDef *vmdef,
{
int ret = -1;
virDomainDiskDef *disk;
virDomainNetDef *net;
virDomainHostdevDef *hostdev;
switch (dev->type) {
@ -2979,10 +2978,7 @@ lxcDomainAttachDeviceConfig(virDomainDef *vmdef,
break;
case VIR_DOMAIN_DEVICE_NET:
net = dev->data.net;
if (virDomainNetInsert(vmdef, net) < 0)
return -1;
dev->data.net = NULL;
virDomainNetInsert(vmdef, g_steal_pointer(&dev->data.net));
ret = 0;
break;

View File

@ -377,10 +377,6 @@ static virDomainHostdevDef *
lxcCreateHostdevDef(const char *data)
{
virDomainHostdevDef *hostdev = virDomainHostdevDefNew();
if (!hostdev)
return NULL;
hostdev->mode = VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIES;
hostdev->source.caps.type = VIR_DOMAIN_HOSTDEV_CAPS_TYPE_NET;
hostdev->source.caps.u.net.ifname = g_strdup(data);

View File

@ -802,6 +802,8 @@ networkStateCleanup(void)
network_driver->lockFD);
}
virInhibitorFree(network_driver->inhibitor);
virObjectUnref(network_driver->config);
virObjectUnref(network_driver->dnsmasqCaps);
@ -3973,8 +3975,7 @@ networkAllocatePort(virNetworkObj *obj,
else if (netdef->vlan.nTags > 0)
vlan = &netdef->vlan;
if (vlan && virNetDevVlanCopy(&port->vlan, vlan) < 0)
return -1;
virNetDevVlanCopy(&port->vlan, vlan);
}
if (!port->trustGuestRxFilters) {

View File

@ -754,11 +754,21 @@ nwfilterBindingCreateXML(virConnectPtr conn,
if (!(ret = virGetNWFilterBinding(conn, def->portdevname, def->filter)))
goto cleanup;
VIR_WITH_MUTEX_LOCK_GUARD(&driver->updateLock) {
if (virNWFilterInstantiateFilter(driver, def) < 0) {
virNWFilterBindingObjListRemove(driver->bindings, obj);
g_clear_pointer(&ret, virObjectUnref);
goto cleanup;
/*
* XXX: holding 'driverMutex' here is a very bad thing for
* concurrency but we have no choice. The instantiate process
* will acquire locks on multiple filters in arbitrary order.
* Unless we serialize on 'driverMutex', this risks deadlock
* with other APIs (eg list all filters) which also acquire
* locks on mutliple filters in arbitrarily different order.
*/
VIR_WITH_MUTEX_LOCK_GUARD(&driverMutex) {
VIR_WITH_MUTEX_LOCK_GUARD(&driver->updateLock) {
if (virNWFilterInstantiateFilter(driver, def) < 0) {
virNWFilterBindingObjListRemove(driver->bindings, obj);
g_clear_pointer(&ret, virObjectUnref);
goto cleanup;
}
}
}
@ -783,6 +793,9 @@ nwfilterBindingCreateXML(virConnectPtr conn,
static int
nwfilterBindingDelete(virNWFilterBindingPtr binding)
{
/* XXX: holding driverMutex is very bad for concurrency
* see nwfilterBindingCreate comment for more info */
VIR_LOCK_GUARD lock = virLockGuardLock(&driverMutex);
virNWFilterBindingObj *obj;
virNWFilterBindingDef *def;
int ret = -1;

View File

@ -2172,9 +2172,7 @@ qemuAgentSetUserPassword(qemuAgent *agent,
*/
int
qemuAgentGetUsers(qemuAgent *agent,
virTypedParameterPtr *params,
int *nparams,
int *maxparams,
virTypedParamList *list,
bool report_unsupported)
{
g_autoptr(virJSONValue) cmd = NULL;
@ -2199,13 +2197,10 @@ qemuAgentGetUsers(qemuAgent *agent,
ndata = virJSONValueArraySize(data);
if (virTypedParamsAddUInt(params, nparams, maxparams,
"user.count", ndata) < 0)
return -1;
virTypedParamListAddUInt(list, ndata, VIR_DOMAIN_GUEST_INFO_USER_COUNT);
for (i = 0; i < ndata; i++) {
virJSONValue *entry = virJSONValueArrayGet(data, i);
char param_name[VIR_TYPED_PARAM_FIELD_LENGTH];
const char *strvalue;
double logintime;
@ -2221,30 +2216,21 @@ qemuAgentGetUsers(qemuAgent *agent,
return -1;
}
g_snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH, "user.%zu.name", i);
if (virTypedParamsAddString(params, nparams, maxparams,
param_name, strvalue) < 0)
return -1;
virTypedParamListAddString(list, strvalue,
VIR_DOMAIN_GUEST_INFO_USER_PREFIX "%zu" VIR_DOMAIN_GUEST_INFO_USER_SUFFIX_NAME, i);
/* 'domain' is only present for windows guests */
if ((strvalue = virJSONValueObjectGetString(entry, "domain"))) {
g_snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH,
"user.%zu.domain", i);
if (virTypedParamsAddString(params, nparams, maxparams,
param_name, strvalue) < 0)
return -1;
}
if ((strvalue = virJSONValueObjectGetString(entry, "domain")))
virTypedParamListAddString(list, strvalue,
VIR_DOMAIN_GUEST_INFO_USER_PREFIX "%zu" VIR_DOMAIN_GUEST_INFO_USER_SUFFIX_DOMAIN, i);
if (virJSONValueObjectGetNumberDouble(entry, "login-time", &logintime) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("'login-time' missing in reply of guest-get-users"));
return -1;
}
g_snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH,
"user.%zu.login-time", i);
if (virTypedParamsAddULLong(params, nparams, maxparams,
param_name, logintime * 1000) < 0)
return -1;
virTypedParamListAddULLong(list, logintime * 1000,
VIR_DOMAIN_GUEST_INFO_USER_PREFIX "%zu" VIR_DOMAIN_GUEST_INFO_USER_SUFFIX_LOGIN_TIME, i);
}
return 0;
@ -2257,9 +2243,7 @@ qemuAgentGetUsers(qemuAgent *agent,
*/
int
qemuAgentGetOSInfo(qemuAgent *agent,
virTypedParameterPtr *params,
int *nparams,
int *maxparams,
virTypedParamList *list,
bool report_unsupported)
{
g_autoptr(virJSONValue) cmd = NULL;
@ -2284,22 +2268,19 @@ qemuAgentGetOSInfo(qemuAgent *agent,
do { \
const char *result; \
if ((result = virJSONValueObjectGetString(data, agent_string_))) { \
if (virTypedParamsAddString(params, nparams, maxparams, \
param_string_, result) < 0) { \
return -1; \
} \
virTypedParamListAddString(list, result, param_string_); \
} \
} while (0)
OSINFO_ADD_PARAM("id", "os.id");
OSINFO_ADD_PARAM("name", "os.name");
OSINFO_ADD_PARAM("pretty-name", "os.pretty-name");
OSINFO_ADD_PARAM("version", "os.version");
OSINFO_ADD_PARAM("version-id", "os.version-id");
OSINFO_ADD_PARAM("machine", "os.machine");
OSINFO_ADD_PARAM("variant", "os.variant");
OSINFO_ADD_PARAM("variant-id", "os.variant-id");
OSINFO_ADD_PARAM("kernel-release", "os.kernel-release");
OSINFO_ADD_PARAM("kernel-version", "os.kernel-version");
OSINFO_ADD_PARAM("id", VIR_DOMAIN_GUEST_INFO_OS_ID);
OSINFO_ADD_PARAM("name", VIR_DOMAIN_GUEST_INFO_OS_NAME);
OSINFO_ADD_PARAM("pretty-name", VIR_DOMAIN_GUEST_INFO_OS_PRETTY_NAME);
OSINFO_ADD_PARAM("version", VIR_DOMAIN_GUEST_INFO_OS_VERSION);
OSINFO_ADD_PARAM("version-id", VIR_DOMAIN_GUEST_INFO_OS_VERSION_ID);
OSINFO_ADD_PARAM("machine", VIR_DOMAIN_GUEST_INFO_OS_MACHINE);
OSINFO_ADD_PARAM("variant", VIR_DOMAIN_GUEST_INFO_OS_VARIANT);
OSINFO_ADD_PARAM("variant-id", VIR_DOMAIN_GUEST_INFO_OS_VARIANT_ID);
OSINFO_ADD_PARAM("kernel-release", VIR_DOMAIN_GUEST_INFO_OS_KERNEL_RELEASE);
OSINFO_ADD_PARAM("kernel-version", VIR_DOMAIN_GUEST_INFO_OS_KERNEL_VERSION);
return 0;
}
@ -2311,9 +2292,7 @@ qemuAgentGetOSInfo(qemuAgent *agent,
*/
int
qemuAgentGetTimezone(qemuAgent *agent,
virTypedParameterPtr *params,
int *nparams,
int *maxparams,
virTypedParamList *list,
bool report_unsupported)
{
g_autoptr(virJSONValue) cmd = NULL;
@ -2336,10 +2315,8 @@ qemuAgentGetTimezone(qemuAgent *agent,
return -1;
}
if ((name = virJSONValueObjectGetString(data, "zone")) &&
virTypedParamsAddString(params, nparams, maxparams,
"timezone.name", name) < 0)
return -1;
if ((name = virJSONValueObjectGetString(data, "zone")))
virTypedParamListAddString(list, name, VIR_DOMAIN_GUEST_INFO_TIMEZONE_NAME);
if ((virJSONValueObjectGetNumberInt(data, "offset", &offset)) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@ -2347,9 +2324,7 @@ qemuAgentGetTimezone(qemuAgent *agent,
return -1;
}
if (virTypedParamsAddInt(params, nparams, maxparams,
"timezone.offset", offset) < 0)
return -1;
virTypedParamListAddInt(list, offset, VIR_DOMAIN_GUEST_INFO_TIMEZONE_OFFSET);
return 0;
}
@ -2568,3 +2543,49 @@ int qemuAgentGetDisks(qemuAgent *agent,
g_free(*disks);
return -1;
}
int
qemuAgentGetLoadAvg(qemuAgent *agent,
double *load1m,
double *load5m,
double *load15m,
bool report_unsupported)
{
g_autoptr(virJSONValue) cmd = NULL;
g_autoptr(virJSONValue) reply = NULL;
virJSONValue *data = NULL;
int rc;
if (!(cmd = qemuAgentMakeCommand("guest-get-load", NULL)))
return -1;
if ((rc = qemuAgentCommandFull(agent, cmd, &reply, agent->timeout,
report_unsupported)) < 0)
return rc;
if (!(data = virJSONValueObjectGetObject(reply, "return"))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("qemu agent didn't return an array of loads"));
return -1;
}
#define GET_NUMBER_PARAM(param_) \
do { \
if (param_ && \
virJSONValueObjectGetNumberDouble(data, #param_, param_) < 0) { \
virReportError(VIR_ERR_INTERNAL_ERROR, \
_("parameter '%1$s' is missing in reply of guest-get-load"), \
#param_); \
return -1; \
} \
} while (0)
GET_NUMBER_PARAM(load1m);
GET_NUMBER_PARAM(load5m);
GET_NUMBER_PARAM(load15m);
#undef GET_NUMBER_PARAM
return 0;
}

View File

@ -157,21 +157,15 @@ int qemuAgentSetUserPassword(qemuAgent *mon,
bool crypted);
int qemuAgentGetUsers(qemuAgent *mon,
virTypedParameterPtr *params,
int *nparams,
int *maxparams,
virTypedParamList *list,
bool report_unsupported);
int qemuAgentGetOSInfo(qemuAgent *mon,
virTypedParameterPtr *params,
int *nparams,
int *maxparams,
virTypedParamList *list,
bool report_unsupported);
int qemuAgentGetTimezone(qemuAgent *mon,
virTypedParameterPtr *params,
int *nparams,
int *maxparams,
virTypedParamList *list,
bool report_unsupported);
void qemuAgentSetResponseTimeout(qemuAgent *mon,
@ -195,3 +189,9 @@ int qemuAgentSSHRemoveAuthorizedKeys(qemuAgent *agent,
int qemuAgentGetDisks(qemuAgent *mon,
qemuAgentDiskInfo ***disks,
bool report_unsupported);
int qemuAgentGetLoadAvg(qemuAgent *agent,
double *load1m,
double *load5m,
double *load15m,
bool report_unsupported);

View File

@ -806,24 +806,6 @@ qemuBackupBegin(virDomainObj *vm,
if (virDomainBackupAlignDisks(def, vm->def, suffix) < 0)
goto endjob;
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
size_t i;
if (chkdef) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("creating checkpoint for incremental backup is not supported yet"));
goto endjob;
}
for (i = 0; i < def->ndisks; i++) {
if (def->disks[i].backupmode == VIR_DOMAIN_BACKUP_DISK_BACKUP_MODE_INCREMENTAL) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("incremental backup is not supported yet"));
goto endjob;
}
}
}
if (priv->backup) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("another backup job is already running"));

View File

@ -765,32 +765,6 @@ qemuBlockStorageSourceGetRBDProps(virStorageSource *src,
}
static virJSONValue *
qemuBlockStorageSourceGetSheepdogProps(virStorageSource *src)
{
g_autoptr(virJSONValue) serverprops = NULL;
virJSONValue *ret = NULL;
if (src->nhosts != 1) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("sheepdog protocol accepts only one host"));
return NULL;
}
if (!(serverprops = qemuBlockStorageSourceBuildJSONSocketAddress(&src->hosts[0])))
return NULL;
/* libvirt does not support the 'snap-id' and 'tag' properties */
if (virJSONValueObjectAdd(&ret,
"a:server", &serverprops,
"s:vdi", src->path,
NULL) < 0)
return NULL;
return ret;
}
static virJSONValue *
qemuBlockStorageSourceGetSshProps(virStorageSource *src)
{
@ -1147,12 +1121,6 @@ qemuBlockStorageSourceGetBackendProps(virStorageSource *src,
return NULL;
break;
case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG:
driver = "sheepdog";
if (!(fileprops = qemuBlockStorageSourceGetSheepdogProps(src)))
return NULL;
break;
case VIR_STORAGE_NET_PROTOCOL_SSH:
driver = "ssh";
if (!(fileprops = qemuBlockStorageSourceGetSshProps(src)))
@ -1165,6 +1133,11 @@ qemuBlockStorageSourceGetBackendProps(virStorageSource *src,
return NULL;
break;
case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG:
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("unsupported disk protocol"));
return NULL;
case VIR_STORAGE_NET_PROTOCOL_NONE:
case VIR_STORAGE_NET_PROTOCOL_LAST:
virReportEnumRangeError(virStorageNetProtocol, src->protocol);
@ -2430,12 +2403,6 @@ qemuBlockStorageSourceCreateGetStorageProps(virStorageSource *src,
return -1;
break;
case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG:
driver = "sheepdog";
if (!(location = qemuBlockStorageSourceGetSheepdogProps(src)))
return -1;
break;
case VIR_STORAGE_NET_PROTOCOL_SSH:
if (srcPriv->nbdkitProcess) {
/* disk creation not yet supported with nbdkit, and even if it
@ -2456,6 +2423,7 @@ qemuBlockStorageSourceCreateGetStorageProps(virStorageSource *src,
break;
/* unsupported/impossible */
case VIR_STORAGE_NET_PROTOCOL_SHEEPDOG:
case VIR_STORAGE_NET_PROTOCOL_NBD:
case VIR_STORAGE_NET_PROTOCOL_ISCSI:
case VIR_STORAGE_NET_PROTOCOL_VXHS:
@ -3624,9 +3592,6 @@ qemuBlockCommit(virDomainObj *vm,
if (qemuDomainDiskBlockJobIsActive(disk))
return NULL;
if (qemuDomainSupportsCheckpointsBlockjobs(vm) < 0)
return NULL;
if (topSource == disk->src) {
/* XXX Should we auto-pivot when COMMIT_ACTIVE is not specified? */
if (!(flags & VIR_DOMAIN_BLOCK_COMMIT_ACTIVE)) {
@ -3858,7 +3823,6 @@ qemuBlockPivot(virDomainObj *vm,
* to copy data into the backing chain while the top image is being
* copied shallow */
if (reuse && shallow &&
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY) &&
virStorageSourceHasBacking(disk->mirror)) {
if (qemuProcessPrepareHostStorageSourceChain(vm, disk->mirror->backingStore) < 0)

View File

@ -968,10 +968,6 @@ qemuBlockJobProcessEventCompletedCommitBitmaps(virDomainObj *vm,
g_autoptr(virJSONValue) actions = NULL;
bool active = job->type == QEMU_BLOCKJOB_TYPE_ACTIVE_COMMIT;
if (!active &&
!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN))
return 0;
if (!(blockNamedNodeData = qemuBlockGetNamedNodeData(vm, asyncJob)))
return -1;
@ -1205,9 +1201,6 @@ qemuBlockJobProcessEventCompletedCopyBitmaps(virDomainObj *vm,
g_autoptr(virJSONValue) actions = NULL;
bool shallow = job->jobflags & VIR_DOMAIN_BLOCK_COPY_SHALLOW;
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN))
return 0;
if (!(blockNamedNodeData = qemuBlockGetNamedNodeData(vm, asyncJob)))
return -1;
@ -1237,7 +1230,6 @@ qemuBlockJobProcessEventConcludedCopyPivot(virQEMUDriver *driver,
qemuBlockJobData *job,
virDomainAsyncJob asyncJob)
{
qemuDomainObjPrivate *priv = vm->privateData;
g_autoptr(virStorageSource) src = NULL;
VIR_DEBUG("copy job '%s' on VM '%s' pivoted", job->name, vm->def->name);
@ -1257,8 +1249,7 @@ qemuBlockJobProcessEventConcludedCopyPivot(virQEMUDriver *driver,
!virStorageSourceIsBacking(job->disk->mirror->backingStore))
job->disk->mirror->backingStore = g_steal_pointer(&job->disk->src->backingStore);
if (job->disk->src->readonly &&
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN))
if (job->disk->src->readonly)
ignore_value(qemuBlockReopenReadOnly(vm, job->disk->mirror, asyncJob));
qemuBlockJobRewriteConfigDiskSource(vm, job->disk, job->disk->mirror);
@ -1277,7 +1268,6 @@ qemuBlockJobProcessEventConcludedCopyAbort(virQEMUDriver *driver,
qemuBlockJobData *job,
virDomainAsyncJob asyncJob)
{
qemuDomainObjPrivate *priv = vm->privateData;
g_autoptr(virStorageSource) mirror = NULL;
VIR_DEBUG("copy job '%s' on VM '%s' aborted", job->name, vm->def->name);
@ -1292,12 +1282,10 @@ qemuBlockJobProcessEventConcludedCopyAbort(virQEMUDriver *driver,
bool reuse = job->jobflags & VIR_DOMAIN_BLOCK_COPY_REUSE_EXT;
/* In the special case of a shallow copy with reused image we don't
* hotplug the full chain when QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY
* is supported. Attempting to delete it would thus result in spurious
* errors as we'd attempt to blockdev-del images which were not added
* yet */
* hotplug the full chain. Attempting to delete it would thus result in
* spurious errors as we'd attempt to blockdev-del images which were
* not added yet */
if (reuse && shallow &&
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY) &&
virStorageSourceHasBacking(job->disk->mirror))
g_clear_pointer(&job->disk->mirror->backingStore, virObjectUnref);
}

View File

@ -542,7 +542,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
"vhost-user-vga", /* QEMU_CAPS_DEVICE_VHOST_USER_VGA */
/* 340 */
"incremental-backup", /* QEMU_CAPS_INCREMENTAL_BACKUP */
"incremental-backup", /* X_QEMU_CAPS_INCREMENTAL_BACKUP */
"query-cpu-model-baseline", /* QEMU_CAPS_QUERY_CPU_MODEL_BASELINE */
"query-cpu-model-comparison", /* QEMU_CAPS_QUERY_CPU_MODEL_COMPARISON */
"ramfb", /* QEMU_CAPS_DEVICE_RAMFB */
@ -564,9 +564,9 @@ VIR_ENUM_IMPL(virQEMUCaps,
/* 355 */
"vhost-user-fs", /* QEMU_CAPS_DEVICE_VHOST_USER_FS */
"query-named-block-nodes.flat", /* QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT */
"blockdev-snapshot.allow-write-only-overlay", /* QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY */
"blockdev-reopen", /* QEMU_CAPS_BLOCKDEV_REOPEN */
"query-named-block-nodes.flat", /* X_QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT */
"blockdev-snapshot.allow-write-only-overlay", /* X_QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY */
"blockdev-reopen", /* X_QEMU_CAPS_BLOCKDEV_REOPEN */
"storage.werror", /* X_QEMU_CAPS_STORAGE_WERROR */
/* 360 */
@ -616,17 +616,17 @@ VIR_ENUM_IMPL(virQEMUCaps,
"cpu-max", /* QEMU_CAPS_CPU_MAX */
"memory-backend-file.x-use-canonical-path-for-ramblock-id", /* QEMU_CAPS_X_USE_CANONICAL_PATH_FOR_RAMBLOCK_ID */
"vnc-opts", /* X_QEMU_CAPS_VNC_OPTS */
"migration-param.block-bitmap-mapping", /* QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING */
"migration-param.block-bitmap-mapping", /* X_QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING */
/* 395 */
"vnc-power-control", /* QEMU_CAPS_VNC_POWER_CONTROL */
"audiodev", /* X_QEMU_CAPS_AUDIODEV */
"blockdev-backup", /* X_QEMU_CAPS_BLOCKDEV_BACKUP */
"object.qapified", /* QEMU_CAPS_OBJECT_JSON */
"object.qapified", /* X_QEMU_CAPS_OBJECT_JSON */
"rotation-rate", /* QEMU_CAPS_ROTATION_RATE */
/* 400 */
"compat-deprecated", /* QEMU_CAPS_COMPAT_DEPRECATED */
"compat-deprecated", /* X_QEMU_CAPS_COMPAT_DEPRECATED */
"acpi-index", /* QEMU_CAPS_ACPI_INDEX */
"input-linux", /* QEMU_CAPS_INPUT_LINUX */
"virtio-gpu-gl-pci", /* QEMU_CAPS_VIRTIO_GPU_GL_PCI */
@ -728,6 +728,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
"machine.virt.aia", /* QEMU_CAPS_MACHINE_VIRT_AIA */
"virtio-mem-ccw", /* QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW */
"blockdev-set-active", /* QEMU_CAPS_BLOCKDEV_SET_ACTIVE */
"shim", /* QEMU_CAPS_MACHINE_SHIM */
);
@ -1240,7 +1241,6 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
{ "query-cpu-model-baseline", QEMU_CAPS_QUERY_CPU_MODEL_BASELINE },
{ "query-cpu-model-comparison", QEMU_CAPS_QUERY_CPU_MODEL_COMPARISON },
{ "block-export-add", QEMU_CAPS_BLOCK_EXPORT_ADD },
{ "blockdev-reopen", QEMU_CAPS_BLOCKDEV_REOPEN },
{ "set-action", QEMU_CAPS_SET_ACTION },
{ "query-dirty-rate", QEMU_CAPS_QUERY_DIRTY_RATE },
{ "sev-inject-launch-secret", QEMU_CAPS_SEV_INJECT_LAUNCH_SECRET },
@ -1573,13 +1573,11 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
{ "blockdev-add/arg-type/+nbd/tls-hostname", QEMU_CAPS_BLOCKDEV_NBD_TLS_HOSTNAME },
{ "blockdev-add/arg-type/+qcow2/discard-no-unref", QEMU_CAPS_QCOW2_DISCARD_NO_UNREF },
{ "blockdev-add/arg-type/+virtio-blk-vhost-vdpa/$fdset", QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA},
{ "blockdev-snapshot/$allow-write-only-overlay", QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY },
{ "calc-dirty-rate/arg-type/mode", QEMU_CAPS_DIRTYRATE_MODE },
{ "chardev-add/arg-type/backend/+socket/data/reconnect", QEMU_CAPS_CHARDEV_RECONNECT },
{ "chardev-add/arg-type/backend/+socket/data/reconnect-ms", QEMU_CAPS_CHARDEV_RECONNECT_MILISECONDS },
{ "chardev-add/arg-type/backend/+qemu-vdagent", QEMU_CAPS_CHARDEV_QEMU_VDAGENT },
{ "device_add/$json-cli-hotplug", QEMU_CAPS_DEVICE_JSON },
{ "migrate-set-parameters/arg-type/block-bitmap-mapping/bitmaps/transform", QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING },
{ "nbd-server-start/arg-type/tls-creds", QEMU_CAPS_NBD_TLS },
{ "nbd-server-add/arg-type/bitmap", QEMU_CAPS_NBD_BITMAP },
{ "netdev_add/arg-type/+stream", QEMU_CAPS_NETDEV_STREAM },
@ -1589,7 +1587,6 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
{ "netdev_add/arg-type/type/^dgram", QEMU_CAPS_NETDEV_JSON },
{ "netdev_add/arg-type/+user", QEMU_CAPS_NETDEV_USER },
{ "netdev_add/arg-type/+stream/reconnect-ms", QEMU_CAPS_NETDEV_STREAM_RECONNECT_MILISECONDS },
{ "object-add/arg-type/qom-type/^secret", QEMU_CAPS_OBJECT_JSON },
{ "object-add/arg-type/+sev-guest/kernel-hashes", QEMU_CAPS_SEV_GUEST_KERNEL_HASHES },
{ "object-add/arg-type/+iothread/thread-pool-max", QEMU_CAPS_IOTHREAD_THREAD_POOL_MAX },
{ "query-display-options/ret-type/+egl-headless/rendernode", QEMU_CAPS_EGL_HEADLESS_RENDERNODE },
@ -1599,7 +1596,6 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
{ "query-hotpluggable-cpus/ret-type/props/die-id", QEMU_CAPS_SMP_DIES },
{ "query-hotpluggable-cpus/ret-type/props/cluster-id", QEMU_CAPS_SMP_CLUSTERS },
{ "query-migrate/ret-type/blocked-reasons", QEMU_CAPS_MIGRATION_BLOCKED_REASONS },
{ "query-named-block-nodes/arg-type/flat", QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT },
{ "screendump/arg-type/device", QEMU_CAPS_SCREENDUMP_DEVICE },
{ "screendump/arg-type/format/^png", QEMU_CAPS_SCREENSHOT_FORMAT_PNG },
{ "set-numa-node/arg-type/+hmat-lb", QEMU_CAPS_NUMA_HMAT },
@ -1774,6 +1770,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsVirt[] = {
static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsGeneric[] = {
{ "confidential-guest-support", QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPORT },
{ "shim", QEMU_CAPS_MACHINE_SHIM },
};
static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsGenericPC[] = {
@ -4438,6 +4435,7 @@ virQEMUCapsParseSEVInfo(virQEMUCaps *qemuCaps, xmlXPathContextPtr ctxt)
return -1;
}
sev->cpu0_id = virXPathString("string(./sev/cpu0Id)", ctxt);
/* We probe this every time because the values
* can change on every reboot via firmware
@ -5591,18 +5589,8 @@ virQEMUCapsInitQMPVersionCaps(virQEMUCaps *qemuCaps G_GNUC_UNUSED)
* for libvirt to be able to drive it properly should be processed here.
*/
void
virQEMUCapsInitProcessCapsInterlock(virQEMUCaps *qemuCaps)
virQEMUCapsInitProcessCapsInterlock(virQEMUCaps *qemuCaps G_GNUC_UNUSED)
{
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN) &&
virQEMUCapsGet(qemuCaps, QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING))
virQEMUCapsSet(qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP);
/* The -compat qemu command line argument is implemented using a newer
* method which doesn't show up in query-command-line-options. As we'll use
* it only for development and testing purposes we can base the capability
* on a not entirely related witness. */
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_JSON))
virQEMUCapsSet(qemuCaps, QEMU_CAPS_COMPAT_DEPRECATED);
}
@ -5668,7 +5656,7 @@ virQEMUCapsProbeQMPSchemaCapabilities(virQEMUCaps *qemuCaps,
return 0;
}
#define QEMU_MIN_MAJOR 5
#define QEMU_MIN_MAJOR 6
#define QEMU_MIN_MINOR 2
#define QEMU_MIN_MICRO 0
@ -6401,7 +6389,7 @@ static const struct virQEMUCapsDomainFeatureCapabilityTuple domCapsTuples[] = {
{ VIR_DOMAIN_CAPS_FEATURE_VMCOREINFO, QEMU_CAPS_DEVICE_VMCOREINFO },
{ VIR_DOMAIN_CAPS_FEATURE_GENID, QEMU_CAPS_DEVICE_VMGENID },
{ VIR_DOMAIN_CAPS_FEATURE_BACKING_STORE_INPUT, QEMU_CAPS_LAST },
{ VIR_DOMAIN_CAPS_FEATURE_BACKUP, QEMU_CAPS_INCREMENTAL_BACKUP },
{ VIR_DOMAIN_CAPS_FEATURE_BACKUP, QEMU_CAPS_LAST },
{ VIR_DOMAIN_CAPS_FEATURE_ASYNC_TEARDOWN, QEMU_CAPS_RUN_WITH_ASYNC_TEARDOWN },
};

View File

@ -521,7 +521,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
QEMU_CAPS_DEVICE_VHOST_USER_VGA, /* -device vhost-user-vga */
/* 340 */
QEMU_CAPS_INCREMENTAL_BACKUP, /* incremental backup is supported */
X_QEMU_CAPS_INCREMENTAL_BACKUP, /* incremental backup is supported */
QEMU_CAPS_QUERY_CPU_MODEL_BASELINE, /* qmp query-cpu-model-baseline */
QEMU_CAPS_QUERY_CPU_MODEL_COMPARISON, /* qmp query-cpu-model-comparison */
QEMU_CAPS_DEVICE_RAMFB, /* -device ramfb */
@ -543,9 +543,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
/* 355 */
QEMU_CAPS_DEVICE_VHOST_USER_FS, /* -device vhost-user-fs */
QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT, /* query-named-block-nodes supports the 'flat' option */
QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY, /* blockdev-snapshot has the 'allow-write-only-overlay' feature */
QEMU_CAPS_BLOCKDEV_REOPEN, /* 'blockdev-reopen' qmp command is supported */
X_QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT, /* query-named-block-nodes supports the 'flat' option */
X_QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY, /* blockdev-snapshot has the 'allow-write-only-overlay' feature */
X_QEMU_CAPS_BLOCKDEV_REOPEN, /* 'blockdev-reopen' qmp command is supported */
X_QEMU_CAPS_STORAGE_WERROR, /* virtio-blk,scsi-hd.werror */
/* 360 */
@ -595,17 +595,17 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
QEMU_CAPS_CPU_MAX, /* -cpu max */
QEMU_CAPS_X_USE_CANONICAL_PATH_FOR_RAMBLOCK_ID, /* -object memory-backend-file,x-use-canonical-path-for-ramblock-id= */
X_QEMU_CAPS_VNC_OPTS, /* -vnc uses QemuOpts parser instead of custom code */
QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING, /* block-bitmap-mapping in migrate-set-parameters */
X_QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING, /* block-bitmap-mapping in migrate-set-parameters */
/* 395 */
QEMU_CAPS_VNC_POWER_CONTROL, /* -vnc power-control option */
X_QEMU_CAPS_AUDIODEV, /* -audiodev instead of QEMU_AUDIO_DRV */
X_QEMU_CAPS_BLOCKDEV_BACKUP, /* qemu supports the blockdev-backup job */
QEMU_CAPS_OBJECT_JSON, /* parameters for object-add are formally described */
X_QEMU_CAPS_OBJECT_JSON, /* parameters for object-add are formally described */
QEMU_CAPS_ROTATION_RATE, /* scsi-disk / ide-drive rotation-rate prop */
/* 400 */
QEMU_CAPS_COMPAT_DEPRECATED, /* -compat deprecated-(input|output) is supported */
X_QEMU_CAPS_COMPAT_DEPRECATED, /* -compat deprecated-(input|output) is supported */
QEMU_CAPS_ACPI_INDEX, /* PCI device 'acpi-index' property */
QEMU_CAPS_INPUT_LINUX, /* -object input-linux */
QEMU_CAPS_VIRTIO_GPU_GL_PCI, /* -device virtio-gpu-gl-pci */
@ -707,6 +707,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
QEMU_CAPS_MACHINE_VIRT_AIA, /* -machine virt,aia=(none|aplic|aplic-imsic), RISC-V only */
QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW, /* -device virtio-mem-ccw */
QEMU_CAPS_BLOCKDEV_SET_ACTIVE, /* blockdev-set-active QMP command supported */
QEMU_CAPS_MACHINE_SHIM, /* -shim command line argument */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;

View File

@ -225,8 +225,7 @@ qemuCheckpointDiscardBitmaps(virDomainObj *vm,
false, false, false) < 0)
goto relabel;
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN) &&
qemuBlockReopenReadWrite(vm, src, VIR_ASYNC_JOB_NONE) < 0)
if (qemuBlockReopenReadWrite(vm, src, VIR_ASYNC_JOB_NONE) < 0)
goto relabel;
relabelimages = g_slist_prepend(relabelimages, src);
@ -240,8 +239,7 @@ qemuCheckpointDiscardBitmaps(virDomainObj *vm,
for (next = relabelimages; next; next = next->next) {
virStorageSource *src = next->data;
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN))
ignore_value(qemuBlockReopenReadOnly(vm, src, VIR_ASYNC_JOB_NONE));
ignore_value(qemuBlockReopenReadOnly(vm, src, VIR_ASYNC_JOB_NONE));
ignore_value(qemuDomainStorageSourceAccessAllow(driver, vm, src,
true, false, false));
@ -590,12 +588,6 @@ qemuCheckpointCreateXML(virDomainPtr domain,
_("cannot create checkpoint for inactive domain"));
return NULL;
}
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("incremental backup is not supported yet"));
return NULL;
}
}
if (!(def = virDomainCheckpointDefParseString(xmlDesc, driver->xmlopt,
@ -857,12 +849,6 @@ qemuCheckpointDelete(virDomainObj *vm,
_("cannot delete checkpoint for inactive domain"));
goto endjob;
}
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("incremental backup is not supported yet"));
goto endjob;
}
}
if (!(chk = qemuCheckpointObjFromCheckpoint(vm, checkpoint)))

View File

@ -127,6 +127,14 @@ VIR_ENUM_IMPL(qemuNumaPolicy,
"restrictive",
);
VIR_ENUM_DECL(qemuACPITableSIG);
VIR_ENUM_IMPL(qemuACPITableSIG,
VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST,
"", /* raw */
"", /* rawset */
"SLIC",
"MSDM");
const char *
qemuAudioDriverTypeToString(virDomainAudioType type)
@ -177,25 +185,12 @@ qemuOnOffAuto(virTristateSwitch s)
static int
qemuBuildObjectCommandlineFromJSON(virCommand *cmd,
virJSONValue *props,
virQEMUCaps *qemuCaps)
virQEMUCaps *qemuCaps G_GNUC_UNUSED)
{
g_autofree char *arg = NULL;
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_JSON)) {
if (!(arg = virJSONValueToString(props, false)))
return -1;
} else {
const char *type = virJSONValueObjectGetString(props, "qom-type");
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
virBufferAsprintf(&buf, "%s,", type);
if (virQEMUBuildCommandLineJSON(props, &buf, "qom-type",
virQEMUBuildCommandLineJSONArrayBitmap) < 0)
return -1;
arg = virBufferContentAndReset(&buf);
}
if (!(arg = virJSONValueToString(props, false)))
return -1;
virCommandAddArgList(cmd, "-object", arg, NULL);
return 0;
@ -5995,6 +5990,7 @@ qemuBuildBootCommandLine(virCommand *cmd,
{
g_auto(virBuffer) boot_buf = VIR_BUFFER_INITIALIZER;
g_autofree char *boot_opts_str = NULL;
size_t i;
if (def->os.bootmenu) {
if (def->os.bootmenu == VIR_TRISTATE_BOOL_YES)
@ -6026,13 +6022,18 @@ qemuBuildBootCommandLine(virCommand *cmd,
virCommandAddArgList(cmd, "-initrd", def->os.initrd, NULL);
if (def->os.cmdline)
virCommandAddArgList(cmd, "-append", def->os.cmdline, NULL);
if (def->os.shim)
virCommandAddArgList(cmd, "-shim", def->os.shim, NULL);
if (def->os.dtb)
virCommandAddArgList(cmd, "-dtb", def->os.dtb, NULL);
if (def->os.slic_table) {
for (i = 0; i < def->os.nacpiTables; i++) {
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
const char *sig = qemuACPITableSIGTypeToString(def->os.acpiTables[i]->type);
virCommandAddArg(cmd, "-acpitable");
virBufferAddLit(&buf, "sig=SLIC,file=");
virQEMUBuildBufferEscapeComma(&buf, def->os.slic_table);
if (*sig != '\0')
virBufferAsprintf(&buf, "sig=%s,", sig);
virBufferAddLit(&buf, "file=");
virQEMUBuildBufferEscapeComma(&buf, def->os.acpiTables[i]->path);
virCommandAddArgBuffer(cmd, &buf);
}
@ -10325,8 +10326,7 @@ VIR_ENUM_IMPL(qemuCommandDeprecationBehavior,
static void
qemuBuildCompatDeprecatedCommandLine(virCommand *cmd,
virQEMUDriverConfig *cfg,
virDomainDef *def,
virQEMUCaps *qemuCaps)
virDomainDef *def)
{
g_autoptr(virJSONValue) props = NULL;
g_autofree char *propsstr = NULL;
@ -10351,13 +10351,6 @@ qemuBuildCompatDeprecatedCommandLine(virCommand *cmd,
if (behavior == QEMU_COMMAND_DEPRECATION_BEHAVIOR_NONE)
return;
/* we don't try to enable this feature at all if qemu doesn't support it,
* so that a downgrade of qemu version doesn't impact startup of the VM */
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_COMPAT_DEPRECATED)) {
VIR_DEBUG("-compat not supported for VM '%s'", def->name);
return;
}
switch (behavior) {
case QEMU_COMMAND_DEPRECATION_BEHAVIOR_OMIT:
case QEMU_COMMAND_DEPRECATION_BEHAVIOR_NONE:
@ -10441,7 +10434,7 @@ qemuBuildCommandLine(virDomainObj *vm,
if (qemuBuildNameCommandLine(cmd, cfg, def) < 0)
return NULL;
qemuBuildCompatDeprecatedCommandLine(cmd, cfg, def, qemuCaps);
qemuBuildCompatDeprecatedCommandLine(cmd, cfg, def);
virCommandAddArg(cmd, "-S"); /* freeze CPUs during startup */

View File

@ -40,35 +40,42 @@
VIR_ENUM_DECL(qemuVideo);
VIR_ENUM_DECL(qemuSoundCodec);
virCommand *qemuBuildCommandLine(virDomainObj *vm,
const char *migrateURI,
virDomainMomentObj *snapshot,
virNetDevVPortProfileOp vmop,
size_t *nnicindexes,
int **nicindexes);
virCommand *
qemuBuildCommandLine(virDomainObj *vm,
const char *migrateURI,
virDomainMomentObj *snapshot,
virNetDevVPortProfileOp vmop,
size_t *nnicindexes,
int **nicindexes);
/* Generate the object properties for pr-manager */
virJSONValue *qemuBuildPRManagerInfoProps(virStorageSource *src);
virJSONValue *qemuBuildPRManagedManagerInfoProps(qemuDomainObjPrivate *priv);
virJSONValue *
qemuBuildPRManagerInfoProps(virStorageSource *src);
virJSONValue *
qemuBuildPRManagedManagerInfoProps(qemuDomainObjPrivate *priv);
virJSONValue *qemuBuildDBusVMStateInfoProps(virQEMUDriver *driver,
virDomainObj *vm);
virJSONValue *
qemuBuildDBusVMStateInfoProps(virQEMUDriver *driver,
virDomainObj *vm);
/* Generate the object properties for a secret */
int qemuBuildSecretInfoProps(qemuDomainSecretInfo *secinfo,
virJSONValue **propsret);
int
qemuBuildSecretInfoProps(qemuDomainSecretInfo *secinfo,
virJSONValue **propsret);
/* Generate the object properties for a tls-creds-x509 */
int qemuBuildTLSx509BackendProps(const char *tlspath,
bool isListen,
bool verifypeer,
const char *alias,
const char *secalias,
virJSONValue **propsret);
int
qemuBuildTLSx509BackendProps(const char *tlspath,
bool isListen,
bool verifypeer,
const char *alias,
const char *secalias,
virJSONValue **propsret);
/* Open a UNIX socket for chardev FD passing */
int
qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev) G_NO_INLINE;
qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev)
G_NO_INLINE;
virJSONValue *
qemuBuildChrDeviceProps(const virDomainDef *vmdef,
@ -93,7 +100,8 @@ qemuBuildNicDevProps(virDomainDef *def,
virDomainNetDef *net,
virQEMUCaps *qemuCaps);
bool qemuDiskBusIsSD(int bus);
bool
qemuDiskBusIsSD(int bus);
int
qemuBuildStorageSourceAttachPrepareCommon(virStorageSource *src,
@ -134,15 +142,16 @@ qemuBuildControllerDevProps(const virDomainDef *domainDef,
virQEMUCaps *qemuCaps,
virJSONValue **devprops);
int qemuBuildMemoryBackendProps(virJSONValue **backendProps,
const char *alias,
virQEMUDriverConfig *cfg,
qemuDomainObjPrivate *priv,
const virDomainDef *def,
const virDomainMemoryDef *mem,
bool force,
bool systemMemory,
virBitmap **nodemaskRet);
int
qemuBuildMemoryBackendProps(virJSONValue **backendProps,
const char *alias,
virQEMUDriverConfig *cfg,
qemuDomainObjPrivate *priv,
const virDomainDef *def,
const virDomainMemoryDef *mem,
bool force,
bool systemMemory,
virBitmap **nodemaskRet);
virJSONValue *
qemuBuildMemoryDeviceProps(virQEMUDriverConfig *cfg,
@ -166,8 +175,9 @@ virJSONValue *
qemuBuildRNGDevProps(const virDomainDef *def,
virDomainRNGDef *dev,
virQEMUCaps *qemuCaps);
int qemuBuildRNGBackendProps(virDomainRNGDef *rng,
virJSONValue **props);
int
qemuBuildRNGBackendProps(virDomainRNGDef *rng,
virJSONValue **props);
/* Current, best practice */
virJSONValue *
@ -210,10 +220,12 @@ qemuBuildZPCIDevProps(virDomainDeviceInfo *dev);
bool
qemuDiskConfigBlkdeviotuneEnabled(const virDomainDiskDef *disk);
virJSONValue *qemuBuildHotpluggableCPUProps(const virDomainVcpuDef *vcpu)
virJSONValue *
qemuBuildHotpluggableCPUProps(const virDomainVcpuDef *vcpu)
ATTRIBUTE_NONNULL(1);
virJSONValue *qemuBuildShmemBackendMemProps(virDomainShmemDef *shmem)
virJSONValue *
qemuBuildShmemBackendMemProps(virDomainShmemDef *shmem)
ATTRIBUTE_NONNULL(1);
bool
@ -254,6 +266,11 @@ qemuBuildTPMOpenBackendFDs(const char *tpmdev,
int *cancelfd)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) G_NO_INLINE;
const char * qemuAudioDriverTypeToString(virDomainAudioType type);
virDomainAudioType qemuAudioDriverTypeFromString(const char *str);
int qemuVDPAConnect(const char *devicepath) G_NO_INLINE;
const char *
qemuAudioDriverTypeToString(virDomainAudioType type);
virDomainAudioType
qemuAudioDriverTypeFromString(const char *str);
int
qemuVDPAConnect(const char *devicepath)
G_NO_INLINE;

View File

@ -36,6 +36,7 @@
#include "qemu_domain.h"
#include "qemu_firmware.h"
#include "qemu_namespace.h"
#include "qemu_saveimage.h"
#include "qemu_security.h"
#include "viruuid.h"
#include "virconf.h"
@ -374,9 +375,6 @@ static void virQEMUDriverConfigDispose(void *obj)
g_free(cfg->slirpHelperName);
g_free(cfg->dbusDaemonName);
g_free(cfg->saveImageFormat);
g_free(cfg->dumpImageFormat);
g_free(cfg->snapshotImageFormat);
g_free(cfg->autoDumpPath);
g_strfreev(cfg->securityDriverNames);
@ -626,12 +624,37 @@ static int
virQEMUDriverConfigLoadSaveEntry(virQEMUDriverConfig *cfg,
virConf *conf)
{
if (virConfGetValueString(conf, "save_image_format", &cfg->saveImageFormat) < 0)
g_autofree char *savestr = NULL;
g_autofree char *dumpstr = NULL;
g_autofree char *snapstr = NULL;
if (virConfGetValueString(conf, "save_image_format", &savestr) < 0)
return -1;
if (virConfGetValueString(conf, "dump_image_format", &cfg->dumpImageFormat) < 0)
if (savestr && (cfg->saveImageFormat = qemuSaveFormatTypeFromString(savestr)) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Invalid save_image_format '%1$s'"),
savestr);
return -1;
if (virConfGetValueString(conf, "snapshot_image_format", &cfg->snapshotImageFormat) < 0)
}
if (virConfGetValueString(conf, "dump_image_format", &dumpstr) < 0)
return -1;
if (dumpstr && (cfg->dumpImageFormat = qemuSaveFormatTypeFromString(dumpstr)) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Invalid dump_image_format '%1$s'"),
dumpstr);
return -1;
}
if (virConfGetValueString(conf, "snapshot_image_format", &snapstr) < 0)
return -1;
if (snapstr && (cfg->snapshotImageFormat = qemuSaveFormatTypeFromString(snapstr)) < 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Invalid snapshot_image_format '%1$s'"),
snapstr);
return -1;
}
if (virConfGetValueString(conf, "auto_dump_path", &cfg->autoDumpPath) < 0)
return -1;
if (virConfGetValueBool(conf, "auto_dump_bypass_cache", &cfg->autoDumpBypassCache) < 0)

View File

@ -193,9 +193,9 @@ struct _virQEMUDriverConfig {
bool securityDefaultConfined;
bool securityRequireConfined;
char *saveImageFormat;
char *dumpImageFormat;
char *snapshotImageFormat;
int saveImageFormat;
int dumpImageFormat;
int snapshotImageFormat;
char *autoDumpPath;
bool autoDumpBypassCache;

View File

@ -10169,29 +10169,6 @@ qemuDomainDefHasManagedPR(virDomainObj *vm)
}
/**
* qemuDomainSupportsCheckpointsBlockjobs:
* @vm: domain object
*
* Checks whether a block job is supported in possible combination with
* checkpoints (qcow2 bitmaps). Returns -1 if unsupported and reports an error
* 0 in case everything is supported.
*/
int
qemuDomainSupportsCheckpointsBlockjobs(virDomainObj *vm)
{
qemuDomainObjPrivate *priv = vm->privateData;
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP) &&
virDomainListCheckpoints(vm->checkpoints, NULL, NULL, NULL, 0) > 0) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot perform block operations while checkpoint exists"));
return -1;
}
return 0;
}
/**
* qemuDomainInitializePflashStorageSource:
*

View File

@ -1053,10 +1053,6 @@ int
qemuDomainValidateActualNetDef(const virDomainNetDef *net,
virQEMUCaps *qemuCaps);
int
qemuDomainSupportsCheckpointsBlockjobs(virDomainObj *vm)
G_GNUC_WARN_UNUSED_RESULT;
int
qemuDomainMakeCPUMigratable(virArch arch,
virCPUDef *cpu,

View File

@ -2620,7 +2620,6 @@ qemuDomainAssignPCIAddresses(virDomainDef *def,
int max_idx = -1;
int nbuses = 0;
size_t i;
int rv;
for (i = 0; i < def->ncontrollers; i++) {
virDomainControllerDef *cont = def->controllers[i];
@ -2737,12 +2736,7 @@ qemuDomainAssignPCIAddresses(virDomainDef *def,
int contIndex;
virDomainPCIAddressBus *bus = &addrs->buses[i];
if ((rv = virDomainDefMaybeAddController(
def, VIR_DOMAIN_CONTROLLER_TYPE_PCI,
i, bus->model)) < 0)
goto cleanup;
if (rv == 0)
if (!virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, i, bus->model))
continue; /* no new controller added */
/* We did add a new controller, so we will need one more

File diff suppressed because it is too large Load Diff

View File

@ -2681,7 +2681,6 @@ qemuMigrationSrcBeginXML(virDomainObj *vm,
return NULL;
if (cookieFlags & QEMU_MIGRATION_COOKIE_NBD &&
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING) &&
qemuMigrationSrcBeginPhaseBlockDirtyBitmaps(mig, vm, migrate_disks) < 0)
return NULL;
@ -3188,15 +3187,13 @@ qemuMigrationDstPrepareAnyBlockDirtyBitmaps(virDomainObj *vm,
qemuMigrationParams *migParams,
unsigned int flags)
{
qemuDomainObjPrivate *priv = vm->privateData;
g_autoptr(virJSONValue) mapping = NULL;
g_autoptr(GHashTable) blockNamedNodeData = NULL;
GSList *nextdisk;
if (!mig->nbd ||
!mig->blockDirtyBitmaps ||
!(flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC)) ||
!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING))
!(flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC)))
return 0;
if (qemuMigrationCookieBlockDirtyBitmapsMatchDisks(vm->def, mig->blockDirtyBitmaps) < 0)
@ -4936,10 +4933,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver,
if (storageMigration) {
cookieFlags |= QEMU_MIGRATION_COOKIE_NBD;
if (virQEMUCapsGet(priv->qemuCaps,
QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING))
cookieFlags |= QEMU_MIGRATION_COOKIE_BLOCK_DIRTY_BITMAPS;
cookieFlags |= QEMU_MIGRATION_COOKIE_BLOCK_DIRTY_BITMAPS;
}
if (virLockManagerPluginUsesState(driver->lockManager) &&

View File

@ -600,8 +600,6 @@ qemuMonitorOpenInternal(virDomainObj *vm,
mon->cb = cb;
if (priv) {
mon->objectAddNoWrap = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_JSON);
mon->queryNamedBlockNodesFlat = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT);
mon->blockjobMaskProtocol = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKJOB_BACKING_MASK_PROTOCOL);
}
@ -2660,7 +2658,6 @@ qemuMonitorAddObject(qemuMonitor *mon,
virJSONValue **props,
char **alias)
{
g_autoptr(virJSONValue) pr = NULL;
const char *type = NULL;
const char *id = NULL;
g_autofree char *aliasCopy = NULL;
@ -2688,30 +2685,7 @@ qemuMonitorAddObject(qemuMonitor *mon,
if (alias)
aliasCopy = g_strdup(id);
if (mon->objectAddNoWrap) {
pr = g_steal_pointer(props);
} else {
/* we need to create a wrapper which has the 'qom-type' and 'id' and
* store everything else under a 'props' sub-object */
g_autoptr(virJSONValue) typeobj = NULL;
g_autoptr(virJSONValue) idobj = NULL;
ignore_value(virJSONValueObjectRemoveKey(*props, "qom-type", &typeobj));
ignore_value(virJSONValueObjectRemoveKey(*props, "id", &idobj));
/* avoid empty 'props' member */
if (!virJSONValueObjectGetKey(*props, 0))
g_clear_pointer(props, virJSONValueFree);
if (virJSONValueObjectAdd(&pr,
"s:qom-type", type,
"s:id", id,
"A:props", props,
NULL) < 0)
return -1;
}
if (qemuMonitorJSONAddObject(mon, &pr) < 0)
if (qemuMonitorJSONAddObject(mon, props) < 0)
return -1;
if (alias)

View File

@ -2085,7 +2085,7 @@ qemuMonitorJSONQueryNamedBlockNodes(qemuMonitor *mon)
g_autoptr(virJSONValue) reply = NULL;
if (!(cmd = qemuMonitorJSONMakeCommand("query-named-block-nodes",
"B:flat", mon->queryNamedBlockNodesFlat,
"b:flat", true,
NULL)))
return NULL;

View File

@ -88,10 +88,6 @@ struct _qemuMonitor {
void *logOpaque;
virFreeCallback logDestroy;
/* true if qemu no longer wants 'props' sub-object of object-add */
bool objectAddNoWrap;
/* query-named-block-nodes supports the 'flat' option */
bool queryNamedBlockNodesFlat;
/* use the backing-mask-protocol flag of block-commit/stream */
bool blockjobMaskProtocol;
};

View File

@ -1090,24 +1090,15 @@ qemuDomainDefBootPostParse(virDomainDef *def,
}
static int
static void
qemuDomainDefAddImplicitInputDevice(virDomainDef *def,
virQEMUCaps *qemuCaps)
{
if (virQEMUCapsSupportsI8042(qemuCaps, def) &&
def->features[VIR_DOMAIN_FEATURE_PS2] != VIR_TRISTATE_SWITCH_OFF) {
if (virDomainDefMaybeAddInput(def,
VIR_DOMAIN_INPUT_TYPE_MOUSE,
VIR_DOMAIN_INPUT_BUS_PS2) < 0)
return -1;
if (virDomainDefMaybeAddInput(def,
VIR_DOMAIN_INPUT_TYPE_KBD,
VIR_DOMAIN_INPUT_BUS_PS2) < 0)
return -1;
virDomainDefMaybeAddInput(def, VIR_DOMAIN_INPUT_TYPE_MOUSE, VIR_DOMAIN_INPUT_BUS_PS2);
virDomainDefMaybeAddInput(def, VIR_DOMAIN_INPUT_TYPE_KBD, VIR_DOMAIN_INPUT_BUS_PS2);
}
return 0;
}
@ -1202,8 +1193,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
bool addIOMMU = false;
/* add implicit input devices */
if (qemuDomainDefAddImplicitInputDevice(def, qemuCaps) < 0)
return -1;
qemuDomainDefAddImplicitInputDevice(def, qemuCaps);
/* Add implicit PCI root controller if the machine has one */
switch (def->os.arch) {
@ -1342,15 +1332,11 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
break;
}
if (addDefaultUSB &&
virDomainControllerFind(def, VIR_DOMAIN_CONTROLLER_TYPE_USB, 0) < 0 &&
virDomainDefAddUSBController(def, 0, usbModel) < 0)
return -1;
if (addDefaultUSB && virDomainControllerFind(def, VIR_DOMAIN_CONTROLLER_TYPE_USB, 0) < 0)
virDomainDefAddUSBController(def, 0, usbModel);
if (addImplicitSATA &&
virDomainDefMaybeAddController(
def, VIR_DOMAIN_CONTROLLER_TYPE_SATA, 0, -1) < 0)
return -1;
if (addImplicitSATA)
virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_SATA, 0, -1);
pciRoot = virDomainControllerFind(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 0);
@ -1365,9 +1351,9 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
virDomainControllerModelPCITypeToString(def->controllers[pciRoot]->model));
return -1;
}
} else if (!virDomainDefAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 0,
VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT)) {
return -1;
} else {
virDomainDefAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 0,
VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT);
}
}
@ -1386,9 +1372,9 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
virDomainControllerModelPCITypeToString(def->controllers[pciRoot]->model));
return -1;
}
} else if (!virDomainDefAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 0,
VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT)) {
return -1;
} else {
virDomainDefAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 0,
VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT);
}
}
@ -1420,19 +1406,11 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
addDefaultUSBMouse = false;
}
if (addDefaultUSBKBD &&
def->ngraphics > 0 &&
virDomainDefMaybeAddInput(def,
VIR_DOMAIN_INPUT_TYPE_KBD,
VIR_DOMAIN_INPUT_BUS_USB) < 0)
return -1;
if (addDefaultUSBKBD && def->ngraphics > 0)
virDomainDefMaybeAddInput(def, VIR_DOMAIN_INPUT_TYPE_KBD, VIR_DOMAIN_INPUT_BUS_USB);
if (addDefaultUSBMouse &&
def->ngraphics > 0 &&
virDomainDefMaybeAddInput(def,
VIR_DOMAIN_INPUT_TYPE_MOUSE,
VIR_DOMAIN_INPUT_BUS_USB) < 0)
return -1;
if (addDefaultUSBMouse && def->ngraphics > 0)
virDomainDefMaybeAddInput(def, VIR_DOMAIN_INPUT_TYPE_MOUSE, VIR_DOMAIN_INPUT_BUS_USB);
if (addPanicDevice) {
virDomainPanicModel defaultModel = qemuDomainDefaultPanicModel(def);

View File

@ -4709,7 +4709,10 @@ qemuPrepareNVRAMFile(virQEMUDriver *driver,
return -1;
}
if (loader->nvram->format != loader->nvramTemplateFormat) {
/* If 'nvramTemplateFormat' is empty it means that it's a user-provided
* template which we couldn't verify. Assume the user knows what they're doing */
if (loader->nvramTemplateFormat != VIR_STORAGE_FILE_NONE &&
loader->nvram->format != loader->nvramTemplateFormat) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("conversion of the nvram template to another target format is not supported"));
return -1;
@ -5406,56 +5409,6 @@ qemuProcessMakeDir(virQEMUDriver *driver,
}
static void
qemuProcessStartWarnShmem(virDomainObj *vm)
{
size_t i;
bool check_shmem = false;
bool shmem = vm->def->nshmems;
/*
* For vhost-user to work, the domain has to have some type of
* shared memory configured. We're not the proper ones to judge
* whether shared hugepages or shm are enough and will be in the
* future, so we'll just warn in case neither is configured.
* Moreover failing would give the false illusion that libvirt is
* really checking that everything works before running the domain
* and not only we are unable to do that, but it's also not our
* aim to do so.
*/
for (i = 0; i < vm->def->nnets; i++) {
if (virDomainNetGetActualType(vm->def->nets[i]) ==
VIR_DOMAIN_NET_TYPE_VHOSTUSER) {
check_shmem = true;
break;
}
}
if (!check_shmem)
return;
/*
* This check is by no means complete. We merely check
* whether there are *some* hugepages enabled and *some* NUMA
* nodes with shared memory access.
*/
if (!shmem && vm->def->mem.nhugepages) {
for (i = 0; i < virDomainNumaGetNodeCount(vm->def->numa); i++) {
if (virDomainNumaGetNodeMemoryAccessMode(vm->def->numa, i) ==
VIR_DOMAIN_MEMORY_ACCESS_SHARED) {
shmem = true;
break;
}
}
}
if (!shmem) {
VIR_WARN("Detected vhost-user interface without any shared memory, "
"the interface might not be operational");
}
}
static int
qemuProcessStartValidateGraphics(virDomainObj *vm)
{
@ -5690,10 +5643,6 @@ qemuProcessStartValidate(virQEMUDriver *driver,
if (qemuProcessStartValidateTSC(driver, vm) < 0)
return -1;
VIR_DEBUG("Checking for any possible (non-fatal) issues");
qemuProcessStartWarnShmem(vm);
return 0;
}

View File

@ -37,25 +37,6 @@
VIR_LOG_INIT("qemu.qemu_saveimage");
typedef enum {
QEMU_SAVE_FORMAT_RAW = 0,
QEMU_SAVE_FORMAT_GZIP = 1,
QEMU_SAVE_FORMAT_BZIP2 = 2,
/*
* Deprecated by xz and never used as part of a release
* QEMU_SAVE_FORMAT_LZMA
*/
QEMU_SAVE_FORMAT_XZ = 3,
QEMU_SAVE_FORMAT_LZOP = 4,
QEMU_SAVE_FORMAT_ZSTD = 5,
/* Note: add new members only at the end.
These values are used in the on-disk format.
Do not change or re-use numbers. */
QEMU_SAVE_FORMAT_LAST
} virQEMUSaveFormat;
VIR_ENUM_DECL(qemuSaveFormat);
VIR_ENUM_IMPL(qemuSaveFormat,
QEMU_SAVE_FORMAT_LAST,
"raw",
@ -527,81 +508,40 @@ qemuSaveImageCreate(virQEMUDriver *driver,
/* qemuSaveImageGetCompressionProgram:
* @imageFormat: String representation from qemu.conf of the image format
* being used (dump, save, or snapshot).
* @format: Integer representation of the image format being used
* (dump, save, or snapshot).
* @compresspath: Pointer to a character string to store the fully qualified
* path from virFindFileInPath.
* @styleFormat: String representing the style of format (dump, save, snapshot)
* @use_raw_on_fail: Boolean indicating how to handle the error path. For
* callers that are OK with invalid data or inability to
* find the compression program, just return a raw format
* and let the path remain as NULL.
*
* Returns:
* virQEMUSaveFormat - Integer representation of the save image
* format to be used for particular style
* (e.g. dump, save, or snapshot).
* QEMU_SAVE_FORMAT_RAW - If there is no qemu.conf imageFormat value or
* no there was an error, then just return RAW
* indicating none.
* Returns -1 on failure, 0 on success.
*/
int
qemuSaveImageGetCompressionProgram(const char *imageFormat,
qemuSaveImageGetCompressionProgram(int format,
virCommand **compressor,
const char *styleFormat,
bool use_raw_on_fail)
const char *styleFormat)
{
int ret;
const char *imageFormat = qemuSaveFormatTypeToString(format);
const char *prog;
*compressor = NULL;
if (!imageFormat)
return QEMU_SAVE_FORMAT_RAW;
if (format == QEMU_SAVE_FORMAT_RAW)
return 0;
if ((ret = qemuSaveFormatTypeFromString(imageFormat)) < 0)
goto error;
if (ret == QEMU_SAVE_FORMAT_RAW)
return QEMU_SAVE_FORMAT_RAW;
if (!(prog = virFindFileInPath(imageFormat)))
goto error;
if (!(prog = virFindFileInPath(imageFormat))) {
virReportError(VIR_ERR_OPERATION_FAILED,
_("Compression program for %1$s image format in configuration file isn't available"),
styleFormat);
return -1;
}
*compressor = virCommandNew(prog);
virCommandAddArg(*compressor, "-c");
if (ret == QEMU_SAVE_FORMAT_XZ)
if (format == QEMU_SAVE_FORMAT_XZ)
virCommandAddArg(*compressor, "-3");
return ret;
error:
if (ret < 0) {
if (use_raw_on_fail)
VIR_WARN("Invalid %s image format specified in "
"configuration file, using raw",
styleFormat);
else
virReportError(VIR_ERR_OPERATION_FAILED,
_("Invalid %1$s image format specified in configuration file"),
styleFormat);
} else {
if (use_raw_on_fail)
VIR_WARN("Compression program for %s image format in "
"configuration file isn't available, using raw",
styleFormat);
else
virReportError(VIR_ERR_OPERATION_FAILED,
_("Compression program for %1$s image format in configuration file isn't available"),
styleFormat);
}
/* Use "raw" as the format if the specified format is not valid,
* or the compress program is not available. */
if (use_raw_on_fail)
return QEMU_SAVE_FORMAT_RAW;
return -1;
return 0;
}

View File

@ -20,7 +20,6 @@
#include "virconftypes.h"
#include "qemu_conf.h"
#include "qemu_domain.h"
/* It would be nice to replace 'Qemud' with 'Qemu' but
@ -32,6 +31,25 @@
G_STATIC_ASSERT(sizeof(QEMU_SAVE_MAGIC) == sizeof(QEMU_SAVE_PARTIAL));
typedef enum {
QEMU_SAVE_FORMAT_RAW = 0,
QEMU_SAVE_FORMAT_GZIP = 1,
QEMU_SAVE_FORMAT_BZIP2 = 2,
/*
* Deprecated by xz and never used as part of a release
* QEMU_SAVE_FORMAT_LZMA
*/
QEMU_SAVE_FORMAT_XZ = 3,
QEMU_SAVE_FORMAT_LZOP = 4,
QEMU_SAVE_FORMAT_ZSTD = 5,
/* Note: add new members only at the end.
These values are used in the on-disk format.
Do not change or re-use numbers. */
QEMU_SAVE_FORMAT_LAST
} virQEMUSaveFormat;
VIR_ENUM_DECL(qemuSaveFormat);
typedef struct _virQEMUSaveHeader virQEMUSaveHeader;
struct _virQEMUSaveHeader {
char magic[sizeof(QEMU_SAVE_MAGIC)-1];
@ -91,10 +109,9 @@ qemuSaveImageOpen(virQEMUDriver *driver,
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4);
int
qemuSaveImageGetCompressionProgram(const char *imageFormat,
qemuSaveImageGetCompressionProgram(int format,
virCommand **compressor,
const char *styleFormat,
bool use_raw_on_fail)
const char *styleFormat)
ATTRIBUTE_NONNULL(2);
int

View File

@ -1082,7 +1082,6 @@ qemuSnapshotPrepare(virDomainObj *vm,
}
/* Handle interlocking with 'checkpoints':
* - if the VM is online use qemuDomainSupportsCheckpointsBlockjobs
* - if the VM is offline disallow external snapshots as the support for
* propagating bitmaps into the would-be-created overlay is not yet implemented
*/
@ -1093,9 +1092,6 @@ qemuSnapshotPrepare(virDomainObj *vm,
_("support for offline external snapshots while checkpoint exists was not yet implemented"));
return -1;
}
} else {
if (qemuDomainSupportsCheckpointsBlockjobs(vm) < 0)
return -1;
}
/* Alter flags to let later users know what we learned. */
@ -1597,7 +1593,6 @@ qemuSnapshotCreateActiveExternal(virQEMUDriver *driver,
bool memory_existing = false;
bool thaw = false;
bool pmsuspended = false;
int format;
g_autoptr(virCommand) compressor = NULL;
virQEMUSaveData *data = NULL;
g_autoptr(GHashTable) blockNamedNodeData = NULL;
@ -1674,9 +1669,8 @@ qemuSnapshotCreateActiveExternal(virQEMUDriver *driver,
JOB_MASK(VIR_JOB_SUSPEND) |
JOB_MASK(VIR_JOB_MIGRATION_OP)));
if ((format = qemuSaveImageGetCompressionProgram(cfg->snapshotImageFormat,
&compressor,
"snapshot", false)) < 0)
if (qemuSaveImageGetCompressionProgram(cfg->snapshotImageFormat,
&compressor, "snapshot") < 0)
goto cleanup;
if (!(xml = qemuDomainDefFormatLive(driver, priv->qemuCaps,
@ -1687,7 +1681,7 @@ qemuSnapshotCreateActiveExternal(virQEMUDriver *driver,
if (!(data = virQEMUSaveDataNew(xml,
(qemuDomainSaveCookie *) snapdef->cookie,
resume, format, driver->xmlopt)))
resume, cfg->snapshotImageFormat, driver->xmlopt)))
goto cleanup;
xml = NULL;
@ -2205,6 +2199,8 @@ qemuSnapshotRevertValidate(virDomainObj *vm,
virDomainSnapshotDef *snapdef,
unsigned int flags)
{
size_t i;
if (!vm->persistent &&
snapdef->state != VIR_DOMAIN_SNAPSHOT_RUNNING &&
snapdef->state != VIR_DOMAIN_SNAPSHOT_PAUSED &&
@ -2232,6 +2228,22 @@ qemuSnapshotRevertValidate(virDomainObj *vm,
}
}
/* Reverting to external snapshot creates overlay files for every disk and
* it would fail for non-file based disks.
* See qemuSnapshotRevertExternalPrepare for more details. */
if (virDomainSnapshotIsExternal(snap)) {
for (i = 0; i < snap->def->dom->ndisks; i++) {
virDomainDiskDef *disk = snap->def->dom->disks[i];
if (disk->src->type != VIR_STORAGE_TYPE_FILE) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
_("source disk for '%1$s' is not a regular file, reverting to snapshot is not supported"),
disk->dst);
return -1;
}
}
}
return 0;
}
@ -2383,6 +2395,9 @@ qemuSnapshotRevertExternalPrepare(virDomainObj *vm,
if (virDomainMomentDefPostParse(&tmpsnapdef->parent) < 0)
return -1;
/* Force default location to be external in order to create overlay files
* for every disk. In qemuSnapshotRevertValidate we make sure that each
* disk is regular file otherwise this would fail. */
if (virDomainSnapshotAlignDisks(tmpsnapdef, domdef,
VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL,
false, true) < 0) {
@ -3494,7 +3509,7 @@ qemuSnapshotDeleteBlockJobIsRunning(qemuBlockjobState state)
/* When finishing or aborting qemu blockjob we only need to know if the
* job is still active or not. */
static int
static bool
qemuSnapshotDeleteBlockJobIsActive(qemuBlockjobState state)
{
switch (state) {
@ -3504,7 +3519,7 @@ qemuSnapshotDeleteBlockJobIsActive(qemuBlockjobState state)
case QEMU_BLOCKJOB_STATE_ABORTING:
case QEMU_BLOCKJOB_STATE_PENDING:
case QEMU_BLOCKJOB_STATE_PIVOTING:
return 1;
return true;
case QEMU_BLOCKJOB_STATE_COMPLETED:
case QEMU_BLOCKJOB_STATE_FAILED:
@ -3514,7 +3529,7 @@ qemuSnapshotDeleteBlockJobIsActive(qemuBlockjobState state)
break;
}
return 0;
return false;
}
@ -3542,18 +3557,14 @@ static int
qemuSnapshotDeleteBlockJobFinishing(virDomainObj *vm,
qemuBlockJobData *job)
{
int rc;
qemuBlockJobUpdate(vm, job, VIR_ASYNC_JOB_SNAPSHOT);
while ((rc = qemuSnapshotDeleteBlockJobIsActive(job->state)) > 0) {
while (qemuSnapshotDeleteBlockJobIsActive(job->state)) {
if (qemuDomainObjWait(vm) < 0)
return -1;
qemuBlockJobUpdate(vm, job, VIR_ASYNC_JOB_SNAPSHOT);
}
if (rc < 0)
return -1;
return 0;
}

View File

@ -701,6 +701,8 @@ static int
qemuValidateDomainDefBoot(const virDomainDef *def,
virQEMUCaps *qemuCaps)
{
size_t i;
if (def->os.bootloader || def->os.bootloaderArgs) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("bootloader is not supported by QEMU"));
@ -740,6 +742,34 @@ qemuValidateDomainDefBoot(const virDomainDef *def,
return -1;
}
for (i = 0; i < def->os.nacpiTables; i++) {
switch (def->os.acpiTables[i]->type) {
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAW:
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_SLIC:
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_MSDM:
break;
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_RAWSET:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("ACPI table type '%1$s' is not supported"),
virDomainOsACPITableTypeToString(def->os.acpiTables[i]->type));
return -1;
default:
case VIR_DOMAIN_OS_ACPI_TABLE_TYPE_LAST:
virReportEnumRangeError(virDomainOsACPITable,
def->os.acpiTables[i]->type);
return -1;
}
}
if (def->os.shim &&
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_SHIM)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("shim is not supported by this QEMU binary"));
return -1;
}
return 0;
}
@ -1820,12 +1850,6 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNetDef *net,
return -1;
}
if (net->type == VIR_DOMAIN_NET_TYPE_VHOSTUSER &&
net->backend.type == VIR_DOMAIN_NET_BACKEND_PASST) {
if (qemuValidateDomainDefVhostUserRequireSharedMemory(def, "interface type=\"vhostuser\" backend type=\"passt\"") < 0)
return -1;
}
if (net->type == VIR_DOMAIN_NET_TYPE_VDPA) {
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_NETDEV_VHOST_VDPA)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
@ -1849,6 +1873,9 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNetDef *net,
_("'reconnect' attribute is not supported when source mode='server' for <interface type='vhostuser'>"));
return -1;
}
if (qemuValidateDomainDefVhostUserRequireSharedMemory(def, "interface") < 0)
return -1;
}
if (!virDomainNetIsVirtioModel(net)) {

View File

@ -1973,7 +1973,7 @@ virSecurityDACRestoreAllLabel(virSecurityManager *mgr,
for (i = 0; i < def->ngraphics; i++) {
if (virSecurityDACRestoreGraphicsLabel(mgr, def, def->graphics[i]) < 0)
return -1;
rc = -1;
}
for (i = 0; i < def->ninputs; i++) {
@ -2021,7 +2021,7 @@ virSecurityDACRestoreAllLabel(virSecurityManager *mgr,
case VIR_DOMAIN_LAUNCH_SECURITY_NONE:
case VIR_DOMAIN_LAUNCH_SECURITY_LAST:
virReportEnumRangeError(virDomainLaunchSecurity, def->sec->sectype);
return -1;
rc = -1;
}
}
@ -2046,13 +2046,18 @@ virSecurityDACRestoreAllLabel(virSecurityManager *mgr,
virSecurityDACRestoreFileLabel(mgr, def->os.initrd) < 0)
rc = -1;
if (def->os.shim &&
virSecurityDACRestoreFileLabel(mgr, def->os.shim) < 0)
rc = -1;
if (def->os.dtb &&
virSecurityDACRestoreFileLabel(mgr, def->os.dtb) < 0)
rc = -1;
if (def->os.slic_table &&
virSecurityDACRestoreFileLabel(mgr, def->os.slic_table) < 0)
rc = -1;
for (i = 0; i < def->os.nacpiTables; i++) {
if (virSecurityDACRestoreFileLabel(mgr, def->os.acpiTables[i]->path) < 0)
rc = -1;
}
if (def->pstore &&
virSecurityDACRestoreFileLabel(mgr, def->pstore->path) < 0)
@ -2294,17 +2299,24 @@ virSecurityDACSetAllLabel(virSecurityManager *mgr,
user, group, true) < 0)
return -1;
if (def->os.shim &&
virSecurityDACSetOwnership(mgr, NULL,
def->os.shim,
user, group, true) < 0)
return -1;
if (def->os.dtb &&
virSecurityDACSetOwnership(mgr, NULL,
def->os.dtb,
user, group, true) < 0)
return -1;
if (def->os.slic_table &&
virSecurityDACSetOwnership(mgr, NULL,
def->os.slic_table,
user, group, true) < 0)
return -1;
for (i = 0; i < def->os.nacpiTables; i++) {
if (virSecurityDACSetOwnership(mgr, NULL,
def->os.acpiTables[i]->path,
user, group, true) < 0)
return -1;
}
if (def->pstore &&
virSecurityDACSetOwnership(mgr, NULL,

View File

@ -2969,7 +2969,7 @@ virSecuritySELinuxRestoreAllLabel(virSecurityManager *mgr,
for (i = 0; i < def->nmems; i++) {
if (virSecuritySELinuxRestoreMemoryLabel(mgr, def, def->mems[i]) < 0)
return -1;
rc = -1;
}
for (i = 0; i < def->ntpms; i++) {
@ -3009,13 +3009,18 @@ virSecuritySELinuxRestoreAllLabel(virSecurityManager *mgr,
virSecuritySELinuxRestoreFileLabel(mgr, def->os.initrd, true) < 0)
rc = -1;
if (def->os.shim &&
virSecuritySELinuxRestoreFileLabel(mgr, def->os.shim, true) < 0)
rc = -1;
if (def->os.dtb &&
virSecuritySELinuxRestoreFileLabel(mgr, def->os.dtb, true) < 0)
rc = -1;
if (def->os.slic_table &&
virSecuritySELinuxRestoreFileLabel(mgr, def->os.slic_table, true) < 0)
rc = -1;
for (i = 0; i < def->os.nacpiTables; i++) {
if (virSecuritySELinuxRestoreFileLabel(mgr, def->os.acpiTables[i]->path, true) < 0)
rc = -1;
}
if (def->pstore &&
virSecuritySELinuxRestoreFileLabel(mgr, def->pstore->path, true) < 0)
@ -3438,15 +3443,21 @@ virSecuritySELinuxSetAllLabel(virSecurityManager *mgr,
data->content_context, true) < 0)
return -1;
if (def->os.shim &&
virSecuritySELinuxSetFilecon(mgr, def->os.shim,
data->content_context, true) < 0)
return -1;
if (def->os.dtb &&
virSecuritySELinuxSetFilecon(mgr, def->os.dtb,
data->content_context, true) < 0)
return -1;
if (def->os.slic_table &&
virSecuritySELinuxSetFilecon(mgr, def->os.slic_table,
data->content_context, true) < 0)
return -1;
for (i = 0; i < def->os.nacpiTables; i++) {
if (virSecuritySELinuxSetFilecon(mgr, def->os.acpiTables[i]->path,
data->content_context, true) < 0)
return -1;
}
if (def->pstore &&
virSecuritySELinuxSetFilecon(mgr, def->pstore->path,

View File

@ -970,13 +970,18 @@ get_files(vahControl * ctl)
if (vah_add_file(&buf, ctl->def->os.initrd, "r") != 0)
goto cleanup;
if (ctl->def->os.shim)
if (vah_add_file(&buf, ctl->def->os.shim, "r") != 0)
goto cleanup;
if (ctl->def->os.dtb)
if (vah_add_file(&buf, ctl->def->os.dtb, "r") != 0)
goto cleanup;
if (ctl->def->os.slic_table)
if (vah_add_file(&buf, ctl->def->os.slic_table, "r") != 0)
for (i = 0; i < ctl->def->os.nacpiTables; i++) {
if (vah_add_file(&buf, ctl->def->os.acpiTables[i]->path, "r") != 0)
goto cleanup;
}
if (ctl->def->pstore)
if (vah_add_file(&buf, ctl->def->pstore->path, "rw") != 0)

View File

@ -76,11 +76,11 @@ virNetDevVlanEqual(const virNetDevVlan *a, const virNetDevVlan *b)
* If src is NULL, dst will have nTags set to 0.
* dst is assumed to be empty on entry.
*/
int
void
virNetDevVlanCopy(virNetDevVlan *dst, const virNetDevVlan *src)
{
if (!src || src->nTags == 0)
return 0;
return;
dst->tag = g_new0(unsigned int, src->nTags);
dst->trunk = src->trunk;
@ -88,5 +88,4 @@ virNetDevVlanCopy(virNetDevVlan *dst, const virNetDevVlan *src)
dst->nativeMode = src->nativeMode;
dst->nativeTag = src->nativeTag;
memcpy(dst->tag, src->tag, src->nTags * sizeof(*src->tag));
return 0;
}

View File

@ -42,6 +42,6 @@ struct _virNetDevVlan {
void virNetDevVlanClear(virNetDevVlan *vlan);
void virNetDevVlanFree(virNetDevVlan *vlan);
int virNetDevVlanEqual(const virNetDevVlan *a, const virNetDevVlan *b);
int virNetDevVlanCopy(virNetDevVlan *dst, const virNetDevVlan *src);
void virNetDevVlanCopy(virNetDevVlan *dst, const virNetDevVlan *src);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetDevVlan, virNetDevVlanFree);

View File

@ -50,42 +50,6 @@ virQEMUBuildCommandLineJSONRecurse(const char *key,
int
virQEMUBuildCommandLineJSONArrayBitmap(const char *key,
virJSONValue *array,
virBuffer *buf)
{
ssize_t pos = -1;
ssize_t end;
g_autoptr(virBitmap) bitmap = virBitmapNew(0);
size_t i;
for (i = 0; i < virJSONValueArraySize(array); i++) {
virJSONValue *member = virJSONValueArrayGet(array, i);
unsigned long long value;
if (virJSONValueGetNumberUlong(member, &value) < 0)
return -1;
virBitmapSetBitExpand(bitmap, value);
}
while ((pos = virBitmapNextSetBit(bitmap, pos)) > -1) {
if ((end = virBitmapNextClearBit(bitmap, pos)) < 0)
end = virBitmapLastSetBit(bitmap) + 1;
if (end - 1 > pos) {
virBufferAsprintf(buf, "%s=%zd-%zd,", key, pos, end - 1);
pos = end;
} else {
virBufferAsprintf(buf, "%s=%zd,", key, pos);
}
}
return 0;
}
int
virQEMUBuildCommandLineJSONArrayNumbered(const char *key,
virJSONValue *array,

View File

@ -32,9 +32,6 @@ typedef int (*virQEMUBuildCommandLineJSONArrayFormatFunc)(const char *key,
int virQEMUBuildCommandLineJSONArrayObjectsStr(const char *key,
virJSONValue *array,
virBuffer *buf);
int virQEMUBuildCommandLineJSONArrayBitmap(const char *key,
virJSONValue *array,
virBuffer *buf);
int virQEMUBuildCommandLineJSONArrayNumbered(const char *key,
virJSONValue *array,
virBuffer *buf);

View File

@ -1092,3 +1092,23 @@ virStringListRemoveDuplicates(char ***list)
g_free(*list);
*list = g_renew(char *, unique, n + 1);
}
/**
* virStringFormatHex:
* @buf: buffer to format
* @len: length of the buffer
*
* Format a byte array into a hexadecimal string and return it. It's caller's
* responsibility to free returned string.
*/
char *
virStringFormatHex(const unsigned char *buf, size_t len)
{
char *hex = g_new0(char, len * 2 + 1);
size_t i;
for (i = 0; i < len; i++)
g_snprintf(hex + i * 2, 3, "%02x", buf[i]);
return g_steal_pointer(&hex);
}

View File

@ -140,3 +140,4 @@ int virStringParseVersion(unsigned long long *version,
bool allowMissing);
void virStringListRemoveDuplicates(char ***list);
char *virStringFormatHex(const unsigned char *buf, size_t len);

Some files were not shown because too many files have changed in this diff Show More