]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
20 months agoqemuxml2argvtest: testAddCPUModels: Remove non-x86_64 fake cpu models
Peter Krempa [Thu, 31 Aug 2023 11:47:39 +0000 (13:47 +0200)]
qemuxml2argvtest: testAddCPUModels: Remove non-x86_64 fake cpu models

At this point only x86_64 is using fake machines, and for real machines
we don't populate the fake cpu models. Thus we can remove everything
non-x86_64.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agoqemuxml2argvtest: Clean up host CPU if overriden
Peter Krempa [Fri, 1 Sep 2023 13:41:10 +0000 (15:41 +0200)]
qemuxml2argvtest: Clean up host CPU if overriden

If a test uses ARG_CAPS_HOST_CPU_MODEL feature we override the global
host cpu model to the selected CPU but don't clear it afterwards. This
can trip up fake caps tests following a test which uses this feature.

This does not happen with real caps, because unless overriden, the host
cpu from capabilities is always populated as the host cpu.

Clear the CPU on cleanup.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agoqemu: capabilities: Preserve location of the default machine type when stripping...
Peter Krempa [Fri, 1 Sep 2023 19:43:22 +0000 (21:43 +0200)]
qemu: capabilities: Preserve location of the default machine type when stripping aliases for tests

Internally the preferred machine which is 'pc' for x86_64 must be kept
in the first place in the array of machines. This was not the case when
stripping the machine aliases for use in tests (so that test output
stays stable) where we've created a new entry for the alias. This means
that the original name (e.g. pc-i440fx-8.1) stayed in the first place.

To fix this we now swap the names around and create a new entry at the
end for the specific type. Additionally the default flag is not
propagated to the copy.

This is also visible now in the output of 'qemuxml2xmltest' as the test
cases which use the default machine type return to 'pc' instead of the
more specific name.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agoqemu: capabilities: Retire QEMU_CAPS_ICH9_DISABLE_S* and QEMU_CAPS_ICH9_DISABLE_S...
Peter Krempa [Fri, 1 Sep 2023 15:00:35 +0000 (17:00 +0200)]
qemu: capabilities: Retire QEMU_CAPS_ICH9_DISABLE_S* and QEMU_CAPS_ICH9_DISABLE_S* capabilities

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agoqemu: Always assume support for QEMU_CAPS_PIIX_DISABLE_S* and QEMU_CAPS_ICH9_DISABLE_S*
Peter Krempa [Fri, 1 Sep 2023 14:57:34 +0000 (16:57 +0200)]
qemu: Always assume support for QEMU_CAPS_PIIX_DISABLE_S* and QEMU_CAPS_ICH9_DISABLE_S*

The support for PIIX power management was added in qemu commit
v1.0-3094-g459ae5ea5a and the suport for ICH9 power management was added
in qemu commit v2.2.0-542-g6ac0d8d44c and both can't be compiled out.

This means we can always assume support for these features. Remove the
validation and impossible tests. Move relevant bits from
'q35-pm-disable' to 'q35' test case.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agosecurityselinuxlabeltest: Convert to testQemuInsertRealCaps
Peter Krempa [Tue, 5 Sep 2023 15:02:33 +0000 (17:02 +0200)]
securityselinuxlabeltest: Convert to testQemuInsertRealCaps

Use the modern infrastructure to populate capabilities cache with real
capabilities instead of the faked one which will be soon removed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agostorage_util: Drop getDeviceType()
Michal Privoznik [Tue, 5 Sep 2023 07:14:11 +0000 (09:14 +0200)]
storage_util: Drop getDeviceType()

The sole purpose of getDeviceType() is to parse a file that
contains one integer (and a newline character). Well, we already
have a function for that: virFileReadValueInt(). Use the latter
and drop the former.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agoch: Use proper format directive for @i in virCHProcessSetupIOThreads()
Michal Privoznik [Tue, 5 Sep 2023 10:19:53 +0000 (12:19 +0200)]
ch: Use proper format directive for @i in virCHProcessSetupIOThreads()

The @i variable inside of virCHProcessSetupIOThreads() is a
typical loop counter - it's declared as size_t. But when passed
to VIR_DEBUG an invalid format directive is used (%ld). Fix that.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agoch: Use int for @niothreads in virCHMonitorGetIOThreads()
Michal Privoznik [Tue, 5 Sep 2023 10:17:19 +0000 (12:17 +0200)]
ch: Use int for @niothreads in virCHMonitorGetIOThreads()

