Re: [PATCH] news: document `virsh console --resume` and `virsh (start|create) --console`

2023-10-25 Thread Marc Hartmayer
On Wed, Oct 25, 2023 at 12:24 PM +0200, Martin Kletzander wrote: > On Wed, Oct 25, 2023 at 11:03:54AM +0200, Marc Hartmayer wrote: >>Document the following changes: >> + added `virsh console --resume` subcommand option >> + improved `virsh start --console` behavior >&g

Re: [PATCH libvirt v1 0/3] Ensure full early console access with libvirt

2023-10-25 Thread Marc Hartmayer
On Tue, Oct 24, 2023 at 09:29 AM -0700, Andrea Bolognani wrote: > On Tue, Oct 24, 2023 at 05:14:41PM +0200, Marc Hartmayer wrote: >> On Tue, Oct 24, 2023 at 02:12 PM +0200, Michal Prívozník >> wrote: >> > On 9/28/23 17:37, Marc Hartmayer wrote: >> >> Ma

[PATCH] news: document `virsh console --resume` and `virsh (start|create) --console`

2023-10-25 Thread Marc Hartmayer
Document the following changes: + added `virsh console --resume` subcommand option + improved `virsh start --console` behavior + improved `virsh create --console` behavior Signed-off-by: Marc Hartmayer --- NEWS.rst | 15 +++ 1 file changed, 15 insertions(+) diff --git a/NEWS.rst

Re: [PATCH libvirt v1 0/3] Ensure full early console access with libvirt

2023-10-24 Thread Marc Hartmayer
On Tue, Oct 24, 2023 at 02:12 PM +0200, Michal Prívozník wrote: > On 9/28/23 17:37, Marc Hartmayer wrote: >> Currently, early console output may be lost, e.g. if starting a guest with >> `virsh start --console` guest, which can make debugging of early failures >> very >&

Re: [PATCH libvirt v1 0/3] Ensure full early console access with libvirt

2023-10-19 Thread Marc Hartmayer
On Wed, Oct 11, 2023 at 10:05 AM +0200, "Marc Hartmayer" wrote: > On Thu, Sep 28, 2023 at 05:37 PM +0200, Marc Hartmayer > wrote: >> Currently, early console output may be lost, e.g. if starting a guest with >> `virsh start --console` guest, which can make debuggin

Re: [PATCH libvirt v1 0/3] Ensure full early console access with libvirt

2023-10-11 Thread Marc Hartmayer
On Thu, Sep 28, 2023 at 05:37 PM +0200, Marc Hartmayer wrote: > Currently, early console output may be lost, e.g. if starting a guest with > `virsh start --console` guest, which can make debugging of early failures very > difficult > (like zipl messages or disabled wait conditio

[PATCH libvirt v1 3/3] Improve `virsh create --console` behavior

2023-09-28 Thread Marc Hartmayer
Reviewed-by: Boris Fiuczynski Signed-off-by: Marc Hartmayer --- tools/virsh-domain.c | 34 -- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 36670039444c..2f055df0d97d 100644 --- a/tools/virsh-domain.c

[PATCH libvirt v1 2/3] Improve `virsh start --console` behavior

2023-09-28 Thread Marc Hartmayer
-by: Boris Fiuczynski Signed-off-by: Marc Hartmayer --- tools/virsh-domain.c | 50 +++- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 5c3c6d18aebf..36670039444c 100644 --- a/tools/virsh-domain.c

[PATCH libvirt v1 0/3] Ensure full early console access with libvirt

2023-09-28 Thread Marc Hartmayer
side just (re-)connected` [1] Changelog: RFCv1->v1: + rebased on current master + worked in comments from Daniel [1] https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg02725.html Marc Hartmayer (3): virsh: add `console --resume` support Improve `virsh start --console` behavior Impr

[PATCH libvirt v1 1/3] virsh: add `console --resume` support

2023-09-28 Thread Marc Hartmayer
e messages. Reviewed-by: Boris Fiuczynski Signed-off-by: Marc Hartmayer --- tools/virsh-console.c | 8 tools/virsh-console.h | 1 + tools/virsh-domain.c | 14 ++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/tools/virsh-console.c b/tools/virsh-conso

Re: [RFC PATCH libvirt v1 2/3] Improve `virsh start --console` behavior

2023-09-26 Thread Marc Hartmayer
On Mon, Sep 25, 2023 at 04:15 PM +0100, Daniel P. Berrangé wrote: > On Mon, Sep 25, 2023 at 03:39:09PM +0200, Marc Hartmayer wrote: >> When starting a guest via libvirt (`virsh start --console`), early >> console output was missed because the guest was started first and then

[RFC PATCH libvirt v1 0/3] Ensure full early console access with libvirt

2023-09-25 Thread Marc Hartmayer
side just (re-)connected` [1] [1] https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg02725.html Marc Hartmayer (3): virsh: add `console --resume` support Improve `virsh start --console` behavior Improve `virsh create --console` behavior tools/virsh-console.c | 8 tools/virsh

[RFC PATCH libvirt v1 2/3] Improve `virsh start --console` behavior

2023-09-25 Thread Marc Hartmayer
-by: Boris Fiuczynski Signed-off-by: Marc Hartmayer --- tools/virsh-domain.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 5c3c6d18aebf..3581161c6f53 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c

[RFC PATCH libvirt v1 3/3] Improve `virsh create --console` behavior

2023-09-25 Thread Marc Hartmayer
Reviewed-by: Boris Fiuczynski Signed-off-by: Marc Hartmayer --- tools/virsh-domain.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 3581161c6f53..5a97d44190c4 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh

[RFC PATCH libvirt v1 1/3] virsh: add `console --resume` support

2023-09-25 Thread Marc Hartmayer
e messages. Reviewed-by: Boris Fiuczynski Signed-off-by: Marc Hartmayer --- tools/virsh-console.c | 8 tools/virsh-console.h | 1 + tools/virsh-domain.c | 14 ++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/tools/virsh-console.c b/tools/virsh-conso

Re: [PATCH] tests: viracpitest only works on little endian

2023-04-18 Thread Marc Hartmayer
test' }, > @@ -308,6 +307,12 @@ tests += [ >{ 'name': 'virmigtest' }, > ] > > +if host_machine.endian() == 'little' > + tests += [ > +{ 'name': 'viracpitest' }, > + ] > +endif > + > if host_machine.system() == 'linux' >tests += [ > { 'name': 'fchosttest' }, > -- > 2.39.0 LGTM. Reviewed-by: Marc Hartmayer

Re: [PATCH] qemuValidateDomainDef: Clarify error message when S390 PV launch security is unsupported by the kernel

2022-08-30 Thread Marc Hartmayer
quot;)); Not sure if the error message is clear enough… PV also depends on the kernel cmdline opt-in - `prot_virt=1` has to be set. > return -1; > } > break; > -- > 2.37.1 > Reviewed-by: Marc Hartmayer Thanks for fixing this. -- Kind regards / Beste

