[libvirt] [PATCH] SpaprVio addresses are 32-bit, not 64-bit

2019-06-03 Thread David Gibson
spapr-vio addresses are used on POWER platform qemu guests, which are based on the PAPR specification. PAPR specifies a number of virtual devices (but not virtio protocol) which are addressed in an abstract namespace. Currently, libvirt encodes these addresses as 64-bit values. This is not

Re: [libvirt] [PATCH v4 0/2] introduction of migration_version attribute for VFIO live migration

2019-06-03 Thread Yan Zhao
On Tue, Jun 04, 2019 at 03:29:32AM +0800, Alex Williamson wrote: > On Thu, 30 May 2019 20:44:38 -0400 > Yan Zhao wrote: > > > This patchset introduces a migration_version attribute under sysfs of VFIO > > Mediated devices. > > > > This migration_version attribute is used to check migration

Re: [libvirt] [PATCH] build: fix linking libqemutestdriver with LTO enabled

2019-06-03 Thread Jim Fehlig
On 5/30/19 10:00 AM, Andrea Bolognani wrote: On Thu, 2019-05-30 at 16:56 +0200, Michal Privoznik wrote: On 5/30/19 4:44 PM, Jim Fehlig wrote: On 5/30/19 3:08 AM, Michal Privoznik wrote: On 5/29/19 7:44 PM, Jim Fehlig wrote: -libqemutestdriver_la_LIBADD = $(qemu_LDADDS)

Re: [PATCH v4 0/2] introduction of migration_version attribute for VFIO live migration

2019-06-03 Thread Alex Williamson
On Thu, 30 May 2019 20:44:38 -0400 Yan Zhao wrote: > This patchset introduces a migration_version attribute under sysfs of VFIO > Mediated devices. > > This migration_version attribute is used to check migration compatibility > between two mdev devices of the same mdev type. > > Patch 1

Re: [libvirt] [PATCH] util: Propagate numad failures correctly

2019-06-03 Thread Daniel Henrique Barboza
On 6/3/19 2:14 PM, Andrea Bolognani wrote: Right now, if numad fails, we raise an error but return an empty string to the caller instead of a NULL pointer, which means processing will continue and the user will see # virsh start guest error: Failed to start domain guest error:

Re: [libvirt] [PATCH 0/4] test_driver: implement virDomainSaveImageGetXMLDesc and virDomainSaveImageDefineXML

2019-06-03 Thread Ilias Stamatis
On Mon, Jun 3, 2019 at 1:50 PM Pavel Hrdina wrote: > > On Mon, Jun 03, 2019 at 10:36:58AM +0200, Erik Skultety wrote: > > On Wed, May 29, 2019 at 02:22:55PM +0200, Ilias Stamatis wrote: > > > While implementing virDomainSaveImageGetXMLDesc and > > > virDomainSaveImageDefineXML for the test

Re: [libvirt] [PATCH 1/4] test_driver: extract image saving code into a separate function

2019-06-03 Thread Ilias Stamatis
On Mon, Jun 3, 2019 at 10:01 AM Erik Skultety wrote: > > On Wed, May 29, 2019 at 02:22:56PM +0200, Ilias Stamatis wrote: > > Extracting the code logic for writing a test image to disk from > > testDomainSaveFlags into a separate function, allows us to reuse this > > code in other functions such

[libvirt] [PATCH] util: Propagate numad failures correctly

2019-06-03 Thread Andrea Bolognani
Right now, if numad fails, we raise an error but return an empty string to the caller instead of a NULL pointer, which means processing will continue and the user will see # virsh start guest error: Failed to start domain guest error: invalid argument: Failed to parse bitmap '' instead of

[libvirt] [PATCH] news: Drop empty section

2019-06-03 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- Pushed as trivial. docs/news.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/news.xml b/docs/news.xml index 86f5ffb3f6..f95dfdf3b4 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -56,8 +56,6 @@ - -