The @niothreads inside of virCHMonitorGetIOThreads() is declared
as of size_t type. This would work, except the variable is then
passed to VIR_DEBUG with incorrect format directive (%ld) and
returned.  But the function returns an int not size_t. Fix the
variable declaration and format directive.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agoch: Use uint for @maxvcpus in virCHDomainRefreshThreadInfo()
Michal Privoznik [Tue, 5 Sep 2023 10:13:39 +0000 (12:13 +0200)]
ch: Use uint for @maxvcpus in virCHDomainRefreshThreadInfo()

The @maxvcpus variable inside of virCHDomainRefreshThreadInfo()
holds retval of virDomainDefGetVcpusMax() which returns an
unsigned int. Also, the variable is then passed to VIR_WARN()
with incorrect format directive (%ld). Switch variable to uint
and fix the format directive.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agofix virCgroupGetMemoryStat arguments order
Dmitry Frolov [Mon, 4 Sep 2023 11:44:48 +0000 (14:44 +0300)]
fix virCgroupGetMemoryStat arguments order

Reviewing the sources, I noticed that, argumets order in
virCgroupGetMemoryStat() function call does not correspond
to the function declaration:
-instead of   *activeAnon, &meminfo->inactive_anon is passed;
-instead of *inactiveAnon,   &meminfo->active_anon is passed;
-instead of   *activeFile, &meminfo->inactive_file is passed;
-instead of *inactiveFile,   &meminfo->active_file is passed.

Fixes: e634c7cd0d ("lxc: Use virCgroupGetMemoryStat")
Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
20 months agoconf: Generate MAC address instead of keeping all zeroes
Martin Kletzander [Fri, 1 Sep 2023 14:51:59 +0000 (16:51 +0200)]
conf: Generate MAC address instead of keeping all zeroes

When we parse <mac address="00:00:00:00:00:00"/> we keep that in memory
and pass it down to the hypervisor. However, that MAC address is not
strictly valid as it is not marked as locally administered (bit 0x02)
but it is not even globally unique. It is also used for loopback device
on Linux, for example. And QEMU sees such MAC address just as "not
specified" and generates a new one that libvirt does not even know
about. So to make the overall experience better we now generate it if
the supplied one is all clear.

Resolves: https://issues.redhat.com/browse/RHEL-974

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agobuild: Fix logic bug determining whether running with optimization
Peter Krempa [Mon, 4 Sep 2023 12:30:48 +0000 (14:30 +0200)]
build: Fix logic bug determining whether running with optimization

The conversion from ternary to a 'if' clause was wrong and thus didn't
properly increase the stack size where needed but only where not
actually needed.

Fixes: b68faa99d9f16c2f504b23737040d25d072ee85d
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
20 months agobuild: Fix assignment into 'stack_frame_size' when sanitizer is enabled
Peter Krempa [Mon, 4 Sep 2023 12:07:31 +0000 (14:07 +0200)]
build: Fix assignment into 'stack_frame_size' when sanitizer is enabled

Instead of an assignment into the 'stack_frame_size' variable when
sanitizers are enabled I've accidentally compared the value against the
requested size.

Fix the typo.

Fixes: b68faa99d9f16c2f504b23737040d25d072ee85d
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
20 months agobuild: Work around clang's stack size calculation without optimization
Peter Krempa [Mon, 4 Sep 2023 10:10:25 +0000 (12:10 +0200)]
build: Work around clang's stack size calculation without optimization

When building without optimization on clang, certain big functions trip
the stack size limit despite not actually reaching it. Relax the stack
limit size for clang without optimization.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
20 months agodocs: compiling: Add a note about use of CFLAGS for optimization
Peter Krempa [Mon, 4 Sep 2023 10:09:11 +0000 (12:09 +0200)]
docs: compiling: Add a note about use of CFLAGS for optimization

Meson doesn't interpret what's set in CFLAGS, but rather simply appeds
it to the command line. Thus any logic which is based on the
optimization level will not work.

Note the caveat in the docs and instruct users to use
``--optimization=N`` instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
20 months agosyntax-check: Introduce a rule for one line error messages
Michal Privoznik [Mon, 28 Aug 2023 10:56:36 +0000 (12:56 +0200)]
syntax-check: Introduce a rule for one line error messages