Re: [PATCH 0/2] virtiofs can be used without NUMA

2020-10-13 Thread Marc Hartmayer
On Tue, Oct 13, 2020 at 07:10 PM +0200, Michal Privoznik wrote: > On 10/13/20 6:53 PM, Marc Hartmayer wrote: >> Halil Pasic (1): >>Reflect in virtiofs.rst that virtiofs can be used without NUMA >> >> Marc Hartmayer (1): >>qemu: virtiofs can be used witho

[PATCH 2/2] Reflect in virtiofs.rst that virtiofs can be used without NUMA

2020-10-13 Thread Marc Hartmayer
From: Halil Pasic Reflect in the virtiofs documentation that virtiofs can now be used even without NUMA. While at it, be more precise where and why shared memory is required. Signed-off-by: Halil Pasic Signed-off-by: Marc Hartmayer --- docs/kbase/virtiofs.rst | 17 - 1 file

[PATCH 1/2] qemu: virtiofs can be used without NUMA nodes

2020-10-13 Thread Marc Hartmayer
-by: Marc Hartmayer --- src/qemu/qemu_validate.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 27e10d59fd25..bc3043bb3f0d 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3470,14

[PATCH 0/2] virtiofs can be used without NUMA

2020-10-13 Thread Marc Hartmayer
Halil Pasic (1): Reflect in virtiofs.rst that virtiofs can be used without NUMA Marc Hartmayer (1): qemu: virtiofs can be used without NUMA nodes docs/kbase/virtiofs.rst | 17 - src/qemu/qemu_validate.c | 13 + 2 files changed, 21 insertions(+), 9 deletions

Re: [RFC] qemu: virtiofs can be used without NUMA nodes

2020-10-13 Thread Marc Hartmayer
On Tue, Oct 06, 2020 at 06:20 PM +0200, Marc Hartmayer wrote: > ...if a machine memory-backend using shared memory is configured for > the guest. This is especially important for QEMU machine types that > don't have NUMA but virtiofs support. > > An example snippet: &g

[RFC] qemu: virtiofs can be used without NUMA nodes

2020-10-06 Thread Marc Hartmayer
-by: Marc Hartmayer --- Note: There are still some TODOs left... e.g. adapt the virtiofs documentation of libvirt. --- src/qemu/qemu_validate.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index a212605579d2

[PATCH] udevProcessCSS: fix segfault

2020-09-21 Thread Marc Hartmayer
evlinks = 0x3ff90194670, caps = 0x3ff90194380 } Fixes: 05e6cdafa6e0 ("node_device: detect CSS devices") Reviewed-by: Boris Fiuczynski Signed-off-by: Marc Hartmayer --- src/node_device/node_device_udev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/node

Re: [PATCH 0/3] Avoid some GCC 10 warnings

2020-08-18 Thread Marc Hartmayer
.c| 2 +- >> 3 files changed, 6 insertions(+), 6 deletions(-) >> >> -- >> 2.25.1 >> > > Reviewed-by: Erik Skultety > Thanks. -- Kind regards / Beste Grüße Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsi

Re: [PATCH 3/4] virdevmapper: Don't use libdevmapper to obtain dependencies

2020-08-06 Thread Marc Hartmayer
od‘ everything works because then ‘device-mapper‘ is listed in /proc/devices. > > causes the entry to appear, and from that moment on guest startup > will work as expected regardless of whether or not AppArmor is > enabled. > > I hope the information above can help someone who's familiar with the > code figure out a fix. I'll provide more if needed, just ask! I can > also provide prebuilt .deb files for 6.6.0 that consistently trigger > the issue when added to a bog standard Debian testing installation. > > -- > Andrea Bolognani / Red Hat / Virtualization > -- Kind regards / Beste Grüße Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Gregor Pillen Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294

Re: [PATCH v2 3/4] qemu: command: support for virtio packed option

