On Tue, Apr 18, 2023 at 05:18:04PM +, Nick Guenther wrote:
> April 18, 2023 3:37 AM, "Peter Krempa" wrote:
>
> In fact libvirt is already using this folder for tracking qemu's PIDs:
>
> /run/user/703204575/libvirt/qemu
> └── run
> ├── abcdefg.pid
> ├── abcdefg.xml
> ├──
On a Wednesday in 2023, Peter Krempa wrote:
We need to update private data to handle it properly.
Peter Krempa (3):
qemuProcessRefreshDisks: Properly compare tray status
qemuProcessRefreshDisks: Extract update of a single disk
qemu: hotplug: Update disk private data after hotplug
The code compares the 'tray_open' boolean from 'struct
qemuDomainDiskInfo' directly against 'disk->tray_status' which is
declared as virDomainDiskTray (enum). Now the logic works correctly
because the _OPEN enum has value '1'.
Separate the event emission code from the update code and remember the
We need to update private data to handle it properly.
Peter Krempa (3):
qemuProcessRefreshDisks: Properly compare tray status
qemuProcessRefreshDisks: Extract update of a single disk
qemu: hotplug: Update disk private data after hotplug
src/qemu/qemu_hotplug.c | 21
Extract the logic to update one single disk (without emitting any
events) so that it can be reused when updating the state after a disk
hotplug.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_process.c | 39 ---
src/qemu/qemu_process.h | 3 +++
2 files
The disk private data contain information about the tray and
removability of the disk. Until recently we didn't support hotplug of
removable disks thus it wasn't a problem but now when you can hotplug a
CDROM you would not be able to open its tray.
Fix it by updating the hotplugged disk the same
On 4/19/23 16:07, Martin Kletzander wrote:
> Los blurbos aqui.
>
> Martin Kletzander (7):
> conf: Add missing empty lines before virDomainWatchdogDefParseXML
> qemu: Fix grammar and quoting in watchdog error message on hotplug
> qemu: Forbid device attach of existing platform watchdog
>
On a Wednesday in 2023, Martin Kletzander wrote:
Signed-off-by: Martin Kletzander
---
src/conf/domain_conf.c | 2 ++
1 file changed, 2 insertions(+)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On Fri, Apr 14, 2023 at 12:02:26PM +0200, Michal Privoznik wrote:
When starting QEMU, or when hotplugging a PCI device QEMU might
lock some memory. How much? Well, that's a undecidable problem: a
s/a undecidable/an undecidable/
As a nitpick I'd even s/:.*QED/:/ so we don't repeat ourselves.
On Fri, Apr 14, 2023 at 12:02:27PM +0200, Michal Privoznik wrote:
This basically just demonstrates the limit raised by previous commit.
I'd even squash it into the first one resulting in the test testing
the commit it is introduced in. But whatever boats your float.
Reviewed-by: Martin
On 4/19/23 16:07, Martin Kletzander wrote:
> Most of them are platform devices and only i6300esb can be plugged
> multiple times into different PCI slots.
>
> Signed-off-by: Martin Kletzander
> ---
> src/qemu/qemu_validate.c | 18 ++
> 1 file changed, 10 insertions(+), 8
This makes it also work during attach. Also add a test for attaching a
watchdog with incompatible action.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2187278
Signed-off-by: Martin Kletzander
---
src/qemu/qemu_validate.c | 22 ++-
We can launch qemu with it, but it will not work since it's not even
probed by the kernel at the mapped address with different machine types
since they are expected to be connected to ISA and not even its newer
LPC counterpart found on q35. And it does not exist on non-x86
architectures.
On a Wednesday in 2023, Peter Krempa wrote:
Previous version:
https://listman.redhat.com/archives/libvir-list/2023-March/239164.html
Changes:
- patches 1 - 23 are new and do the following
- refactors to typed param handling 1 - 15, 18
- addition of new typed param APIs needed for
On a Wednesday in 2023, Peter Krempa wrote:
Currently we allow configuring the 'poll-max-ns', 'poll-grow', and
'poll-shrink' parameters of qemu iothreads only during runtime and they
are not persisted. Add XML machinery to persist them.
Signed-off-by: Peter Krempa
---
docs/formatdomain.rst
The loop initially skipped the first one because it was mainly checking
the incompatible actions, but was then modified to also check the
duplicity of iTCO watchdogs.
While at it change the type of the iteration variable to the usual size_t.
Resolves:
Signed-off-by: Martin Kletzander
---
src/qemu/qemu_driver.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 28e470e4a27e..523a83682ceb 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7315,6 +7315,19 @@
Signed-off-by: Martin Kletzander
---
src/qemu/qemu_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 5072798cb73d..53a0874556a1 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -2929,7
Los blurbos aqui.
Martin Kletzander (7):
conf: Add missing empty lines before virDomainWatchdogDefParseXML
qemu: Fix grammar and quoting in watchdog error message on hotplug
qemu: Forbid device attach of existing platform watchdog
qemu: Forbid ib700 watchdogs for non-i440fx machine types
Signed-off-by: Martin Kletzander
---
src/conf/domain_conf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b03a3ff011b4..5c0b837697a0 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -12058,6 +12058,8 @@
Most of them are platform devices and only i6300esb can be plugged
multiple times into different PCI slots.
Signed-off-by: Martin Kletzander
---
src/qemu/qemu_validate.c | 18 ++
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/qemu/qemu_validate.c
On a Wednesday in 2023, Peter Krempa wrote:
Convert the internal types to unsigned long long. Luckily we can also
covert the external types too:
- 'qemuDomainSetIOThreadParams' can accept both _UINT and _ULLONG by
converting to 'virTypedParamsGetUnsigned'
- querying is handled via the bulk
On a Wednesday in 2023, Peter Krempa wrote:
QEMU accepts even values bigger than INT_MAX. The reasoning for these
checks was that the QAPI definition declares them as 'int', but in QAPI
terms that's any number as it's JSON.
Remove the validation as well as the comment missintepreting the QAPI
On Wed, Apr 19, 2023 at 03:08:03PM +0200, Peter Krempa wrote:
On Wed, Apr 19, 2023 at 15:02:34 +0200, Martin Kletzander wrote:
On Wed, Apr 19, 2023 at 02:04:19PM +0200, Peter Krempa wrote:
> Ensure that all switch statements in this module use the proper type in
> switch() statements to ensure
On Wed, Apr 19, 2023 at 15:02:34 +0200, Martin Kletzander wrote:
> On Wed, Apr 19, 2023 at 02:04:19PM +0200, Peter Krempa wrote:
> > Ensure that all switch statements in this module use the proper type in
> > switch() statements to ensure complier protections.
> >
> > Signed-off-by: Peter Krempa
On Wed, Apr 19, 2023 at 02:04:26PM +0200, Peter Krempa wrote:
The struct will be made private in upcoming patches. Construct the list
of block entries into a separate list and append them rather than
remember the index of the count element.
Signed-off-by: Peter Krempa
---
On Wed, Apr 19, 2023 at 02:04:21PM +0200, Peter Krempa wrote:
There are two callers of virTypedParameterAssignValueVArgs.
- 'virTypedParameterAssignValue' always uses the correct type, thus
doesn't need to be modified. Just use the proper type in the function
declaration
-
On a Wednesday in 2023, Peter Krempa wrote:
Introduce a helper that fetches the typed parameters from the list while
still preserving ownership of the pointer by the list.
In the future this will be also able to report errors stored in the
list.
Signed-off-by: Peter Krempa
*parameters
+ *
On Wed, Apr 19, 2023 at 03:02:34PM +0200, Martin Kletzander wrote:
On Wed, Apr 19, 2023 at 02:04:19PM +0200, Peter Krempa wrote:
Ensure that all switch statements in this module use the proper type in
switch() statements to ensure complier protections.
Signed-off-by: Peter Krempa
---
On Wed, Apr 19, 2023 at 02:04:25PM +0200, Peter Krempa wrote:
Introduce a helper function to concatenate two virTypedParamLists. This
will allow us to refactor qemuDomainGetStatsBlock to not access the list
directly.
Signed-off-by: Peter Krempa
---
src/libvirt_private.syms | 1 +
On Wed, Apr 19, 2023 at 02:04:24PM +0200, Peter Krempa wrote:
Add an allocator function and refactor all allocations to use it. In
upcoming patches 'struct _virTypedParamList' will be made private.
Signed-off-by: Peter Krempa
Reviewed-by: Martin Kletzander
signature.asc
Description: PGP
On a Wednesday in 2023, Peter Krempa wrote:
The struct will be made private in upcoming patches. Construct the list
of block entries into a separate list and append them rather than
remember the index of the count element.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 16
On Wed, Apr 19, 2023 at 02:04:22PM +0200, Peter Krempa wrote:
Don't check the return value of 'virTypedParamListExtend' which will
always be a valid pointer and 'virTypedParameterAssignValue' always
returns 0.
Signed-off-by: Peter Krempa
Reviewed-by: Martin Kletzander
signature.asc
On Wed, Apr 19, 2023 at 02:04:23PM +0200, Peter Krempa wrote:
The header uses both styles randomly, switch it to the contemporary
style.
Signed-off-by: Peter Krempa
Reviewed-by: Martin Kletzander
signature.asc
Description: PGP signature
On Wed, Apr 19, 2023 at 02:04:20PM +0200, Peter Krempa wrote:
All changed lines even fit into 80 columns.
Signed-off-by: Peter Krempa
Reviewed-by: Martin Kletzander
signature.asc
Description: PGP signature
On Wed, Apr 19, 2023 at 02:04:19PM +0200, Peter Krempa wrote:
Ensure that all switch statements in this module use the proper type in
switch() statements to ensure complier protections.
Signed-off-by: Peter Krempa
---
src/util/virtypedparam.c | 12
1 file changed, 8 insertions(+),
On Wed, Apr 19, 2023 at 02:04:18PM +0200, Peter Krempa wrote:
All callers pass 'true'.
Signed-off-by: Peter Krempa
Reviewed-by: Martin Kletzander
signature.asc
Description: PGP signature
On a Wednesday in 2023, Peter Krempa wrote:
Introduce a helper function to concatenate two virTypedParamLists. This
will allow us to refactor qemuDomainGetStatsBlock to not access the list
directly.
Signed-off-by: Peter Krempa
---
src/libvirt_private.syms | 1 +
src/util/virtypedparam.c | 24
Refactor to use the new data type so that we can use the APIs of it in
upcoming patches.
Signed-off-by: Peter Krempa
---
tools/virsh-domain.c | 78 ++--
1 file changed, 31 insertions(+), 47 deletions(-)
diff --git a/tools/virsh-domain.c
The new helper adds a unsigned value, stored as _UINT if it fits into
the type and stored as _ULLONG otherwise.
This is useful for the statistics code which is quite tolerant to
changes in type in cases when we'll need more range for the value.
Signed-off-by: Peter Krempa
---
Return the number of parameters via pointer passed as argument to free
up possibility to report errors. Strangely all callers actually use
'int' as type for storing the count of elements, thus this function will
use the same.
The function is also renamed to virTypedParamListSteal.
Signed-off-by:
Don't check the return value of 'virTypedParamListExtend' which will
always be a valid pointer and 'virTypedParameterAssignValue' always
returns 0.
Signed-off-by: Peter Krempa
---
src/util/virtypedparam.c | 46 +---
1 file changed, 15 insertions(+), 31
For certain typed parameters we want to extend the supproted range by
switching to VIR_TYPED_PARAM_ULLONG. To preserve compatibility we've
added APIs such as 'virTypedParamsGetUnsigned' and
'virTypedParamListAddUnsigned' which automatically select the bigger
type if necessary.
This patch adds a
The header uses both styles randomly, switch it to the contemporary
style.
Signed-off-by: Peter Krempa
---
src/util/virtypedparam.h | 140 ++-
1 file changed, 80 insertions(+), 60 deletions(-)
diff --git a/src/util/virtypedparam.h b/src/util/virtypedparam.h
The struct will be made private in upcoming patches. Construct the list
of block entries into a separate list and append them rather than
remember the index of the count element.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 16 ++--
1 file changed, 6 insertions(+), 10
All changed lines even fit into 80 columns.
Signed-off-by: Peter Krempa
---
src/util/virtypedparam.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c
index 974ec51a79..fe4c04bcea 100644
---
Add an internal helper for fetching a typed parameter which can be
either of the '_UINT' or '_ULONG' type and store it in a unsigned long
long variable.
Since this is an internal helper it offers less protections against
invalid use compared to those we expose as public API.
Signed-off-by: Peter
Currently we allow configuring the 'poll-max-ns', 'poll-grow', and
'poll-shrink' parameters of qemu iothreads only during runtime and they
are not persisted. Add XML machinery to persist them.
Signed-off-by: Peter Krempa
---
docs/formatdomain.rst | 11 -
Introduce a helper that fetches the typed parameters from the list while
still preserving ownership of the pointer by the list.
In the future this will be also able to report errors stored in the
list.
Signed-off-by: Peter Krempa par;
+
+if (npar)
+*npar = list->npar;
+
+return
Signed-off-by: Peter Krempa
---
src/driver.c| 7 ++-
src/remote/remote_daemon_dispatch.c | 8 +++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/driver.c b/src/driver.c
index c7a9c2659f..35f8156605 100644
--- a/src/driver.c
+++ b/src/driver.c
Add an allocator function and refactor all allocations to use it. In
upcoming patches 'struct _virTypedParamList' will be made private.
Signed-off-by: Peter Krempa
---
src/admin/admin_server.c | 6 +++---
src/libvirt_private.syms | 1 +
src/qemu/qemu_domainjob.c | 2 +-
src/qemu/qemu_driver.c
Ensure that all switch statements in this module use the proper type in
switch() statements to ensure complier protections.
Signed-off-by: Peter Krempa
---
src/util/virtypedparam.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/util/virtypedparam.c
Ensure that all callers access it via the APIs.
Signed-off-by: Peter Krempa
---
src/util/virtypedparam.c | 7 +++
src/util/virtypedparam.h | 5 -
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c
index
Introduce a helper function to concatenate two virTypedParamLists. This
will allow us to refactor qemuDomainGetStatsBlock to not access the list
directly.
Signed-off-by: Peter Krempa
---
src/libvirt_private.syms | 1 +
src/util/virtypedparam.c | 24
Implement the support for the persisted poll parameters and remove
restrictions on saving config when modifying them during runtime.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_command.c | 18 +++
src/qemu/qemu_driver.c| 30
Use automatic memory cleanup for the 'keys' and 'sorted' helpers and
remove the 'cleanup' label. Since this patch is modifying variable
declarations ensure that all declarations conform with our coding style.
Signed-off-by: Peter Krempa
---
src/util/virtypedparam.c | 31
QEMU accepts even values bigger than INT_MAX. The reasoning for these
checks was that the QAPI definition declares them as 'int', but in QAPI
terms that's any number as it's JSON.
Remove the validation as well as the comment missintepreting the QAPI
definiton.
Signed-off-by: Peter Krempa
---
There are two callers of virTypedParameterAssignValueVArgs.
- 'virTypedParameterAssignValue' always uses the correct type, thus
doesn't need to be modified. Just use the proper type in the function
declaration
- 'virTypedParameterAssign' can get improper type, but we can move the
The function now return always 0. Refactor the code and remove return
values.
Signed-off-by: Peter Krempa
---
src/admin/admin_server.c | 108 -
src/qemu/qemu_domainjob.c | 45 ++
src/qemu/qemu_driver.c| 330 --
src/test/test_driver.c
Previous version:
https://listman.redhat.com/archives/libvir-list/2023-March/239164.html
Changes:
- patches 1 - 23 are new and do the following
- refactors to typed param handling 1 - 15, 18
- addition of new typed param APIs needed for changing the type we
use to store the poll
All callers pass 'true'.
Signed-off-by: Peter Krempa
---
src/util/virtypedparam.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c
index e6ad9ec7a9..0cca16053d 100644
--- a/src/util/virtypedparam.c
+++
The qemu driver now accepts also _ULLONG as type for bigger numbers. Use
the 'virTypedParamListAddUnsigned' helper to use the bigger typed
parameter type if necessary to allow full range of the values while
preserving compatibility.
Signed-off-by: Peter Krempa
---
tools/virsh-domain.c | 15
Convert the internal types to unsigned long long. Luckily we can also
covert the external types too:
- 'qemuDomainSetIOThreadParams' can accept both _UINT and _ULLONG by
converting to 'virTypedParamsGetUnsigned'
- querying is handled via the bulk stats API which is flexible:
- we use
The only non-abort()-ing error which can happen is if the field name is
too long. Store the overly long name in the virTypedParamList container
so that in upcoming patches the helpers adding to the list can be
refactored to not have a return value.
Signed-off-by: Peter Krempa
---
On 4/17/23 8:09 AM, Michal Privoznik wrote:
This is a relict of v3.7.0-rc1~132 when getter/setter APIs for
s/relict/relic/ :-)
(also, I like using the upstream commit ID (preceded by the word
"commit" to identify a particular commit, because gitk automagically
turns that into a link that
On a Monday in 2023, Michal Privoznik wrote:
*** BLURB HERE ***
Michal Prívozník (3):
networkUpdateState: do not assume dnsmasq_caps
conf: Initialize _virNetworkObj::dnsmasqPid to -1 in
virNetworkObjNew()
networkRefreshDhcpDaemon: Get dnsmasq's PID once
src/conf/virnetworkobj.c| 1 +
On 4/19/23 04:13, Laine Stump wrote:
> On 4/18/23 1:18 PM, Nick Guenther wrote:
>> April 18, 2023 3:37 AM, "Peter Krempa" wrote:
>>
>>> cases of code style not being aligned from what libvirt does normally
>>> ...
>>
>> I'm very happy to conform my style as needed. I just want my users to
>> be
67 matches
Mail list logo