Okay, this is a shortcut. Our coding style says that error
messages are exempt from '80 chars long lines' rule. But in the
very same paragraph it is said that all error messages need to be
marked for translation (as they might be presented to user).

Therefore, the syntax-check rule can check if _("...") is
formatted on one line. With exception of _("...\n" ...) (e.g.
various outputs from helper binaries like leaseshelper,
sshhelper, or daemons like lockd, logd). I believe nobody would
chose a substring that contains '\n' for git grep-ping the error
message.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
20 months agotools: Reformat --help output of virsh and virt-admin
Michal Privoznik [Mon, 28 Aug 2023 11:07:34 +0000 (13:07 +0200)]
tools: Reformat --help output of virsh and virt-admin

The --help output of virsh and virt-admin shows supported options
and commands and as such contains new lines. Both these strings
are marked for translation btw. But the way they are formatted
now ('\n' being at the start of new line instead at the end of
the previous) makes it hard to create a syntax-check rule for
'translation message on one line' (next commit).

Reformat both strings a bit (no user visible change though).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
20 months agobhyve: Feed hook scripts with domain XML
Michal Privoznik [Tue, 29 Aug 2023 14:25:38 +0000 (16:25 +0200)]
bhyve: Feed hook scripts with domain XML

Domain related hook scripts are all fed with domain XML on their
stdin, except for bhyve. Fix this.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/528
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agodocs: Document bhyve hook scripts
Michal Privoznik [Tue, 29 Aug 2023 14:15:56 +0000 (16:15 +0200)]
docs: Document bhyve hook scripts

We have bhyve hook scripts since v6.1.0-rc1~42 but never mention
them in hooks.rst. Fill the blanks.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agodocs: Document that libxl hooks are also given full domain XML
Michal Privoznik [Tue, 29 Aug 2023 14:13:26 +0000 (16:13 +0200)]
docs: Document that libxl hooks are also given full domain XML

Our hooks.rst document existence of libxl hook scripts, but
mentions only qemu and lxc as receivers of full domain XML. But
since their introduction in v2.2.0-rc1~201 they are also given
full domain XML. Fix our wording.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agodocs, passt: Clarify some niche passt usage
Martin Kletzander [Fri, 1 Sep 2023 22:27:05 +0000 (00:27 +0200)]
docs, passt: Clarify some niche passt usage

Change example logfile path and clarify how complicated all things passt
are.  I chose not to create the non-existing directory because it could
open a whole new can of worms.

Also explain missing `dev` attribute of `<portForward/>`

Resolves: https://issues.redhat.com/browse/RHEL-1833

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agobuild: Decrease maximum stack frame size to 2048
Peter Krempa [Mon, 5 Sep 2022 12:38:09 +0000 (14:38 +0200)]
build: Decrease maximum stack frame size to 2048

After recent cleanups we can now restrict the maximum stack frame size
to 2k.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
20 months agonss: aiforaf: Decrease stack size by scoping off large buffers
Peter Krempa [Tue, 20 Sep 2022 11:16:58 +0000 (13:16 +0200)]
nss: aiforaf: Decrease stack size by scoping off large buffers

The 'buf', 'sa' and 'hints' stack allocated helper variables are never
used together. Decrease the stack memory usage by scoping them off into
do-while blocks.

In this instance we do not want to use dynamic allocation as this is the
NSS module.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
20 months agonss: aiforaf: Drop unused buffer 'port'
Peter Krempa [Wed, 30 Aug 2023 10:19:23 +0000 (12:19 +0200)]
nss: aiforaf: Drop unused buffer 'port'

The 'port' buffer is passed to 'getnameinfo' which is supposed to fill
it but it's not actually later used. Drop the buffer as 'getnameinfo'
allows NULL arguments if they are not needed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
20 months agonss: aiforaf: Remove unused 'ret' variable
Peter Krempa [Wed, 30 Aug 2023 10:45:51 +0000 (12:45 +0200)]
nss: aiforaf: Remove unused 'ret' variable

The variable is set but never actually used.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
20 months agonss: aiforaf: Format one argument/variable per line
Peter Krempa [Wed, 30 Aug 2023 10:21:04 +0000 (12:21 +0200)]
nss: aiforaf: Format one argument/variable per line