2020-04-06 Thread Marc Hartmayer
QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM, > -QEMU_CAPS_VIRTIO_PCI_ATS); > +QEMU_CAPS_VIRTIO_PCI_ATS, > +QEMU_CAPS_VIRTIO_PACKED_QUEUES); > > DO_TEST("fd-memory-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE, > QEMU_CAPS_KVM); > diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c > index b4c83fcc..756d4e2c 100644 > --- a/tests/qemuxml2xmltest.c > +++ b/tests/qemuxml2xmltest.c > @@ -1291,7 +1291,8 @@ mymain(void) > QEMU_CAPS_DEVICE_VIDEO_PRIMARY, > QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM, > QEMU_CAPS_VIRTIO_PCI_ATS, > -QEMU_CAPS_DEVICE_VHOST_USER_GPU); > +QEMU_CAPS_DEVICE_VHOST_USER_GPU, > +QEMU_CAPS_VIRTIO_PACKED_QUEUES); > > DO_TEST("fd-memory-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE, > QEMU_CAPS_KVM); > -- > 2.24.1 Reviewed-by: Marc Hartmayer

Re: [PATCH v2 2/4] conf: domain: support for virtio packed option

2020-04-06 Thread Marc Hartmayer
ch source '%s'"), > + virTristateSwitchTypeToString(dst->packed), > + virTristateSwitchTypeToString(src->packed)); > +return false; > + } > return true; > } > > diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h > index 2038b54c..22f6990e 100644 > --- a/src/conf/domain_conf.h > +++ b/src/conf/domain_conf.h > @@ -2417,6 +2417,7 @@ struct _virDomainVsockDef { > struct _virDomainVirtioOptions { > virTristateSwitch iommu; > virTristateSwitch ats; > +virTristateSwitch packed; > }; > > /* > -- > 2.24.1 Reviewed-by: Marc Hartmayer

Re: [PATCH v2 1/4] qemu: capabilities: add 'packed' capability

2020-04-06 Thread Marc Hartmayer
emucapabilitiesdata/caps_5.0.0.ppc64.xml > b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml > index a6800482..b0891613 100644 > --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml > +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml > @@ -191,6 +191,7 @@ > > > > + >4002050 >0 >42900241 > diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml > b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml > index df3557d1..b73c4efd 100644 > --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml > +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml > @@ -228,6 +228,7 @@ > > > > + >4002091 >0 >43100241 > -- > 2.24.1 Reviewed-by: Marc Hartmayer

Re: [libvirt] [PATCH v4 2/7] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2020-01-14 Thread Marc Hartmayer
On Fri, Dec 13, 2019 at 03:32 PM -0500, Cole Robinson wrote: > On 12/12/19 8:46 AM, Marc Hartmayer wrote: >> On Wed, Dec 11, 2019 at 08:11 PM -0500, Cole Robinson >> wrote: >>> On 11/14/19 12:44 PM, Marc Hartmayer wrote: >>>> The commit 'close callback: mov

Re: [libvirt] [PATCH v2 1/4] util: Rewrite virGetUserDirectory() using g_get_home_dir()

2019-12-18 Thread Marc Hartmayer
dir()); I would suggest to use 'g_build_path' instead of 'g_strdup_printf'. E.g. g_build_path(G_DIR_SEPARATOR_S, g_get_home_dir(), "libvirt"); > } > > > -- > 2.23.0 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/

Re: [libvirt] [PATCH v4 6/7] remote: shrink the critical sections

2019-12-16 Thread Marc Hartmayer
On Fri, Dec 13, 2019 at 03:00 PM -0500, Cole Robinson wrote: > On 12/12/19 9:13 AM, Marc Hartmayer wrote: >> On Wed, Dec 11, 2019 at 07:48 PM -0500, Cole Robinson >> wrote: >>> On 11/14/19 12:44 PM, Marc Hartmayer wrote: >>>> To free the structs and save th

Re: [libvirt] [PATCH v4 6/7] remote: shrink the critical sections

2019-12-12 Thread Marc Hartmayer
On Wed, Dec 11, 2019 at 07:48 PM -0500, Cole Robinson wrote: > On 11/14/19 12:44 PM, Marc Hartmayer wrote: >> To free the structs and save the error, it is not necessary to hold >> @priv->lock, >> therefore move these parts after the mutex unlock. >> &g

Re: [libvirt] [PATCH v4 2/7] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2019-12-12 Thread Marc Hartmayer
On Wed, Dec 11, 2019 at 08:11 PM -0500, Cole Robinson wrote: > On 11/14/19 12:44 PM, Marc Hartmayer wrote: >> The commit 'close callback: move it to driver' (88f09b75eb99) moved >> the responsibility for the close callback to the driver. But if the >> d

Re: [libvirt] [PATCH v4 0/7] Fix virConnectRegisterCloseCallback and get rid of global variables

2019-12-10 Thread Marc Hartmayer
On Thu, Nov 14, 2019 at 06:44 PM +0100, Marc Hartmayer wrote: > The second patch of this patch series fixes the behavior of > virConnectRegisterCloseCallback. > > The subsequent patches remove the need to have the global variables > 'qemuProgram' and 'remoteProgram' in libvirtd.

[libvirt] [PATCH v4 2/7] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2019-11-14 Thread Marc Hartmayer
, for example memory leaks, as the caller cannot differentiate whether the close callback was 'really' registered or not. Therefore call directly @freecb if the connectRegisterCloseCallback API is not supported by the driver used by the connection and update the documentation. Signed-off-by: Marc

