From: Xu Chao
When VIR_EXEC_DAEMON is set, if virPidFileAcquirePath/virSetInherit failed,
then pipesync[0] can not be closed when granchild process exit, because
pipesync[1] still opened in child process. and then saferead in child
process may blocked forever, and left grandchild process in defun
This patch rewrites the pattern using early return where it is
not needed.
Signed-off-by: Kristina Hanicova
---
src/qemu/qemu_alias.c | 41 -
1 file changed, 16 insertions(+), 25 deletions(-)
diff --git a/src/qemu/qemu_alias.c b/src/qemu/qemu_alias.c
inde
I have seen this pattern a lot in the project, so I decided to
rewrite code I stumbled upon to the same pattern as well.
Signed-off-by: Kristina Hanicova
---
src/qemu/qemu_driver.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qe
The domain capabilities won't report TPM support unless SWTPM can be
initialized. To avoid relying on the swtpm install in the host, mock
the entire initialization method, since all it needs todo is return
a non-error value.
Signed-off-by: Daniel P. Berrangé
---
tests/domaincapsdata/qemu_2.11.0-
This adds reporting of available TPM models and backends to the domain
capabilities schema
Signed-off-by: Daniel P. Berrangé
---
docs/schemas/domaincaps.rng| 10 ++
src/conf/domain_capabilities.c | 14 ++
src/conf/domain_capabilities.h | 10 ++
3 files changed, 34
If we can report whuether TPM is available, then mgmt apps can enable it
by default for new VMs. This is important because OS like Win11 consider
TPM to be mandatory.
Daniel P. Berrangé (3):
conf: add TPM devices to domain capabilities
qemu: fill in domain capabilities for TPMs
qemu: mock sw
This reports what TPM features QEMU supports, provided that swtpm is
installed in the host.
Signed-off-by: Daniel P. Berrangé
---
src/qemu/qemu_capabilities.c | 32 +++
src/qemu/qemu_capabilities.h | 3 ++
.../domaincapsdata/qemu_2.11.0-q35.x86_
On Tue, Nov 16, 2021 at 07:23:52PM -0700, Jim Fehlig wrote:
> An API inject a launch secret into the domain's memory.
>
> Signed-off-by: Jim Fehlig
> ---
> include/libvirt/libvirt-domain.h | 6
> src/driver-hypervisor.h | 8 +
> src/libvirt-domain.c | 50 +
I think it makes no sense to have else branches after return or
goto as it will never reach them in cases it should not. This
patch makes the code more readable (at least to me).
Signed-off-by: Kristina Hanicova
---
src/libvirt.c | 3 ++-
src/qemu/qemu_agent.c | 6 +++
On 11/23/21 17:40, Daniel P. Berrangé wrote:
> When a build fails it is helpful to know what packages were installed,
> because by the time we look at the build job output, the original
> container image might have changed.
>
> Signed-off-by: Daniel P. Berrangé
> ---
> .gitlab-ci.yml | 2 ++
> 1
On 11/23/21 17:34, Kristina Hanicova wrote:
> This patch removes variables such as 'ret', 'rc' and others which
> are easily replaced. Therefore, making the code look cleaner and
> easier to understand.
>
> Signed-off-by: Kristina Hanicova
> ---
> src/driver.c | 4 +--
> src/q
Upon successful return from virInterfaceObjListAssignDef() the
virInterfaceObj is the owner of secret definition. To make this
ownership transfer even more visible, lets pass the definition as
a double pointer and use g_steal_pointer().
Signed-off-by: Michal Privoznik
---
src/conf/virinterfaceob
Upon successful return from virDomainObjListAdd() the
virDomainObj is the owner of secret definition. To make this
ownership transfer even more visible, lets pass the definition as
a double pointer and use g_steal_pointer().
Signed-off-by: Michal Privoznik
---
src/bhyve/bhyve_driver.c| 6 ++
Upon successful return from virStoragePoolObjListAdd() the
virStoragePoolObj is the owner of secret definition. To make this
ownership transfer even more visible, lets pass the definition as
a double pointer and use g_steal_pointer().
Signed-off-by: Michal Privoznik
---
src/conf/virstorageobj.c
Upon successful return from virSecretObjListAdd() the
virSecretObj is the owner of secret definition. To make this
ownership transfer even more visible, lets pass the definition as
a double pointer and use g_steal_pointer().
Signed-off-by: Michal Privoznik
---
src/conf/virsecretobj.c| 26 +++
At a lot of places we have the following pattern:
virXXXDef *def = parseDef();
if (!(obj = virXXXObjListAdd(def)))
goto clenaup;
def = NULL;
cleanup:
virXXXDefFree(def);
The 'def = NULL' step is necessary because the ownership of the
definition was transferred onto the object. Wel
When a build fails it is helpful to know what packages were installed,
because by the time we look at the build job output, the original
container image might have changed.
Signed-off-by: Daniel P. Berrangé
---
.gitlab-ci.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitlab-ci.yml b
This patch removes variables such as 'ret', 'rc' and others which
are easily replaced. Therefore, making the code look cleaner and
easier to understand.
Signed-off-by: Kristina Hanicova
---
src/driver.c | 4 +--
src/qemu/qemu_agent.c | 4 +--
src/qemu/qemu_alias.c
On Tue, Nov 23, 2021 at 04:49:52PM +0100, Ján Tomko wrote:
On a Tuesday in 2021, Martin Kletzander wrote:
On Tue, Nov 23, 2021 at 03:40:46PM +0100, Kristina Hanicova wrote:
On Tue, Nov 23, 2021 at 3:20 PM Ján Tomko wrote:
Fixes: 59c1bc3a0e25e6d725db41990f11e0b53137115d
Fixes: 43820e4b8037680
On a Tuesday in 2021, Martin Kletzander wrote:
On Tue, Nov 23, 2021 at 03:40:46PM +0100, Kristina Hanicova wrote:
On Tue, Nov 23, 2021 at 3:20 PM Ján Tomko wrote:
Fixes: 59c1bc3a0e25e6d725db41990f11e0b53137115d
Fixes: 43820e4b8037680ec451761216750c6b139db67a
Fixes: 600f580d623ae4077ddeb6c7cb2
On 11/23/21 14:51, Daniel P. Berrangé wrote:
> This ensures at least one mingw job is gating for pipelines
>
> Daniel P. Berrangé (3):
> ci: replace Fedora 33 with Fedora 35
> ci: refresh variables/dockerfiles with latest content
> ci: run a mingw64 job on stable Fedora
>
> ci/cirrus/freeb
On Tue, Nov 23, 2021 at 03:40:46PM +0100, Kristina Hanicova wrote:
On Tue, Nov 23, 2021 at 3:20 PM Ján Tomko wrote:
Fixes: 59c1bc3a0e25e6d725db41990f11e0b53137115d
Fixes: 43820e4b8037680ec451761216750c6b139db67a
Fixes: 600f580d623ae4077ddeb6c7cb24f8a315a7c73b
Signed-off-by: Ján Tomko
---
tes
On a Tuesday in 2021, Martin Kletzander wrote:
This eliminates one incorrect parsing implementation which relied on the
command field not having a closing bracket. This possibility is already
tested against in the virProcessGetStat() tests.
Signed-off-by: Martin Kletzander
---
src/qemu/qemu_dr
On a Tuesday in 2021, Martin Kletzander wrote:
This reads and separates all fields from /proc//stat or
/proc//task//stat as there are easy mistakes to be done in the
implementation. Some tests are added to show it works correctly. No number
parsing is done as it would be unused for most of the
On Tue, Nov 23, 2021 at 3:21 PM Ján Tomko wrote:
> Ján Tomko (4):
> tools: virt-host-validate: fix memory leak
> vbox: fix vboxCapsInit
> ch: fix logic in virCHMonitorBuildPtyJson
> tests: pcivpdtest: check return value of virCreateAnonymousFile
>
> src/ch/ch_monitor.c | 4 +--
On Tue, Nov 23, 2021 at 3:20 PM Ján Tomko wrote:
> Fixes: 59c1bc3a0e25e6d725db41990f11e0b53137115d
> Fixes: 43820e4b8037680ec451761216750c6b139db67a
> Fixes: 600f580d623ae4077ddeb6c7cb24f8a315a7c73b
> Signed-off-by: Ján Tomko
> ---
> tests/virpcivpdtest.c | 20
> 1 file cha
On a Tuesday in 2021, Pavel Hrdina wrote:
Pavel Hrdina (2):
qemu_monitor: remove unused load snapshot code
virsh: man: update snapshot-revert description
docs/manpages/virsh.rst | 4
src/qemu/qemu_monitor.c | 11 ---
src/qemu/qemu_monitor.h | 1 -
src/qemu/qemu_monit
From: "Hyman Huang(黄勇)"
v7
- rebase on master
- modify the following points according to the advice given by Peter
1. skip the -accel switch and reuse the existing commit d20ebdda2
'qemu: Switch to -accel'
2. remove the post-parse function and do the parse work in
virDomainFeature
On a Monday in 2021, Peter Krempa wrote:
The functions have very difficult semantics where callers are not able
to tell whether the property is missing or failed the length check. Only
the latter produces errors.
Since usage of the functions was phased out, remove them completely to
avoid furthe
From: Hyman Huang(黄勇)
Dirty ring feature was introduced in qemu-6.1.0, this patch
add the corresponding feature named 'dirty-ring', which enable
dirty ring feature when starting vm.
To implement the dirty-ring feature, dirty_ring_size in struct
"_virDomainDef" is introduced to hold the dirty rin
From: Hyman Huang(黄勇)
Update the KVM feature tests for dirty ring.
Signed-off-by: Hyman Huang(黄勇)
---
tests/qemuxml2argvdata/kvm-features-off.xml | 1 +
tests/qemuxml2argvdata/kvm-features.args | 2 +-
tests/qemuxml2argvdata/kvm-features.xml | 1 +
tests/qemuxml2xmloutdata/kvm-fea
On a Monday in 2021, Peter Krempa wrote:
The function produces an error which is ignored in this code path.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signatur
On a Monday in 2021, Peter Krempa wrote:
virXPathStringLimit doesn't give callers a way to differentiate between
the queried XPath being empty and the length limit being exceeded.
This means that the callers is completely ignoring the error.
Move the length check into the caller.
Signed-off-by
On a Monday in 2021, Peter Krempa wrote:
On Mon, Nov 22, 2021 at 18:12:29 +0100, Peter Krempa wrote:
Apart from code simplification the refactor of 'model' fixes an unlikely
memory leak of the string if a duplicate model is found.
While the coversion of 'label' variable may seem unnecessary it
On a Monday in 2021, Peter Krempa wrote:
virXPathStringLimit doesn't give callers a way to differentiate between
the queried XPath being empty and the length limit being exceeded.
This means that callers are either overwriting the error message or
ignoring it altogether.
Move the length checks
On a Monday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 19 ---
1 file changed, 8 insertions(+), 11 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On a Monday in 2021, Peter Krempa wrote:
virXPathStringLimit doesn't give callers a way to differentiate between
the queried XPath being empty and the length limit being exceeded.
This means that callers are overwriting the error message.
Move the length checks into the caller.
Signed-off-by:
On a Monday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On a Monday in 2021, Peter Krempa wrote:
Use separate variables for 'model' and 'relabel' properties.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 20
src/util/virseclabel.h | 1 +
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/src/util/virseclab
On a Monday in 2021, Peter Krempa wrote:
'seclabel->label', 'seclabel->imagelabel' and 'seclabel->baselabel' are
populated by stealing the pointer from the 'p' temporary string. Remove
the extra step.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 20
1 file change
We've changed the behavior of this API that from now on it will always
restart the VM process and we are no longer able to revert to snapshots
created by libvirt older then 0.9.5.
Signed-off-by: Pavel Hrdina
---
docs/manpages/virsh.rst | 4
1 file changed, 4 insertions(+)
diff --git a/docs
Pavel Hrdina (2):
qemu_monitor: remove unused load snapshot code
virsh: man: update snapshot-revert description
docs/manpages/virsh.rst | 4
src/qemu/qemu_monitor.c | 11 ---
src/qemu/qemu_monitor.h | 1 -
src/qemu/qemu_monitor_text.c | 36 ---
Recent cleanup of snapshot revert code made these function unused.
Signed-off-by: Pavel Hrdina
---
src/qemu/qemu_monitor.c | 11 ---
src/qemu/qemu_monitor.h | 1 -
src/qemu/qemu_monitor_text.c | 36
src/qemu/qemu_monitor_text.h | 1 -
4 fi
Fixes: 59c1bc3a0e25e6d725db41990f11e0b53137115d
Fixes: 43820e4b8037680ec451761216750c6b139db67a
Fixes: 600f580d623ae4077ddeb6c7cb24f8a315a7c73b
Signed-off-by: Ján Tomko
---
tests/virpcivpdtest.c | 20
1 file changed, 20 insertions(+)
diff --git a/tests/virpcivpdtest.c b/test
There is a leftover 'ptys' variable, which we only assign
to and one assignment to 'content', where we add an empty
'pty' object.
Remove 'ptys'.
Fixes: 93accefd9eca1bc3d7e923a979ab2d1b8a312ff7
Signed-off-by: Ján Tomko
---
src/ch/ch_monitor.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions
There is a stray mis-indented 'return NULL' left after a recent
refactor.
Fixes: c18d9e23fafabcfbb80481e0705931036b8e7331
Signed-off-by: Ján Tomko
---
src/vbox/vbox_common.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 62c8e22cb5..72f1b
virHostValidateGetCPUFlags returns an allocated virBitmap and
it needs to be freed.
Fixes: a0ec7165e3bbc416478740f6d2e8fef2ece18602
Signed-off-by: Ján Tomko
---
tools/virt-host-validate-ch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virt-host-validate-ch.c b/tools
Ján Tomko (4):
tools: virt-host-validate: fix memory leak
vbox: fix vboxCapsInit
ch: fix logic in virCHMonitorBuildPtyJson
tests: pcivpdtest: check return value of virCreateAnonymousFile
src/ch/ch_monitor.c | 4 +---
src/vbox/vbox_common.c| 1 -
tests/virpcivpdtest.c
Both of the current mingw jobs are marked as 'allow_failure' because
they are running against Fedora rawhide which is an unstable distro.
We need at least one mingw job to be gating to more reliably detect
problems.
This introduces dockerfiles for both mingw variants on Fedora 35
and sets the min
This ensures at least one mingw job is gating for pipelines
Daniel P. Berrangé (3):
ci: replace Fedora 33 with Fedora 35
ci: refresh variables/dockerfiles with latest content
ci: run a mingw64 job on stable Fedora
ci/cirrus/freebsd-12.vars | 7 +-
ci/cirrus/freebsd-13.
- The Cirrus CI variables are now sorted
- The dockerfiles update commands changed for some distros
- Meson in CentOS is now new enough to use
Signed-off-by: Daniel P. Berrangé
---
ci/cirrus/freebsd-12.vars | 7 +--
ci/cirrus/freebsd-13.vars
Signed-off-by: Daniel P. Berrangé
---
...ora-33.Dockerfile => fedora-35.Dockerfile} | 2 +-
ci/gitlab.yml | 20 +--
ci/manifest.yml | 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
rename ci/containers/{f
On 11/23/21 13:50, Koichi Murase wrote:
> Thank you for reviewing the patch.
>
> 2021年11月23日(火) 21:37 Michal Prívozník :
>> [...]
>>
>> The word variable is also used only inside a while loop (not visible in
>> the context). So it can be declared local there instead of here. I'll
>> fix that befor
On a Monday in 2021, Peter Krempa wrote:
Use the appropriate enum type instead of an int and fix the XML parser
and one missing fully populated switch.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 14 +-
src/security/security_selinux.c | 3 ++-
src/util/virseclab
On a Monday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/util/virseclabel.h | 3 +++
1 file changed, 3 insertions(+)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
Thank you for reviewing the patch.
2021年11月23日(火) 21:37 Michal Prívozník :
> [...]
>
> The word variable is also used only inside a while loop (not visible in
> the context). So it can be declared local there instead of here. I'll
> fix that before pushing.
OK.
> However, we do require developer
On 11/14/21 07:06, Koichi Murase wrote:
> ---
> tools/bash-completion/vsh.in | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/bash-completion/vsh.in b/tools/bash-completion/vsh.in
> index 70ade50a02..4399ff0a64 100644
> --- a/tools/bash-completion/vsh.in
> +++ b
On Tue, Nov 23, 2021 at 11:56:40AM +, Daniel P. Berrangé wrote:
On Tue, Nov 23, 2021 at 12:55:00PM +0100, Martin Kletzander wrote:
On Mon, Nov 22, 2021 at 10:07:39AM +, Daniel P. Berrangé wrote:
> On Mon, Nov 22, 2021 at 11:03:53AM +0100, Martin Kletzander wrote:
> > On Mon, Nov 22, 2021
On 11/23/21 12:57, Roman Bogorodskiy wrote:
> The cpuset_getaffinity() function is checked in sys/cpuset.h to see if
> BSD CPU affinity APIs are available. This check requires including
> sys/param.h to work properly, otherwise the test program fails with
> unrelated errors like:
>
> /usr/include/
On Tue, Nov 23, 2021 at 03:57:56PM +0400, Roman Bogorodskiy wrote:
The cpuset_getaffinity() function is checked in sys/cpuset.h to see if
BSD CPU affinity APIs are available. This check requires including
sys/param.h to work properly, otherwise the test program fails with
unrelated errors like:
The cpuset_getaffinity() function is checked in sys/cpuset.h to see if
BSD CPU affinity APIs are available. This check requires including
sys/param.h to work properly, otherwise the test program fails with
unrelated errors like:
/usr/include/sys/cpuset.h:155:1: error: unknown type name
'__BEGIN_DE
On Tue, Nov 23, 2021 at 12:55:00PM +0100, Martin Kletzander wrote:
> On Mon, Nov 22, 2021 at 10:07:39AM +, Daniel P. Berrangé wrote:
> > On Mon, Nov 22, 2021 at 11:03:53AM +0100, Martin Kletzander wrote:
> > > On Mon, Nov 22, 2021 at 09:23:01AM +, Daniel P. Berrangé wrote:
> > > > On Sun, N
On Mon, Nov 22, 2021 at 04:38:42PM +0100, Ján Tomko wrote:
On a Sunday in 2021, Martin Kletzander wrote:
With this function we can decide whether to try running the polkit text agent
only if it is available, removing a potential needless error saying that the
agent binary does not exist, which i
On Mon, Nov 22, 2021 at 10:07:39AM +, Daniel P. Berrangé wrote:
On Mon, Nov 22, 2021 at 11:03:53AM +0100, Martin Kletzander wrote:
On Mon, Nov 22, 2021 at 09:23:01AM +, Daniel P. Berrangé wrote:
> On Sun, Nov 21, 2021 at 12:10:08AM +0100, Martin Kletzander wrote:
> > The reason for this
Martin Kletzander wrote:
> On Mon, Nov 22, 2021 at 03:22:11PM +0400, Roman Bogorodskiy wrote:
> > Martin Kletzander wrote:
> >
> >> On Sun, Nov 21, 2021 at 07:58:55PM +0400, Roman Bogorodskiy wrote:
> >> >Recently, FreeBSD has got sched_get/setaffinity(3) implementations and
> >> >the sched.h h
On Mon, Nov 22, 2021 at 03:22:11PM +0400, Roman Bogorodskiy wrote:
Martin Kletzander wrote:
On Sun, Nov 21, 2021 at 07:58:55PM +0400, Roman Bogorodskiy wrote:
>Recently, FreeBSD has got sched_get/setaffinity(3) implementations and
>the sched.h header as well [1]. To make these routines visible
This reads and separates all fields from /proc//stat or
/proc//task//stat as there are easy mistakes to be done in the
implementation. Some tests are added to show it works correctly. No number
parsing is done as it would be unused for most of the fields most, if not all,
of the time. No struct
While working on some polkit stuff I found out that we are inconsistent with the
way we parse /proc/*/stat files, so I added a new helper instead along with some
tests. Unfortunately using it for the thing I wanted is not really viable in
the end, so it "violates" the Rule of three, but at least i
This eliminates one incorrect parsing implementation which relied on the
command field not having a closing bracket. This possibility is already
tested against in the virProcessGetStat() tests.
Signed-off-by: Martin Kletzander
---
src/qemu/qemu_driver.c | 34 ++
src/
On Mon, Nov 22, 2021 at 09:59:07AM +, Daniel P. Berrangé wrote:
On Mon, Nov 22, 2021 at 10:34:38AM +0100, Martin Kletzander wrote:
On Mon, Nov 22, 2021 at 09:18:41AM +, Daniel P. Berrangé wrote:
> On Sun, Nov 21, 2021 at 12:04:26AM +0100, Martin Kletzander wrote:
> > This eliminates one
On Mon, Nov 22, 2021 at 21:01:58 +0100, Tim Wiederhake wrote:
> On Mon, 2021-11-22 at 18:12 +0100, Peter Krempa wrote:
> > virXPathStringLimit doesn't give callers a way to differentiate
> > between
> > the queried XPath being empty and the length limit being exceeded.
> >
> > This means that call
On Tue, Nov 23, 2021 at 09:20:20 +0100, Pavel Hrdina wrote:
> When active snapshot is reverted we stop CPUs in order to load the
> snapshot but we never start the CPUs again.
>
> Signed-off-by: Pavel Hrdina
> ---
> src/test/test_driver.c | 3 +++
> tests/virsh-snapshot | 14 +++---
>
On Mon, Nov 22, 2021 at 21:02:01 +0100, Tim Wiederhake wrote:
> On Mon, 2021-11-22 at 18:12 +0100, Peter Krempa wrote:
> > Apart from code simplification the refactor of 'model' fixes an
> > unlikely
> > memory leak of the string if a duplicate model is found.
> >
> > While the coversion of 'label
When active snapshot is reverted we stop CPUs in order to load the
snapshot but we never start the CPUs again.
Signed-off-by: Pavel Hrdina
---
src/test/test_driver.c | 3 +++
tests/virsh-snapshot | 14 +++---
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/test/tes
74 matches
Mail list logo