Break up the argument and variable declarations to the preferred style.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
20 months agovirHostValidateBhyve: Heap allocate massive 'struct kld_file_stat'
Peter Krempa [Tue, 20 Sep 2022 10:08:50 +0000 (12:08 +0200)]
virHostValidateBhyve: Heap allocate massive 'struct kld_file_stat'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
20 months agovirHostValidateBhyve: Declare one variable per line
Peter Krempa [Tue, 20 Sep 2022 10:07:12 +0000 (12:07 +0200)]
virHostValidateBhyve: Declare one variable per line

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
20 months agobhyve: Don't stack-allocate huge error buffers
Peter Krempa [Tue, 20 Sep 2022 09:16:27 +0000 (11:16 +0200)]
bhyve: Don't stack-allocate huge error buffers

_POSIX2_LINE_MAX is 2048. Allocate the buffers on the heap instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Kristina Hanicova <khanicov@redhat.com>
20 months agovirDomainFeaturesXENDefParse: Use virXMLNodeGetSubelementList
Peter Krempa [Wed, 26 Apr 2023 15:50:08 +0000 (17:50 +0200)]
virDomainFeaturesXENDefParse: Use virXMLNodeGetSubelementList

Rewrite the old-style parser to use virXMLNodeGetSubelementList

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agovirDomainFeaturesKVMDefParse: Use virXMLNodeGetSubelementList
Peter Krempa [Wed, 26 Apr 2023 15:47:31 +0000 (17:47 +0200)]
virDomainFeaturesKVMDefParse: Use virXMLNodeGetSubelementList

Rewrite the old-style parser to use virXMLNodeGetSubelementList

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agovirDomainFeaturesCapabilitiesDefParse: Use virXMLNodeGetSubelementList
Peter Krempa [Wed, 26 Apr 2023 15:43:12 +0000 (17:43 +0200)]
virDomainFeaturesCapabilitiesDefParse: Use virXMLNodeGetSubelementList

Rewrite the old-style parser to use virXMLNodeGetSubelementList

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agovirsh: domain: Refactor XML handling for disk changes
Peter Krempa [Wed, 12 Apr 2023 07:38:21 +0000 (09:38 +0200)]
virsh: domain: Refactor XML handling for disk changes

Use virXMLNodeGetSubelement to find needed subelements.

In virshUpdateDiskXML this commit removes the code which keeps XML
formatting tidy, but that is not needed for the code to format proper
XMLs.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agovirNetworkDNSHostDefParseXML: Refactor parsing
Peter Krempa [Tue, 11 Apr 2023 20:34:59 +0000 (22:34 +0200)]
virNetworkDNSHostDefParseXML: Refactor parsing

Use 'virXMLNodeGetSubelementList' instead of looping through XML nodes
and modernize the code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agoqemu: capabilities: Remove unused 'virQEMUCapsFilterByMachineType'
Peter Krempa [Mon, 28 Aug 2023 12:45:53 +0000 (14:45 +0200)]
qemu: capabilities: Remove unused 'virQEMUCapsFilterByMachineType'

The filtering of qemu capabilities by machine type doesn't seem to be
ever used, remove it and adjust callers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agoqemu: capabilities: Retire QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS
Peter Krempa [Mon, 28 Aug 2023 12:40:54 +0000 (14:40 +0200)]
qemu: capabilities: Retire QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS

All qemu versions have that command and cpu hotplug code now directly
probes the machine type.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agoqemuDomainSupportsVcpuHotplug: Base return value on virQEMUCapsGetMachineHotplugCpus
Peter Krempa [Mon, 28 Aug 2023 12:14:32 +0000 (14:14 +0200)]
qemuDomainSupportsVcpuHotplug: Base return value on virQEMUCapsGetMachineHotplugCpus

The QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS flag is always asserted as all
qemu versions support the command and selectively cleared when copying
the capabilities for VM use if given machine type does not support cpu
hotplug.

Rework this to directly probe the machine as we now populate the data
also when re-connecting to a qemu instance after daemon restart, so that
the capability can be removed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agoqemuhotplugtest: Remove 'modern' field for cpu hotplug tests
Peter Krempa [Mon, 28 Aug 2023 12:34:36 +0000 (14:34 +0200)]
qemuhotplugtest: Remove 'modern' field for cpu hotplug tests

Nowadays all tests were considered 'modern' so it makes no longer sense
to have that field.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agotests: qemuhotplugtest: Fix arch-specific parts of 'ppc64' test XMLs
Peter Krempa [Mon, 28 Aug 2023 12:24:52 +0000 (14:24 +0200)]
tests: qemuhotplugtest: Fix arch-specific parts of 'ppc64' test XMLs