[libvirt] [PATCH v4 3/7] remote: Save reference to program in daemonClientEventCallback

2019-11-14 Thread Marc Hartmayer
As a result, you can later determine during the callback which program was used. This makes it easier to refactor the code in the future and is less prone to error. Signed-off-by: Marc Hartmayer Reviewed-by: Pavel Hrdina --- src/remote/remote_daemon_dispatch.c | 108

[libvirt] [PATCH v4 5/7] rpc: Introduce virNetServerGetProgramLocked helper function

2019-11-14 Thread Marc Hartmayer
This patch introduces virNetServerGetProgramLocked. It's a function to determine which program has to be used for a given @msg. This function will be reused in the next patch. Signed-off-by: Marc Hartmayer Reviewed-by: Pavel Hrdina --- src/rpc/virnetserver.c | 28

[libvirt] [PATCH v4 4/7] remote: Use domainClientEventCallbacks for remoteReplayConnectionClosedEvent

2019-11-14 Thread Marc Hartmayer
This allows us later to get rid of another usage of the global variable `remoteProgram`. Signed-off-by: Marc Hartmayer Reviewed-by: Pavel Hrdina --- src/remote/remote_daemon_dispatch.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/remote

[libvirt] [PATCH v4 0/7] Fix virConnectRegisterCloseCallback and get rid of global variables

2019-11-14 Thread Marc Hartmayer
hes - Added r-b to patch 5 - Worked in comments - Rebased - Added patches 7-9 Marc Hartmayer (7): rpc: use the return value of virObjectRef directly virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback remote: Save reference to program

[libvirt] [PATCH v4 6/7] remote: shrink the critical sections

2019-11-14 Thread Marc Hartmayer
To free the structs and save the error, it is not necessary to hold @priv->lock, therefore move these parts after the mutex unlock. Signed-off-by: Marc Hartmayer --- src/remote/remote_daemon_dispatch.c | 32 ++--- 1 file changed, 16 insertions(+), 16 deletions(-) d

[libvirt] [PATCH v4 1/7] rpc: use the return value of virObjectRef directly

2019-11-14 Thread Marc Hartmayer
Use the return value of virObjectRef directly. This way, it's easier for another reader to identify the reason why the additional reference is required. Signed-off-by: Marc Hartmayer Reviewed-by: John Ferlan Reviewed-by: Pavel Hrdina --- src/rpc/virnetserver.c | 3 +-- 1 file changed, 1

[libvirt] [PATCH v4 7/7] remote/rpc: Use virNetServerGetProgram() to determine the program

2019-11-14 Thread Marc Hartmayer
Use virNetServerGetProgram() to determine the virNetServerProgram instead of using hard coded global variables. This allows us to remove the global variables @remoteProgram and @qemuProgram as they're now no longer necessary. Signed-off-by: Marc Hartmayer --- src/libvirt_remote.syms

Re: [libvirt] [PATCH v3 6/6] remote/rpc: Use virNetServerGetProgram() to determine the program

2019-11-14 Thread Marc Hartmayer
On Thu, Nov 14, 2019 at 09:20 AM +0100, Pavel Hrdina wrote: > On Wed, Nov 13, 2019 at 07:12:34PM +0100, Marc Hartmayer wrote: >> On Wed, Nov 13, 2019 at 09:52 AM +0100, Pavel Hrdina >> wrote: >> > On Fri, Nov 01, 2019 at 06:35:48PM +0100, Marc Hartmayer wrote: >>

Re: [libvirt] [PATCH v3 6/6] remote/rpc: Use virNetServerGetProgram() to determine the program

2019-11-13 Thread Marc Hartmayer
On Wed, Nov 13, 2019 at 09:52 AM +0100, Pavel Hrdina wrote: > On Fri, Nov 01, 2019 at 06:35:48PM +0100, Marc Hartmayer wrote: >> Use virNetServerGetProgram() to determine the virNetServerProgram >> instead of using hard coded global variables. This allows us to remove >>

Re: [libvirt] [PATCH v3 2/6] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2019-11-13 Thread Marc Hartmayer
On Fri, Nov 08, 2019 at 04:52 PM +0100, Pavel Hrdina wrote: > On Fri, Nov 01, 2019 at 06:35:44PM +0100, Marc Hartmayer wrote: >> The commit 'close callback: move it to driver' (88f09b75eb99) moved >> the responsibility for the close callback to the driver. But if the >> d

[libvirt] [PATCH v3 5/6] rpc: Introduce virNetServerGetProgramLocked helper function

2019-11-01 Thread Marc Hartmayer
This patch introduces virNetServerGetProgramLocked. It's a function to determine which program has to be used for a given @msg. This function will be reused in the next patch. Signed-off-by: Marc Hartmayer --- src/rpc/virnetserver.c | 28 +--- 1 file changed, 21

[libvirt] [PATCH v3 6/6] remote/rpc: Use virNetServerGetProgram() to determine the program

2019-11-01 Thread Marc Hartmayer
Use virNetServerGetProgram() to determine the virNetServerProgram instead of using hard coded global variables. This allows us to remove the global variables @remoteProgram and @qemuProgram as they're now no longer necessary. Signed-off-by: Marc Hartmayer --- src/libvirt_remote.syms

[libvirt] [PATCH v3 3/6] remote: Save reference to program in daemonClientEventCallback