Re: [libvirt] [PATCH v2 7/7] qemu: Check TSC frequency before starting QEMU

2019-06-03 Thread Jiri Denemark
On Mon, Jun 03, 2019 at 14:52:40 +0200, Ján Tomko wrote: > On Mon, Jun 03, 2019 at 02:27:58PM +0200, Jiri Denemark wrote: > >When migrating a domain with invtsc CPU feature enabled, the TSC > >frequency of the destination host must match the frequency used when the > >domain was started on the

[libvirt] Release of libvirt-5.4.0

2019-06-03 Thread Daniel Veillard
It's out ! The release is tagged in git, and I provided signed tarball and source rpms to the usual place: https://libvirt.org/sources/ I also cut off a 5.4.0 release of the python bindings but code is same a 5.3.0 one, you can find signed tarball and source rpms at:

Re: [libvirt] [PATCH v4 00/25] Fix and enable owner remembering

2019-06-03 Thread Michal Privoznik
On 4/25/19 10:19 AM, Michal Privoznik wrote: > This is meant for next release to have the most time possible for testing. Some of the patches were ACKed in v3 already but since they don't make sense on their own I haven't pushed them. v4 of:

[libvirt] [PATCH] maint: Post-release version bump to 5.5.0

2019-06-03 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- Pushed as trivial. configure.ac | 2 +- docs/news.xml | 8 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 7e01b77fc0..1f05055d6f 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ dnl You

Re: [libvirt] [PATCH 2/4] fixup? util: Optimize virBitmapUnion()