The tests were using a copy of a x86_64 based XML and thus
'qemuhotplugtest' was selecting wrong capabilities to use for that
specific test.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agoqemuxml2argvtest: Modernize 'cpu-hotplug-startup' case
Peter Krempa [Mon, 28 Aug 2023 12:11:52 +0000 (14:11 +0200)]
qemuxml2argvtest: Modernize 'cpu-hotplug-startup' case

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agoqemu: process: Probe machine type data on reconnect to qemu
Peter Krempa [Mon, 28 Aug 2023 09:35:07 +0000 (11:35 +0200)]
qemu: process: Probe machine type data on reconnect to qemu

When reconnecting we populate only the capability flags from the XML as
we need to know the exact flags that were present when starting the VM.

On the other hand the machine type data is not stored as it wasn't
really used after startup. While storing all of the data into the status
XML would be theoretically possible, with machine-type specific data it
makes no sense to do so, and thus the data can be re-probed from the
current instance.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agoqemu: capabilities: Export functions necessary for probing machine types
Peter Krempa [Mon, 28 Aug 2023 10:56:40 +0000 (12:56 +0200)]
qemu: capabilities: Export functions necessary for probing machine types

Upcoming patch will re-probe machines from the current qemu instance to
populate the private copy of qemuCaps after reconnecting to a running
instance. This is needed to be able to access the machine type data,
while storing them in the status XML seems to be an overkill, for
information which can be easily reprobed.

Export 'virQEMUCapsInitQMPArch' needed to populate the 'arch' field and
'virQEMUCapsProbeQMPMachineTypes'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agoqemu: Rename qemuDomainSupportsNewVcpuHotplug to qemuDomainSupportsVcpuHotplug
Peter Krempa [Thu, 20 Jul 2023 15:55:33 +0000 (17:55 +0200)]
qemu: Rename qemuDomainSupportsNewVcpuHotplug to qemuDomainSupportsVcpuHotplug

Support for legacy cpu hotplug was removed a long time ago. At this
point this function only checks whether the current machine type
supports cpu hotplug.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agoconf, schema: Switch iothread/poll values to unsignedLong
Martin Kletzander [Fri, 1 Sep 2023 21:28:01 +0000 (23:28 +0200)]
conf, schema: Switch iothread/poll values to unsignedLong

They represent nanoseconds, and we accept such values already.  Not that
anyone would use such values in the wild, but even one person testing
QEMU could put in a bigger value and will be bothered with validation
errors after every `virsh edit`.  Also add a test for it.

Resolves: https://issues.redhat.com/browse/RHEL-1717

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
20 months agotools: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:04:34 +0000 (17:04 +0200)]
tools: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agosrc: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:04:13 +0000 (17:04 +0200)]
src: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agovz: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:59 +0000 (17:03 +0200)]
vz: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agovmx: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:59 +0000 (17:03 +0200)]
vmx: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agovmware: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:59 +0000 (17:03 +0200)]
vmware: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agovbox: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:59 +0000 (17:03 +0200)]
vbox: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agoutil: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:59 +0000 (17:03 +0200)]
util: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agotest: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:59 +0000 (17:03 +0200)]
test: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agostorage_file: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:59 +0000 (17:03 +0200)]
storage_file: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agostorage: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:59 +0000 (17:03 +0200)]
storage: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agosecurity: Move error messages onto a single line
Michal Privoznik [Fri, 25 Aug 2023 07:18:18 +0000 (09:18 +0200)]
security: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agorpc: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:59 +0000 (17:03 +0200)]
rpc: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agoremote: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:59 +0000 (17:03 +0200)]
remote: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agoqemu: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:58 +0000 (17:03 +0200)]
qemu: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agoopenvz: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:58 +0000 (17:03 +0200)]
openvz: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agonwfilter: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:58 +0000 (17:03 +0200)]
nwfilter: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agonode_device: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:58 +0000 (17:03 +0200)]
node_device: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agonetwork: Move error messages onto a single line
Michal Privoznik [Fri, 25 Aug 2023 07:15:37 +0000 (09:15 +0200)]
network: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agolxc: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:58 +0000 (17:03 +0200)]
lxc: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agolocking: Move error messages onto a single line
Michal Privoznik [Fri, 25 Aug 2023 07:13:15 +0000 (09:13 +0200)]
locking: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agolibxl: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:58 +0000 (17:03 +0200)]
libxl: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agohypervisor: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:58 +0000 (17:03 +0200)]
hypervisor: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agoesx: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:58 +0000 (17:03 +0200)]
esx: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agocpu: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:58 +0000 (17:03 +0200)]
cpu: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agoconf: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:58 +0000 (17:03 +0200)]
conf: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agoch: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 15:03:58 +0000 (17:03 +0200)]
ch: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agobhyve: Move error messages onto a single line
Michal Privoznik [Thu, 24 Aug 2023 14:52:33 +0000 (16:52 +0200)]
bhyve: Move error messages onto a single line