2019-11-01 Thread Marc Hartmayer
As a result, you can later determine during the callback which program was used. This makes it easier to refactor the code in the future and is less prone to error. Signed-off-by: Marc Hartmayer --- src/remote/remote_daemon_dispatch.c | 108 +++- 1 file changed, 59

[libvirt] [PATCH v3 1/6] rpc: use the return value of virObjectRef directly

2019-11-01 Thread Marc Hartmayer
Use the return value of virObjectRef directly. This way, it's easier for another reader to identify the reason why the additional reference is required. Signed-off-by: Marc Hartmayer Reviewed-by: John Ferlan --- src/rpc/virnetserver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[libvirt] [PATCH v3 4/6] remote: Use domainClientEventCallbacks for remoteReplayConnectionClosedEvent

2019-11-01 Thread Marc Hartmayer
This allows us later to get rid of another usage of the global variable `remoteProgram`. Signed-off-by: Marc Hartmayer --- src/remote/remote_daemon_dispatch.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/remote/remote_daemon_dispatch.c b/src

[libvirt] [PATCH v3 0/6] Fix virConnectRegisterCloseCallback and get rid of global variables

2019-11-01 Thread Marc Hartmayer
ere to many changes in the meantime - Removed accepted patches - Dropped patches 8 and 9 + v1->v2: - Removed accepted patches - Removed NACKed patches - Added r-b to patch 5 - Worked in comments - Rebased - Added patches 7-9 Marc Hartmayer (6): rpc: use the return

[libvirt] [PATCH v3 2/6] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2019-11-01 Thread Marc Hartmayer
, for example memory leaks, as the caller cannot differentiate whether the close callback was 'really' registered or not. Therefore call directly @freecb if the connectRegisterCloseCallback API is not supported by the driver used by the connection. Signed-off-by: Marc Hartmayer --- src/libvirt-host.c

Re: [libvirt] [PATCH 2/2] qemu: Replace virDomainChrSourceDefFree with virObjectUnref

2019-02-26 Thread Marc Hartmayer
On Mon, Feb 25, 2019 at 02:38 PM +0100, Ján Tomko wrote: > On Wed, Feb 20, 2019 at 09:51:07AM +0100, Marc Hartmayer wrote: >>Replace virDomainChrSourceDefFree with virObjectUnref. >> >>Signed-off-by: Marc Hartmayer >>Reviewed-by: Boris Fiuczynski >>--- >

[libvirt] [PATCH 1/2] qemu: Use refcounting for priv->monConfig

2019-02-22 Thread Marc Hartmayer
Use refcounting for priv->monConfig instead of asymmetric freeing. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/qemu/qemu_driver.c | 5 + src/qemu/qemu_process.c | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/

Re: [libvirt] [RFC PATCH] udev: Remove udev handle from main loop when udev thread stops

2019-02-22 Thread Marc Hartmayer
On Tue, Feb 12, 2019 at 09:46 PM +0100, John Ferlan wrote: > On 2/7/19 11:08 AM, Marc Hartmayer wrote: >> Commit "nodedev: Move device enumumeration out of nodeStateInitialize" >> (9f0ae0b18e3e620) has moved the heavy task of device enumeration into >>

[libvirt] [PATCH 0/2] udev: Remove udev handle from main loop when udev thread stops

2019-02-20 Thread Marc Hartmayer
Changelog: + RFC -> v1: - Remove the event handle in the error path of nodeStateInitializeEnumerate - Added patch 2: wake up udev thread in case of an error Marc Hartmayer (2): udev: nodeStateInitializeEnumerate: remove watch handle in case of an error udev: wake up the udev thr

[libvirt] [PATCH 1/2] udev: nodeStateInitializeEnumerate: remove watch handle in case of an error

2019-02-20 Thread Marc Hartmayer
If the udev thread is stopped, it must be ensured that the watch handle is also removed from the main loop. Signed-off-by: Marc Hartmayer --- src/node_device/node_device_udev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/node_device/node_device_udev.c b/src/node_device

[libvirt] [PATCH 2/2] udev: wake up the udev thread for stopping it

2019-02-20 Thread Marc Hartmayer
Signal the udev thread the change of `priv->threadQuit` by using the thread condition. Signed-off-by: Marc Hartmayer --- src/node_device/node_device_udev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c in

Re: [libvirt] [RFC PATCH] udev: Remove udev handle from main loop when udev thread stops

2019-02-20 Thread Marc Hartmayer
On Tue, Feb 12, 2019 at 09:46 PM +0100, John Ferlan wrote: > On 2/7/19 11:08 AM, Marc Hartmayer wrote: >> Commit "nodedev: Move device enumumeration out of nodeStateInitialize" >> (9f0ae0b18e3e620) has moved the heavy task of device enumeration into >>

[libvirt] [PATCH 2/2] qemu: Replace virDomainChrSourceDefFree with virObjectUnref

2019-02-20 Thread Marc Hartmayer
Replace virDomainChrSourceDefFree with virObjectUnref. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- cfg.mk| 1 - src/conf/domain_conf.c| 17 + src/conf/domain_conf.h| 1 - src/libvirt_private.syms | 1 - src

[libvirt] [PATCH 0/2] Get rid of virDomainChrSourceDefFree

2019-02-20 Thread Marc Hartmayer
Marc Hartmayer (2): qemu: Use refcounting for priv->monConfig qemu: Replace virDomainChrSourceDefFree with virObjectUnref cfg.mk| 1 - src/conf/domain_conf.c| 17 + src/conf/domain_conf.h| 1 - src/libvirt_private.syms |