2019-06-03 Thread Andrea Bolognani
On Mon, 2019-06-03 at 16:43 +0200, Ján Tomko wrote: > On Mon, Jun 03, 2019 at 04:31:51PM +0200, Andrea Bolognani wrote: > > On Mon, 2019-06-03 at 14:10 +0200, Ján Tomko wrote: > > > if (b->nbits && > > > a->nbits < b->nbits && > > > virBitmapExpand(a, b->nbits -1) < 0) { > > > > Yeah,

Re: [libvirt] [PATCH 3/4] util: Introduce virNumaNodesetToCPUset()

2019-06-03 Thread Andrea Bolognani
On Mon, 2019-06-03 at 14:13 +0200, Ján Tomko wrote: > On Fri, May 31, 2019 at 05:22:01PM +0200, Andrea Bolognani wrote: > > +int > > +virNumaNodesetToCPUset(virBitmapPtr nodeset, > > + virBitmapPtr *cpuset) > > I'd prefer the output argument to be first - see VIR_STRDUP. >

Re: [libvirt] [PATCH 2/4] fixup? util: Optimize virBitmapUnion()

2019-06-03 Thread Ján Tomko
On Mon, Jun 03, 2019 at 04:31:51PM +0200, Andrea Bolognani wrote: On Mon, 2019-06-03 at 14:10 +0200, Ján Tomko wrote: On Fri, May 31, 2019 at 05:22:00PM +0200, Andrea Bolognani wrote: > +if (a->nbits < b->nbits && > +virBitmapExpand(a, b->nbits) < 0) { After this, 'b' can hold

Re: [libvirt] [PATCH 2/4] fixup? util: Optimize virBitmapUnion()

2019-06-03 Thread Andrea Bolognani
On Mon, 2019-06-03 at 14:10 +0200, Ján Tomko wrote: > On Fri, May 31, 2019 at 05:22:00PM +0200, Andrea Bolognani wrote: > > +if (a->nbits < b->nbits && > > +virBitmapExpand(a, b->nbits) < 0) { > > After this, 'b' can hold b->nbits and 'a' can hold b->nbits+1. > > if (b->nbits && >

Re: [libvirt] [PATCH v2 5/7] cpu_x86: Fix placement of *CheckFeature functions

2019-06-03 Thread Jiri Denemark
On Mon, Jun 03, 2019 at 14:51:41 +0200, Ján Tomko wrote: > On Mon, Jun 03, 2019 at 02:27:56PM +0200, Jiri Denemark wrote: > >Commit 0a97486e09 moved them outside #ifdef, but after virCPUx86GetHost, > >which will start calling them in the following patch. > > > >Signed-off-by: Jiri Denemark > >---

Re: [libvirt] Scope of the test driver? (Was: Re: [PATCH] test_driver: implement virDomainSendKey)

2019-06-03 Thread Peter Krempa
On Mon, Jun 03, 2019 at 14:16:15 +0200, Pavel Hrdina wrote: > On Mon, Jun 03, 2019 at 01:48:55PM +0200, Peter Krempa wrote: [...] > > Sure we want to cover it, but to which degree? That's what I want to > > clarify. If we do that, answering questions how to do things should be > > easier. > >

Re: [libvirt] [PATCH v2 5/7] cpu_x86: Fix placement of *CheckFeature functions

2019-06-03 Thread Jiri Denemark
On Mon, Jun 03, 2019 at 14:51:41 +0200, Ján Tomko wrote: > On Mon, Jun 03, 2019 at 02:27:56PM +0200, Jiri Denemark wrote: > >Commit 0a97486e09 moved them outside #ifdef, but after virCPUx86GetHost, > >which will start calling them in the following patch. > > > >Signed-off-by: Jiri Denemark > >---

Re: [libvirt] [PATCH v2 5/7] cpu_x86: Fix placement of *CheckFeature functions

2019-06-03 Thread Ján Tomko
On Mon, Jun 03, 2019 at 02:27:56PM +0200, Jiri Denemark wrote: Commit 0a97486e09 moved them outside #ifdef, but after virCPUx86GetHost, which will start calling them in the following patch. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 72 +++

Re: [libvirt] [PATCH v2 7/7] qemu: Check TSC frequency before starting QEMU

2019-06-03 Thread Ján Tomko
On Mon, Jun 03, 2019 at 02:27:58PM +0200, Jiri Denemark wrote: When migrating a domain with invtsc CPU feature enabled, the TSC frequency of the destination host must match the frequency used when the domain was started on the source host or the destination host has to support TSC scaling. If

Re: [libvirt] [PATCH v2 6/7] cpu_x86: Probe TSC frequency and scaling support

2019-06-03 Thread Ján Tomko
On Mon, Jun 03, 2019 at 02:27:57PM +0200, Jiri Denemark wrote: When the host CPU supports invariant TSC the host CPU definition created by virCPUx86GetHost will contain (unless probing fails for some reason) addition TSC related data. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 9

Re: [libvirt] [PATCH v2 4/7] conf: Report TSC frequency in host CPU capabilities

2019-06-03 Thread Ján Tomko
On Mon, Jun 03, 2019 at 02:27:55PM +0200, Jiri Denemark wrote: This patch adds a new element into the host CPU capabilities XML. Signed-off-by: Jiri Denemark --- src/conf/cpu_conf.c | 48 + src/conf/cpu_conf.h | 2 ++ 2 files changed, 50

Re: [libvirt] [PATCH v2 3/7] util: Add virHostCPUGetTscInfo

2019-06-03 Thread Ján Tomko
On Mon, Jun 03, 2019 at 02:27:54PM +0200, Jiri Denemark wrote: On a KVM x86_64 host which supports invariant TSC this function can be used to detect the TSC frequency and the availability of TSC scaling. The magic MSR numbers required to check if VMX scaling is supported on the host are

Re: [libvirt] [PATCH v2 2/7] qemuargv2xmltest: Use mocked virQEMUCapsProbeHostCPU

2019-06-03 Thread Ján Tomko
On Mon, Jun 03, 2019 at 02:27:53PM +0200, Jiri Denemark wrote: The qemuTestParseCapabilitiesArch call would eventually lead to the host CPU being probed via virCPUGetHost. Let's divert this to a mocked version already used by the qemuxml2argvtest. Signed-off-by: Jiri Denemark ---

Re: [libvirt] [PATCH v2 1/7] qemu: Make virQEMUCapsProbeHostCPUForEmulator more generic

2019-06-03 Thread Ján Tomko
On Mon, Jun 03, 2019 at 02:27:52PM +0200, Jiri Denemark wrote: The function is renamed as virQEMUCapsProbeHostCPU and it does not get the list of allowed CPU models from qemuCaps anymore. This is responsibility is moved to the caller. The result is just a very thin wrapper around virCPUGetHost

[libvirt] [PATCH v2 7/7] qemu: Check TSC frequency before starting QEMU

2019-06-03 Thread Jiri Denemark
When migrating a domain with invtsc CPU feature enabled, the TSC frequency of the destination host must match the frequency used when the domain was started on the source host or the destination host has to support TSC scaling. If the frequencies do not match and the destination host does not

[libvirt] [PATCH v2 1/7] qemu: Make virQEMUCapsProbeHostCPUForEmulator more generic

2019-06-03 Thread Jiri Denemark
The function is renamed as virQEMUCapsProbeHostCPU and it does not get the list of allowed CPU models from qemuCaps anymore. This is responsibility is moved to the caller. The result is just a very thin wrapper around virCPUGetHost mostly required mocking in tests. The generic function is used in

[libvirt] [PATCH v2 6/7] cpu_x86: Probe TSC frequency and scaling support

2019-06-03 Thread Jiri Denemark
When the host CPU supports invariant TSC the host CPU definition created by virCPUx86GetHost will contain (unless probing fails for some reason) addition TSC related data. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 9 + 1 file changed, 9 insertions(+) diff --git

[libvirt] [PATCH v2 5/7] cpu_x86: Fix placement of *CheckFeature functions

2019-06-03 Thread Jiri Denemark
Commit 0a97486e09 moved them outside #ifdef, but after virCPUx86GetHost, which will start calling them in the following patch. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 72 +++ 1 file changed, 35 insertions(+), 37 deletions(-) diff --git

[libvirt] [PATCH v2 3/7] util: Add virHostCPUGetTscInfo

2019-06-03 Thread Jiri Denemark
On a KVM x86_64 host which supports invariant TSC this function can be used to detect the TSC frequency and the availability of TSC scaling. The magic MSR numbers required to check if VMX scaling is supported on the host are documented in Volume 3 of the Intel® 64 and IA-32 Architectures Software

[libvirt] [PATCH v2 2/7] qemuargv2xmltest: Use mocked virQEMUCapsProbeHostCPU

2019-06-03 Thread Jiri Denemark
The qemuTestParseCapabilitiesArch call would eventually lead to the host CPU being probed via virCPUGetHost. Let's divert this to a mocked version already used by the qemuxml2argvtest. Signed-off-by: Jiri Denemark --- tests/Makefile.am| 3 ++- tests/qemuargv2xmltest.c | 3 ++- 2 files

[libvirt] [PATCH v2 0/7] Check TSC frequency before starting QEMU

2019-06-03 Thread Jiri Denemark
Version 2: - new patches (1 and 2) fixing qemuargv2xmltest, which was probing host CPU When migrating a domain with invtsc CPU feature enabled, the TSC frequency of the destination host must match the frequency used when the domain was started on the source host or the destination host has to

[libvirt] [PATCH v2 4/7] conf: Report TSC frequency in host CPU capabilities

2019-06-03 Thread Jiri Denemark
This patch adds a new element into the host CPU capabilities XML. Signed-off-by: Jiri Denemark --- src/conf/cpu_conf.c | 48 + src/conf/cpu_conf.h | 2 ++ 2 files changed, 50 insertions(+) diff --git a/src/conf/cpu_conf.c

Re: [libvirt] Scope of the test driver? (Was: Re: [PATCH] test_driver: implement virDomainSendKey)

2019-06-03 Thread Pavel Hrdina
On Mon, Jun 03, 2019 at 01:48:55PM +0200, Peter Krempa wrote: > On Mon, Jun 03, 2019 at 13:13:14 +0200, Erik Skultety wrote: > > On Mon, Jun 03, 2019 at 12:31:56PM +0200, Peter Krempa wrote: > > > On Mon, Jun 03, 2019 at 08:52:55 +0200, Erik Skultety wrote: > > [...] > > > > I think the problem

Re: [libvirt] [PATCH 4/4] qemu: Fix qemuProcessInitCpuAffinity()

2019-06-03 Thread Andrea Bolognani
On Fri, 2019-05-31 at 17:22 +0200, Andrea Bolognani wrote: > Commit f136b83139c6 made some changes in the way we set CPU > affinity for QEMU processes, and while doing so unfortunately > also introduced a logic bug in that it tried to use a NUMA node > map where a CPU map was expected.

Re: [libvirt] [PATCH 4/4] qemu: Fix qemuProcessInitCpuAffinity()

2019-06-03 Thread Ján Tomko
On Fri, May 31, 2019 at 05:22:02PM +0200, Andrea Bolognani wrote: Commit f136b83139c6 made some changes in the way we set CPU affinity for QEMU processes, and while doing so unfortunately also introduced a logic bug in that it tried to use a NUMA node map where a CPU map was expected. Because

Re: [libvirt] [PATCH 3/4] util: Introduce virNumaNodesetToCPUset()

2019-06-03 Thread Ján Tomko
On Fri, May 31, 2019 at 05:22:01PM +0200, Andrea Bolognani wrote: This helper converts a set of NUMA node to the set of CPUs they contain. Signed-off-by: Andrea Bolognani --- src/libvirt_private.syms | 1 + src/util/virnuma.c | 55

Re: [libvirt] [PATCH 2/4] fixup? util: Optimize virBitmapUnion()

2019-06-03 Thread Ján Tomko
On Fri, May 31, 2019 at 05:22:00PM +0200, Andrea Bolognani wrote: The original implementation is extremely straightforward but not too efficient, because it uses the public API instead of poking the innards directly. This second implementation does the latter, and as a consequence can afford to

Re: [libvirt] [PATCH 1/4] util: Introduce virBitmapUnion()

2019-06-03 Thread Ján Tomko
On Fri, May 31, 2019 at 05:21:59PM +0200, Andrea Bolognani wrote: Signed-off-by: Andrea Bolognani --- src/libvirt_private.syms | 1 + src/util/virbitmap.c | 26 ++ src/util/virbitmap.h | 4 tests/virbitmaptest.c| 37 + 4

Re: [libvirt] [PATCH 0/4] test_driver: implement virDomainSaveImageGetXMLDesc and virDomainSaveImageDefineXML

2019-06-03 Thread Pavel Hrdina
On Mon, Jun 03, 2019 at 10:36:58AM +0200, Erik Skultety wrote: > On Wed, May 29, 2019 at 02:22:55PM +0200, Ilias Stamatis wrote: > > While implementing virDomainSaveImageGetXMLDesc and > > virDomainSaveImageDefineXML for the test driver, I realized that there > > exists already code for saving and

Re: [libvirt] Scope of the test driver? (Was: Re: [PATCH] test_driver: implement virDomainSendKey)

2019-06-03 Thread Peter Krempa
On Mon, Jun 03, 2019 at 13:13:14 +0200, Erik Skultety wrote: > On Mon, Jun 03, 2019 at 12:31:56PM +0200, Peter Krempa wrote: > > On Mon, Jun 03, 2019 at 08:52:55 +0200, Erik Skultety wrote: [...] > > I think the problem here is that it's unclear what the purpose of the > > test driver is

Re: [libvirt] Scope of the test driver? (Was: Re: [PATCH] test_driver: implement virDomainSendKey)

2019-06-03 Thread Pavel Hrdina
On Mon, Jun 03, 2019 at 01:13:14PM +0200, Erik Skultety wrote: > On Mon, Jun 03, 2019 at 12:31:56PM +0200, Peter Krempa wrote: > > On Mon, Jun 03, 2019 at 08:52:55 +0200, Erik Skultety wrote: > > > On Mon, Jun 03, 2019 at 08:40:13AM +0200, Pavel Hrdina wrote: > > > > On Mon, Jun 03, 2019 at

Re: [libvirt] [PATCH 4/5] cpu_x86: Probe TSC frequency and scaling support

2019-06-03 Thread Jiri Denemark
On Mon, Jun 03, 2019 at 09:24:14 +0200, Ján Tomko wrote: > On Fri, May 31, 2019 at 02:00:10PM +0200, Jiri Denemark wrote: > >When the host CPU supports invariant TSC the host CPU definition created > >by virCPUx86GetHost will contain (unless probing fails for some reason) > >addition TSC related

Re: [libvirt] Scope of the test driver? (Was: Re: [PATCH] test_driver: implement virDomainSendKey)

2019-06-03 Thread Erik Skultety
On Mon, Jun 03, 2019 at 12:31:56PM +0200, Peter Krempa wrote: > On Mon, Jun 03, 2019 at 08:52:55 +0200, Erik Skultety wrote: > > On Mon, Jun 03, 2019 at 08:40:13AM +0200, Pavel Hrdina wrote: > > > On Mon, Jun 03, 2019 at 08:23:57AM +0200, Erik Skultety wrote: > > > > On Sat, Jun 01, 2019 at

Re: [libvirt] [PATCH 2/4] test_driver: extract image loading code into a separate function

2019-06-03 Thread Erik Skultety
On Mon, Jun 03, 2019 at 10:39:22AM +0200, Erik Skultety wrote: > On Wed, May 29, 2019 at 02:22:57PM +0200, Ilias Stamatis wrote: > > Extracting the code logic for opening and parsing a test image from > > testDomainRestoreFlags into a separate function, allows us to reuse this > > code in other

[libvirt] Scope of the test driver? (Was: Re: [PATCH] test_driver: implement virDomainSendKey)

2019-06-03 Thread Peter Krempa
On Mon, Jun 03, 2019 at 08:52:55 +0200, Erik Skultety wrote: > On Mon, Jun 03, 2019 at 08:40:13AM +0200, Pavel Hrdina wrote: > > On Mon, Jun 03, 2019 at 08:23:57AM +0200, Erik Skultety wrote: > > > On Sat, Jun 01, 2019 at 02:46:56PM +0200, Ilias Stamatis wrote: [...] > > > I think this API

Re: [libvirt] [PATCH 2/4] test_driver: extract image loading code into a separate function

2019-06-03 Thread Erik Skultety
On Wed, May 29, 2019 at 02:22:57PM +0200, Ilias Stamatis wrote: > Extracting the code logic for opening and parsing a test image from > testDomainRestoreFlags into a separate function, allows us to reuse this > code in other functions such as testDomainSaveImageGetXMLDesc. > > Signed-off-by: Ilias

Re: [libvirt] [PATCH 0/4] test_driver: implement virDomainSaveImageGetXMLDesc and virDomainSaveImageDefineXML

2019-06-03 Thread Erik Skultety
On Wed, May 29, 2019 at 02:22:55PM +0200, Ilias Stamatis wrote: > While implementing virDomainSaveImageGetXMLDesc and > virDomainSaveImageDefineXML for the test driver, I realized that there > exists already code for saving and loading test images which can be > reused. However, it needed to be

Re: [libvirt] [PATCH 1/4] test_driver: extract image saving code into a separate function

2019-06-03 Thread Erik Skultety
On Wed, May 29, 2019 at 02:22:56PM +0200, Ilias Stamatis wrote: > Extracting the code logic for writing a test image to disk from > testDomainSaveFlags into a separate function, allows us to reuse this > code in other functions such as testDomainSaveImageDefineXML. > > Signed-off-by: Ilias

Re: [libvirt] [PATCH 4/5] cpu_x86: Probe TSC frequency and scaling support

2019-06-03 Thread Ján Tomko
On Fri, May 31, 2019 at 02:00:10PM +0200, Jiri Denemark wrote: When the host CPU supports invariant TSC the host CPU definition created by virCPUx86GetHost will contain (unless probing fails for some reason) addition TSC related data. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 9

Re: [libvirt] [PATCH] test_driver: implement virDomainGetHostname

2019-06-03 Thread Erik Skultety
On Fri, May 31, 2019 at 05:38:44PM +0200, Ilias Stamatis wrote: > On Fri, May 31, 2019 at 4:31 PM Ilias Stamatis > wrote: > > > > Always return "domain_name" + "host". > > > > Signed-off-by: Ilias Stamatis > > --- > > src/test/test_driver.c | 22 ++ > > 1 file changed, 22

Re: [libvirt] [PATCH] test_driver: implement virDomainSendKey

2019-06-03 Thread Pavel Hrdina
On Mon, Jun 03, 2019 at 08:56:31AM +0200, Ján Tomko wrote: > On Mon, Jun 03, 2019 at 08:40:13AM +0200, Pavel Hrdina wrote: > > On Mon, Jun 03, 2019 at 08:23:57AM +0200, Erik Skultety wrote: > > > On Sat, Jun 01, 2019 at 02:46:56PM +0200, Ilias Stamatis wrote: > > > > +for (i = 0; i <

Re: [libvirt] [PATCH] test_driver: implement virDomainSendKey

2019-06-03 Thread Ján Tomko
On Mon, Jun 03, 2019 at 08:40:13AM +0200, Pavel Hrdina wrote: On Mon, Jun 03, 2019 at 08:23:57AM +0200, Erik Skultety wrote: On Sat, Jun 01, 2019 at 02:46:56PM +0200, Ilias Stamatis wrote: > +for (i = 0; i < nkeycodes; i++) { > +if (virKeycodeValueTranslate(codeset, codeset,

Re: [libvirt] [PATCH] test_driver: implement virDomainSendKey

2019-06-03 Thread Erik Skultety
On Mon, Jun 03, 2019 at 08:40:13AM +0200, Pavel Hrdina wrote: > On Mon, Jun 03, 2019 at 08:23:57AM +0200, Erik Skultety wrote: > > On Sat, Jun 01, 2019 at 02:46:56PM +0200, Ilias Stamatis wrote: > > > Validate @keycodes and sleep for @holdtime before successfully > > > returning. > > > > > >

Re: [libvirt] [PATCH] test_driver: implement virDomainSendKey

2019-06-03 Thread Pavel Hrdina
On Mon, Jun 03, 2019 at 08:23:57AM +0200, Erik Skultety wrote: > On Sat, Jun 01, 2019 at 02:46:56PM +0200, Ilias Stamatis wrote: > > Validate @keycodes and sleep for @holdtime before successfully > > returning. > > > > Signed-off-by: Ilias Stamatis > > --- > > src/test/test_driver.c | 40

Re: [libvirt] [PATCH] virDomainSendKey: validate codeset argument

2019-06-03 Thread Erik Skultety
On Sat, Jun 01, 2019 at 02:40:12PM +0200, Ilias Stamatis wrote: > This argument wasn't validated anywhere, neither in the generic > implementation nor in the individual drivers. As a result a call to this > function with a large enough codeset value prior to this change causes > libvirtd to crash.

Re: [libvirt] [PATCH] test_driver: implement virDomainSendKey

2019-06-03 Thread Erik Skultety
On Sat, Jun 01, 2019 at 02:46:56PM +0200, Ilias Stamatis wrote: > Validate @keycodes and sleep for @holdtime before successfully > returning. > > Signed-off-by: Ilias Stamatis > --- > src/test/test_driver.c | 40 > 1 file changed, 40 insertions(+) > >