Error messages are exempt from the 80 columns rule. Move them
onto one line.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
20 months agoTranslated using Weblate (Korean)
김인수 [Mon, 4 Sep 2023 04:21:13 +0000 (06:21 +0200)]
Translated using Weblate (Korean)

Currently translated at 99.9% (10402 of 10411 strings)

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

Translated using Weblate (Korean)

Currently translated at 99.8% (10397 of 10411 strings)

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

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
20 months agotests: Remove unused symlink
Martin Kletzander [Fri, 1 Sep 2023 14:50:23 +0000 (16:50 +0200)]
tests: Remove unused symlink

The test does not use VIR_TEST_DIFFERENT anyway, so it's probably a
leftover.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
20 months agoNEWS: Announcing Network Metadata APIs
K Shiva Kiran [Wed, 30 Aug 2023 05:17:39 +0000 (10:47 +0530)]
NEWS: Announcing Network Metadata APIs

Ref to patchset implementing the above:
https://listman.redhat.com/archives/libvir-list/2023-August/241250.html

Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
20 months agoci: lcitool: Add libvirt-tck+runtime deps list
Erik Skultety [Mon, 28 Aug 2023 08:47:32 +0000 (10:47 +0200)]
ci: lcitool: Add libvirt-tck+runtime deps list

This change was supposed to be part of commit 120a674f , but was
proposed against the libvirt TCK project instead. Since we're running
the TCK test suite as part of this project, this is the right place for
the TCK runtime deps list config.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
20 months agoPost-release version bump to 9.8.0
Jiri Denemark [Fri, 1 Sep 2023 11:04:19 +0000 (13:04 +0200)]
Post-release version bump to 9.8.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
20 months agoRelease of libvirt-9.7.0
Jiri Denemark [Fri, 1 Sep 2023 10:59:24 +0000 (12:59 +0200)]
Release of libvirt-9.7.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
20 months agovirsh: Fix net-desc --config output
K Shiva Kiran [Thu, 31 Aug 2023 18:16:57 +0000 (23:46 +0530)]
virsh: Fix net-desc --config output

Fixes the following bug:
Command:          `net-desc --config [--title] my_network`
Expected Output:  Title/Description of persistent config
Output:           Title/Description of live config

This was caused due to the usage of a single `flags` variable in
`virshGetNetworkDescription()` which ended up in a wrong enum being
passed to `virNetworkGetMetadata()` (enum being that of LIVE instead of
CONFIG).

Although the domain object has the same code, this didn't cause a problem
there because the enum values of `VIR_DOMAIN_INACTIVE_XML` and
`VIR_DOMAIN_METADATA_CONFIG` turn out to be the same (1 << 1), whereas
they are not for network equivalent ones (1 << 0, 1 << 1).

Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
20 months agoRevert "capabilities: report full external snapshot support"
Pavel Hrdina [Fri, 1 Sep 2023 08:32:17 +0000 (10:32 +0200)]
Revert "capabilities: report full external snapshot support"

Reverting external snapshot for running VM doesn't work correctly so we
should not report this capability until it is fixed.

This reverts commit de71573bfec7f3acd22ec74794318de121716e21.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
20 months agorpm: Recommend libvirt-daemon for with_modular_daemons distros
Andrea Bolognani [Wed, 30 Aug 2023 15:45:47 +0000 (17:45 +0200)]
rpm: Recommend libvirt-daemon for with_modular_daemons distros

A default deployment on modern distros uses modular daemons but
switching back to the monolithic daemon, while not recommended,
is still considered a perfectly valid option.

For a monolithic daemon deployment, the upgrade to libvirt 9.2.0
or newer works as expected; a subsequent call to dnf autoremove,
however, results in the libvirt-daemon package being removed and
the deployment no longer working.

In order to avoid that situation, mark the libvirt-daemon as
recommended.