[libvirt] [PATCH v2] udev: only report a warning if udev_enumerate_scan_devices fails

2019-02-14 Thread Marc Hartmayer
ces(3)). Reviewed-by: Bjoern Walk Signed-off-by: Marc Hartmayer --- src/node_device/node_device_udev.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index 299f55260129..eb4d8b3cfe4a 100

Re: [libvirt] [PATCH] udev: only report a warning if udev_enumerate_scan_devices fails

2019-02-14 Thread Marc Hartmayer
On Wed, Feb 13, 2019 at 03:56 PM +0100, John Ferlan wrote: > On 2/13/19 7:38 AM, Marc Hartmayer wrote: >> Even if an error is reported by `udev_enumerate_scan_devices`, >> e.g. because a driver of a device has an bug, we can still enumerate >> all other devices. Additiona

Re: [libvirt] [RFC PATCH] udev: Remove udev handle from main loop when udev thread stops

2019-02-13 Thread Marc Hartmayer
On Wed, Feb 13, 2019 at 03:03 PM +0100, John Ferlan wrote: > On 2/13/19 4:34 AM, Marc Hartmayer wrote: >> On Tue, Feb 12, 2019 at 09:46 PM +0100, John Ferlan >> wrote: >>> On 2/7/19 11:08 AM, Marc Hartmayer wrote: >>>> Commit "nodedev: Move device

[libvirt] [PATCH] udev: only report a warning if udev_enumerate_scan_devices fails

2019-02-13 Thread Marc Hartmayer
ces(3)). Reviewed-by: Bjoern Walk Signed-off-by: Marc Hartmayer --- src/node_device/node_device_udev.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index 299f55260129..90168eb8a969 100

Re: [libvirt] [RFC PATCH] udev: Remove udev handle from main loop when udev thread stops

2019-02-13 Thread Marc Hartmayer
On Tue, Feb 12, 2019 at 09:46 PM +0100, John Ferlan wrote: > On 2/7/19 11:08 AM, Marc Hartmayer wrote: >> Commit "nodedev: Move device enumumeration out of nodeStateInitialize" >> (9f0ae0b18e3e620) has moved the heavy task of device enumeration into >>

Re: [libvirt] [RFC PATCH] udev: Remove udev handle from main loop when udev thread stops

2019-02-07 Thread Marc Hartmayer
On Thu, Feb 07, 2019 at 05:08 PM +0100, Marc Hartmayer wrote: > Commit "nodedev: Move device enumumeration out of nodeStateInitialize" > (9f0ae0b18e3e620) has moved the heavy task of device enumeration into > a separate thread. The problem with this commit is that there i

Re: [libvirt] [RFC PATCH] udev: Remove udev handle from main loop when udev thread stops

2019-02-07 Thread Marc Hartmayer
On Thu, Feb 07, 2019 at 05:08 PM +0100, Marc Hartmayer wrote: > Commit "nodedev: Move device enumumeration out of nodeStateInitialize" > (9f0ae0b18e3e620) has moved the heavy task of device enumeration into > a separate thread. The problem with this commit is that there i

[libvirt] [RFC PATCH] udev: Remove udev handle from main loop when udev thread stops

2019-02-07 Thread Marc Hartmayer
the watch handle is removed from the main loop. Fixes: 9f0ae0b18e3e620 ("nodedev: Move device enumumeration out of nodeStateInitialize") Signed-off-by: Marc Hartmayer --- Note: I'm not sure whether we should stop libvirtd (as it would have been done before) or if this patch i

Re: [libvirt] [PATCH] qemu: Refresh state before starting the VCPUs

2019-02-04 Thread Marc Hartmayer
On Mon, Feb 04, 2019 at 02:37 PM +0100, Marc Hartmayer wrote: > On Mon, Feb 04, 2019 at 01:41 PM +0100, Peter Krempa > wrote: >> On Mon, Feb 04, 2019 at 13:36:24 +0100, Marc Hartmayer wrote: >>> For normal starts (no incoming migration) the refresh of the QEMU >>

Re: [libvirt] [PATCH] qemu: Refresh state before starting the VCPUs

2019-02-04 Thread Marc Hartmayer
On Mon, Feb 04, 2019 at 01:41 PM +0100, Peter Krempa wrote: > On Mon, Feb 04, 2019 at 13:36:24 +0100, Marc Hartmayer wrote: >> For normal starts (no incoming migration) the refresh of the QEMU >> state must be done before the VCPUs getting started since otherwise >>

[libvirt] [PATCH] qemu: Refresh state before starting the VCPUs

2019-02-04 Thread Marc Hartmayer
ation after transferring state" (93db7eea1b864). Signed-off-by: Marc Hartmayer --- src/qemu/qemu_process.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index dace5aaca102..2a3763f40d49 100644 ---

Re: [libvirt] [PATCH] util: audit: Fix the error code when kernel lacks audit support

2019-01-15 Thread Marc Hartmayer
ze audit > layer")); > } > -- > 2.20.1 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list > Thanks for fixing! Reviewed-by: Marc Hartmayer -- Kind regards / Beste Grüße Marc Hartmayer

Re: [libvirt] [PATCH v3 00/18] Implement original label remembering