This will unfortunately result in it being included in most
installations despite not being necessary, but considering that
the alternative is breaking existing setups on upgrade it feels
like a reasonable tradeoff.

Moreover, since the dependency on libvirt-daemon is just a weak
one, it's still possible for people looking to minimize the
footprint of their installation to manually remove the package
after installation, mitigating the drawbacks of this approach.

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

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
20 months agorpm: Fix typo in daemon name
Andrea Bolognani [Wed, 30 Aug 2023 15:41:14 +0000 (17:41 +0200)]
rpm: Fix typo in daemon name

The name of the virtsecretd daemon was misspelled, resulting
in multiple errors during installation:

  Running scriptlet: libvirt-daemon-driver-secret-9.5.0-6.el9.x86_64
  Failed to preset unit: Unit file virsecretd.socket does not exist.
  Failed to preset unit: Unit file virsecretd-ro.socket does not exist.
  Failed to preset unit: Unit file virsecretd-admin.socket does not exist.
  Failed to preset unit: Unit file virsecretd.service does not exist.

Spell the name correctly.

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

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
20 months agoTranslated using Weblate (Ukrainian)
Yuri Chornoivan [Wed, 30 Aug 2023 12:21:13 +0000 (14:21 +0200)]
Translated using Weblate (Ukrainian)

Currently translated at 100.0% (10411 of 10411 strings)

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

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
20 months agoTranslated using Weblate (Korean)
김인수 [Wed, 30 Aug 2023 12:21:13 +0000 (14:21 +0200)]
Translated using Weblate (Korean)

Currently translated at 99.6% (10379 of 10411 strings)

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

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
20 months agoDon't set cur=inf RLIM_NOFILE on macOS
Laura Hild [Tue, 15 Aug 2023 14:54:20 +0000 (10:54 -0400)]
Don't set cur=inf RLIM_NOFILE on macOS

virProcessActivateMaxFiles sets rlim_cur to rlim_max.
If rlim_max is RLIM_INFINITY,

2023-08-15 15:17:51.944+0000: 4456752640: debug :
virProcessActivateMaxFiles:1067 : Initial max files was 2560
2023-08-15 15:17:51.944+0000: 4456752640: debug :
virProcessActivateMaxFiles:1077 : Raised max files to
9223372036854775807

then when virCommandMassClose does `int openmax = sysconf(
_SC_OPEN_MAX)`, `openmax < 0` is true and virCommandMassClose
reports an error and bails.  Setting rlim_cur instead to at most
OPEN_MAX, as macOS' documentation suggests, both avoids this problem

2023-08-18 16:01:44.366+0000: 4359562752: debug :
virProcessActivateMaxFiles:1072 : Initial max files was 256
2023-08-18 16:01:44.366+0000: 4359562752: debug :
virProcessActivateMaxFiles:1086 : Raised max files to 10240

and eliminates a case of what the documentation declares
to be invalid input to setrlimit anyway.

Signed-off-by: Laura Hild <lsh@jlab.org>
20 months agotools: fix VMSA construction with explicit CPU family/model/stepping
Daniel P. Berrangé [Fri, 25 Aug 2023 08:32:25 +0000 (09:32 +0100)]
tools: fix VMSA construction with explicit CPU family/model/stepping

If the CPU family/model/stepping are provided on the command line, but
the firmware is being automatically extracted from the libvirt guest,
we try to build the VMSA too early. This leads to an exception trying
to parse the firmware that has not been loaded yet. We must delay
building the VMSA in that scenario.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
20 months agotools: fix handling of CPU family/model/stepping in SEV validation
Daniel P. Berrangé [Fri, 25 Aug 2023 08:32:25 +0000 (09:32 +0100)]
tools: fix handling of CPU family/model/stepping in SEV validation

The SEV-ES boot measurement includes the initial CPU register state
(VMSA) and one of the fields includes the CPU identification. When
building a VMSA blob we get the CPU family/model/stepping from the
host capabilities, however, the VMSA must reflect the guest CPU not
host CPU. Thus using host capabilities is only when whe the guest
has the 'host-passthrough' CPU mode active. With 'host-model' it is
cannot be assumed host and guest match, because QEMU may not (yet)
have a named CPU model for a given host CPU.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
20 months agoci: Fix quoting and option name
Andrea Bolognani [Thu, 24 Aug 2023 15:41:39 +0000 (17:41 +0200)]
ci: Fix quoting and option name