2018-12-21 Thread Marc Hartmayer
On Thu, Dec 20, 2018 at 09:15 PM +0100, Michal Prívozník wrote: > On 12/20/18 12:48 PM, Marc Hartmayer wrote: >> On Wed, Dec 19, 2018 at 03:37 PM +0100, Michal Privoznik >> wrote: >>> On 12/19/18 2:54 PM, Ján Tomko wrote: >>>> >>>> Reviewed-by

Re: [libvirt] [PATCH v2] qemu: Introduce caching whether /dev/kvm is accessible

2018-12-21 Thread Marc Hartmayer
). >> >> ACK (will wait a day or two for others to chime in before pushing) > > No objections were raised, so I've pushed this one. Thanks. > > Michal > -- Kind regards / Beste Grüße Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsitzende des

Re: [libvirt] [PATCH v3 00/18] Implement original label remembering

2018-12-20 Thread Marc Hartmayer
Michal > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list > -- Kind regards / Beste Grüße Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Matthias Hartmann Geschäftsführun

Re: [libvirt] [PATCH v2] qemu: Introduce caching whether /dev/kvm is accessible

2018-12-18 Thread Marc Hartmayer
On Tue, Nov 20, 2018 at 11:00 AM +0100, Marc Hartmayer wrote: > On Thu, Nov 01, 2018 at 04:37 PM +0100, Michal Privoznik > wrote: >> On 10/30/2018 01:55 PM, Daniel P. Berrangé wrote: >>> On Tue, Oct 30, 2018 at 10:32:08AM +, Daniel P. Berrangé wrote: >>>> O

[libvirt] [PATCH] test: Convert testDriver to virObjectLockable

2018-11-20 Thread Marc Hartmayer
From: Marc Hartmayer The test driver state (@testDriver) uses it's own reference counting and locking implementation. Instead of doing that, convert @testDriver into a virObjectLockable and use the provided functionalities. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski

[libvirt] OBFrom 2ca6bb41cd7d86a89ac565ca71ba1f2baffd0c68 Mon Sep 17 00:00:00 2001

2018-11-20 Thread Marc Hartmayer
The test driver state (@testDriver) uses it's own reference counting and locking implementation. Instead of doing that, convert @testDriver into a virObjectLockable and use the provided functionalities. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- This patch was originally

Re: [libvirt] [PATCH v2] qemu: Introduce caching whether /dev/kvm is accessible

2018-11-20 Thread Marc Hartmayer
10/30/2018 10:35 AM, Daniel P. Berrangé wrote: >>>>> On Tue, Oct 30, 2018 at 09:13:50AM +0100, Michal Privoznik wrote: >>>>>> On 10/29/2018 06:34 PM, Marc Hartmayer wrote: >>>>>>> Introduce caching whether /dev/kvm is usable as the QE

Re: [libvirt] [PATCH v4 0/8] Virtio-crypto device support

2018-11-16 Thread Marc Hartmayer
>> Matt >> >> >> > > > -- > Regards, > Longpeng(Mike) Hi Longpeng, any updates so far? Is a v5 still planned? Kind regards / Beste Grüße Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Ko

Re: [libvirt] [PATCH RFC 1/3] qemu: Add check for whether nesting was enabled

2018-11-14 Thread Marc Hartmayer
psPtr qemuCaps, > qemuMonitorPtr mon); > diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c > index 8fe5a55e1d..703fb6a125 100644 > --- a/tests/qemucapabilitiestest.c > +++ b/tests/qemucapabilitiestest.c > @@ -63,6 +63,9 @@ testQemuCaps(const void *o

Re: [libvirt] [PATCH] virSecuritySELinuxTransactionCommit: Don't mask error

2018-11-13 Thread Marc Hartmayer
gt; virSecuritySELinuxContextListPtr list; > -int ret = 0; > +int ret = -1; > > list = virThreadLocalGet(); > if (!list) > -- > 2.18.1 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir

[libvirt] [PATCH] virSecuritySELinuxTransactionCommit: Return -1 if no transaction is set

2018-11-13 Thread Marc Hartmayer
Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- Please apply this patch after the patch "virSecuritySELinuxTransactionCommit: Don't mask error" from Michal. --- src/security/security_selinux.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff

Re: [libvirt] [PATCH v2] qemu: Introduce caching whether /dev/kvm is accessible

2018-11-12 Thread Marc Hartmayer
On Mon, Nov 12, 2018 at 03:13 PM +0100, "Daniel P. Berrangé" wrote: > On Mon, Nov 12, 2018 at 02:48:09PM +0100, Marc Hartmayer wrote: >> On Mon, Nov 12, 2018 at 01:30 PM +0100, Pavel Hrdina >> wrote: >> > On Mon, Nov 12, 2018 at 12:50:41PM +0100, Marc Har

Re: [libvirt] [PATCH 1/2] qemu: Extract MDEV VFIO PCI validation code into a separate helper

2018-11-12 Thread Marc Hartmayer
} > + > + > static int > qemuDomainDeviceDefValidateHostdev(const virDomainHostdevDef *hostdev, > const virDomainDef *def, > -- > 2.19.1 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailma

Re: [libvirt] [PATCH v2] qemu: Introduce caching whether /dev/kvm is accessible

2018-11-12 Thread Marc Hartmayer
On Mon, Nov 12, 2018 at 01:30 PM +0100, Pavel Hrdina wrote: > On Mon, Nov 12, 2018 at 12:50:41PM +0100, Marc Hartmayer wrote: >> On Thu, Nov 01, 2018 at 09:31 AM +0100, Martin Kletzander >> wrote: > > [...] > >> How can you run a machine/QEMU VM under a diff

Re: [libvirt] [PATCH v2] qemu: Introduce caching whether /dev/kvm is accessible

2018-11-12 Thread Marc Hartmayer
gé wrote: >>> >>>>> On Tue, Oct 30, 2018 at 09:13:50AM +0100, Michal Privoznik wrote: >>> >>>>>> On 10/29/2018 06:34 PM, Marc Hartmayer wrote: >>> >>>>>>> Introduce caching whether /dev/kvm is usable as t

Re: [libvirt] [PATCH v2] qemu: Introduce caching whether /dev/kvm is accessible

2018-11-12 Thread Marc Hartmayer
he QEMU driver. This should be pretty similar to your proposal with the global static variable. > > > Regards, > Daniel > -- > |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| > |: https://libvirt.org -o-https://fstop138.

[libvirt] [PATCH v2] qemu: Introduce caching whether /dev/kvm is accessible

2018-10-29 Thread Marc Hartmayer
or not and we only need to re-run the virFileAccessibleAs check if the ctime of /dev/kvm has changed. Suggested-by: Daniel P. Berrangé Signed-off-by: Marc Hartmayer --- src/qemu/qemu_capabilities.c | 54 ++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH] qemu: Introduce caching whether /dev/kvm is accessible

2018-10-29 Thread Marc Hartmayer
or not and we only need to re-run the virFileAccessibleAs check if the ctime of /dev/kvm has changed. Suggested-by: Daniel P. Berrangé Signed-off-by: Marc Hartmayer --- src/qemu/qemu_capabilities.c | 56 ++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git

Re: [libvirt] [PATCH 00/11] Avoid numerous calls of virQEMUCapsCacheLookup

2018-10-26 Thread Marc Hartmayer
On Wed, Oct 24, 2018 at 11:43 PM +0200, "Daniel P. Berrangé" wrote: > On Thu, Sep 20, 2018 at 07:44:46PM +0200, Marc Hartmayer wrote: >> For a domain definition there are numerous calls of >> virQEMUCapsCacheLookup (the same applies to the domain start). This >&g

[libvirt] [RFC v2] virfile: fix cast-align error

2018-10-09 Thread Marc Hartmayer
] virFileIsSharedFixFUSE(path, (long *) _type); Signed-off-by: Marc Hartmayer --- src/util/virfile.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 2a7e87102a25..6cde4ab6c23b 100644 --- a/src/util/virfile.c +++ b

[libvirt] [RFC] virfile: fix cast-align error

2018-10-08 Thread Marc Hartmayer
Use the correct type in order to fix the following error on s390x: In function 'virFileIsSharedFSType': ../../src/util/virfile.c:3578:38: error: cast increases required alignment of target type [-Werror=cast-align] virFileIsSharedFixFUSE(path, (long *) _type); Signed-off-by: Marc

Re: [libvirt] [PATCH 06/11] conf: Get rid of virDomainDeviceDefPostParseOne

2018-10-01 Thread Marc Hartmayer
On Mon, Oct 01, 2018 at 02:50 PM +0200, Peter Krempa wrote: > On Mon, Oct 01, 2018 at 14:38:40 +0200, Marc Hartmayer wrote: >> On Mon, Oct 01, 2018 at 12:41 PM +0200, Peter Krempa >> wrote: >> > On Mon, Oct 01, 2018 at 12:27:41 +0200, Marc Hartmayer wrote: >> >&

Re: [libvirt] [PATCH 03/11] qemu: Pass QEMUCaps to virDomainDefPostParse

2018-10-01 Thread Marc Hartmayer
g. define a domain). Therefore, it’s possible that two calls of virQEMUCapsCacheLookup return different QEMU capabilities. […snip] -- Kind regards / Beste Grüße Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäft

Re: [libvirt] [PATCH 06/11] conf: Get rid of virDomainDeviceDefPostParseOne

2018-10-01 Thread Marc Hartmayer
On Mon, Oct 01, 2018 at 12:41 PM +0200, Peter Krempa wrote: > On Mon, Oct 01, 2018 at 12:27:41 +0200, Marc Hartmayer wrote: >> On Sat, Sep 29, 2018 at 04:09 AM +0200, John Ferlan >> wrote: >> > On 9/20/18 1:44 PM, Marc Hartmayer wrote: >> >> Move the

Re: [libvirt] [PATCH 08/11] conf: Use domainPostParseData(Alloc|Free) in virDomainDefValidate

2018-10-01 Thread Marc Hartmayer
On Sat, Sep 29, 2018 at 05:35 PM +0200, John Ferlan wrote: > On 9/20/18 1:44 PM, Marc Hartmayer wrote: >> For the usage of the parameter @parseOpqaue within >> virDomainDefValidate it must be ensured that the parameter >> @parseOpaque is not NULL. But since there

Re: [libvirt] [PATCH 07/11] conf: Extend virDomainDefValidate(Callback) for parseOpaque

2018-10-01 Thread Marc Hartmayer
On Sat, Sep 29, 2018 at 05:34 PM +0200, John Ferlan wrote: > On 9/20/18 1:44 PM, Marc Hartmayer wrote: >> Add @parseOpaque argument to virDomainDefValidate and >> virDomainDefValidateCallback, but don't use it for now since it's not >> ensured that it's always a non-NULL va

  1   2   3   4   5   >