Multiple values passed to --meson-args need to be quoted so that
the shell will interpret them correctly. The option's name was
also reported incorrectly, so fix that as well.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agoci: Fix precedence between arguments passed to meson
Andrea Bolognani [Thu, 24 Aug 2023 15:35:53 +0000 (17:35 +0200)]
ci: Fix precedence between arguments passed to meson

Commit 9c9848f955fd merged $MESON_OPTS into $MESON_ARGS, and
while doing so changed their behavior: while until then the
contents of $MESON_ARGS had precedence over those of $MESON_OPTS,
now the opposite is true. Restore the original behavior and
document it.

The argument for merging the two variables in the first place
was that having both present on the meson command line could be
confusing; however, that should no longer be the case now that
we have reasonably extensive comments explaining the role of
each of the variables and how they interact with each other, so
return the meson command line to its original form.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agoUpdate translation files
Weblate [Mon, 28 Aug 2023 07:56:11 +0000 (09:56 +0200)]
Update translation files

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

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

Co-authored-by: Weblate <noreply@weblate.org>
Signed-off-by: Fedora Weblate Translation <i18n@lists.fedoraproject.org>
20 months agopo: Refresh potfile for v9.7.0
Jiri Denemark [Mon, 28 Aug 2023 07:47:14 +0000 (09:47 +0200)]
po: Refresh potfile for v9.7.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
20 months agoNEWS: document support for VFIO variant drivers
Laine Stump [Fri, 25 Aug 2023 04:19:50 +0000 (00:19 -0400)]
NEWS: document support for VFIO variant drivers

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agodocs: update description of virsh nodedev-detach --driver option
Laine Stump [Fri, 25 Aug 2023 04:09:54 +0000 (00:09 -0400)]
docs: update description of virsh nodedev-detach --driver option

--driver can now be used to specify a specific driver to bind to the
device being detached from the host driver (e.g. vfio-pci-igbvf), not
just the *type* of driver (e.g. "vfio" or "xen", which are unnecessary
anyway, since they are implicit in which hypervisor driver is in use)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agoqemu: add support for discard_granularity
Kristina Hanicova [Fri, 25 Aug 2023 12:50:32 +0000 (14:50 +0200)]
qemu: add support for discard_granularity

This commit adds building of `discard_granularity` disk option
for qemu commandline.

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

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
20 months agoconf: add support for discard_granularity
Kristina Hanicova [Fri, 25 Aug 2023 12:50:31 +0000 (14:50 +0200)]
conf: add support for discard_granularity

This introduces the ability to set the discard granularity option
for a disk.  It defines the smallest amount of data that can be
discarded in a single operation (useful for managing and
optimizing storage).

However, most hypervisors automatically set the proper discard
granularity and users usually do not need to change the default
setting.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
20 months agodocs: Improve documentation of <disk type='dir'>
Peter Krempa [Fri, 25 Aug 2023 12:16:12 +0000 (14:16 +0200)]
docs: Improve documentation of <disk type='dir'>

Note the implications and caveats of <disk type='dir'>.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/519
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
20 months agoqemucapabilitiesdata: Final update of capability test data for qemu-8.1.0 release
Peter Krempa [Fri, 25 Aug 2023 11:53:05 +0000 (13:53 +0200)]
qemucapabilitiesdata: Final update of capability test data for qemu-8.1.0 release

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
20 months agovirsh-network: Drop unused variables in cmdNetworkMetadata()
Michal Privoznik [Fri, 25 Aug 2023 11:22:59 +0000 (13:22 +0200)]
virsh-network: Drop unused variables in cmdNetworkMetadata()

In one of recent commits two variable were introduced (@ctxt and
@doc) that are not used. This breaks a build with clang who's
able to identify that.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
20 months agoAdded bridge driver implementation
K Shiva Kiran [Wed, 16 Aug 2023 18:47:15 +0000 (00:17 +0530)]
Added bridge driver implementation

Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 months agoAdd Test driver and testcase for Network Metadata change APIs
K Shiva Kiran [Wed, 16 Aug 2023 18:47:14 +0000 (00:17 +0530)]
Add Test driver and testcase for Network Metadata change APIs

This commit implements the newly defined Network Metadata Get and
Set APIs into the test driver.
It also adds a new testcase "networkmetadatatest" to test the APIs.

Signed-off-by: K Shiva Kiran <shiva_kr@riseup.net>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>