Requesting Guidance

2020-02-22 Thread Ritish kr singh
Hello, Sir My name is Ritish Singh. I am currently pursuing my Bachelor of Technology in Computer Science. After going through a lot of GSoC Projects I found Libvirt project to be quite interesting and challenging for me and I want to contribute to this project this summer in GSoC. I want to cont

[libvirt PATCH 8/8] conf: include virnetworkportdef.h in domain_conf.h

2020-02-22 Thread Ján Tomko
Now that this file no longer transitively includes domain_conf.h, it can be included here. Signed-off-by: Ján Tomko --- src/conf/domain_conf.h | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index cdc4d25700..d85c2d7706 100

[libvirt PATCH 3/8] conf: virnetworkportdef: include virnetdevmacvlan

2020-02-22 Thread Ján Tomko
This is pulled in via domain_conf.h somehow, but it is directly used. Signed-off-by: Ján Tomko --- src/conf/virnetworkportdef.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/virnetworkportdef.c b/src/conf/virnetworkportdef.c index a0705a8322..a972b698cc 100644 --- a/src/conf/virne

[libvirt PATCH 6/8] conf: do not pass vm object to virDomainClearNetBandwidth

2020-02-22 Thread Ján Tomko
This function only uses the domain definition. Signed-off-by: Ján Tomko --- src/conf/netdev_bandwidth_conf.c | 10 +- src/conf/netdev_bandwidth_conf.h | 2 +- src/qemu/qemu_process.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/conf/netdev_bandwid

[libvirt PATCH 5/8] conf: virNetDevSupportsBandwidth: move into the C file

2020-02-22 Thread Ján Tomko
Make the header easier to read and let the compiler inline what it wants. Signed-off-by: Ján Tomko --- src/conf/netdev_bandwidth_conf.c | 23 +++ src/conf/netdev_bandwidth_conf.h | 24 +--- src/libvirt_private.syms | 1 + 3 files changed, 25 inser

[libvirt PATCH 7/8] conf: reduce includes in virnetworkportdef.h

2020-02-22 Thread Ján Tomko
All the _conf includes are only needed in the C file. Signed-off-by: Ján Tomko --- src/conf/virnetworkportdef.c | 4 src/conf/virnetworkportdef.h | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/conf/virnetworkportdef.c b/src/conf/virnetworkportdef.c index a972b69

[libvirt PATCH 2/8] bridge: include netdev_bandwidth_conf.h

2020-02-22 Thread Ján Tomko
This file uses the virNetDevBandwidth*Floor helpers without including the correct include, relying on virnetworkportdef.h to include it. Signed-off-by: Ján Tomko Fixes: 17f430eb5cfaaa3388077f2b0856f011f0b2a4c3 --- src/network/bridge_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/

[libvirt PATCH 1/8] conf: virnwfilterbindingdef: include virxml.h

2020-02-22 Thread Ján Tomko
The ParseNode function takes arguments with types from libxml. Signed-off-by: Ján Tomko --- src/conf/virnwfilterbindingdef.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/virnwfilterbindingdef.h b/src/conf/virnwfilterbindingdef.h index 3d291fd6bf..2b83d5bd21 100644 --- a/src/conf/

[libvirt PATCH 0/8] Include networkportdef.h in domain_conf.h

2020-02-22 Thread Ján Tomko
The netdev_bandwidth_conf module contains XML parsing and formatting functions operating on types from util/virnetdevbandwidth.h as well as helper functions using types from domain_conf.h and network_conf.h It does not, however, introduce any new types, so there's no need to include its header in

Re: [PATCH] Add missing files for OpenRC

2020-02-22 Thread Michal Prívozník
On 2/22/20 4:04 PM, Ryan Moeller wrote: > On Sat, Feb 22, 2020 at 9:24 AM Michal Prívozník wrote: >> >> However, I have done fixes locally. How do you feel about me squashing >> this in and then pushing? >> > > That sounds terrific! Thank you :) > Alright then. Squashed in, and pushed. Reviewe

[libvirt PATCH 4/8] conf: rename virNetDevSupportBandwidth to virNetDevSupportsBandwidth

2020-02-22 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/conf/netdev_bandwidth_conf.c | 2 +- src/conf/netdev_bandwidth_conf.h | 2 +- src/lxc/lxc_driver.c | 4 ++-- src/lxc/lxc_process.c| 2 +- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_driver.c | 4 ++-- src/qemu/qemu_hotp

[libvirt PATCH 3/7] libxl: StateInitialize: use g_autofree

2020-02-22 Thread Ján Tomko
Use g_autofree to free the driver config file path. Signed-off-by: Ján Tomko --- src/libxl/libxl_driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 2b06f1be1e..0b88c9f9d9 100644 --- a/src/libxl/libxl_driver.c

[libvirt PATCH 6/7] tests: link the libxl tests with libxltestdriver.la

2020-02-22 Thread Ján Tomko
This lets us mock functions from the libxl driver. Signed-off-by: Ján Tomko --- tests/Makefile.am | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index ed5255b62d..761c989e86 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am

[libvirt PATCH 7/7] tests: libxl: do not run the emulator

2020-02-22 Thread Ján Tomko
Ever since commit c5a00350 the libxl parser invokes the emulator to probe which device model to use. Commit b90c4b5 introduced a workaround that used a stable path which was very likely to result in the answer matching the default. However the test is still affected by the host state and the binar

[libvirt PATCH 5/7] libxl: do not mock virFileMakePath

2020-02-22 Thread Ján Tomko
Point the logDir to abs_builddir instead. Signed-off-by: Ján Tomko --- tests/libxlmock.c| 11 --- tests/testutilsxen.c | 3 +++ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/tests/libxlmock.c b/tests/libxlmock.c index b995b34cc5..60e6b78129 100644 --- a/tests/libxl

[libvirt PATCH 4/7] libxl: split out DriverConfigInit out of DriverConfigNew

2020-02-22 Thread Ján Tomko
Take the parts affected by the host state out of DriverConfigNew and put them into a separate function. Adjust all the callers to call both functions. Signed-off-by: Ján Tomko --- src/libxl/libxl_conf.c | 81 ++-- src/libxl/libxl_conf.h | 2 + src/libxl/

[libvirt PATCH 1/7] testutilsxen: error out on initialization failure

2020-02-22 Thread Ján Tomko
libxlDriverConfigNew can possibly fail on wrong firmware values (unlikely) or on failure to create the log directory (possible if you're debugging tests with VIR_FILE_ACCESS) Signed-off-by: Ján Tomko Fixes: 4a4132b4625778cf80acb9c92d06351b44468ac3 --- tests/testutilsxen.c | 3 ++- 1 file changed

[libvirt PATCH 2/7] libxl: conf: move default keepalive settings to libxlDriverConfigNew

2020-02-22 Thread Ján Tomko
These hardcoded defaults do not need to be read from the file. Move them out of libxlDriverConfigLoadFile. Signed-off-by: Ján Tomko --- src/libxl/libxl_conf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 56deca7

[libvirt PATCH 0/7] tests: libxl: clean up test mocking

2020-02-22 Thread Ján Tomko
Refactor libxlDriverConfigNew to remove the need for mocking virFilePath and add libxlDomainGetEmulatorType to the mock to remove the need to invoke a binary for nearly every domain we parse Ján Tomko (7): testutilsxen: error out on initialization failure libxl: conf: move default keepalive se

Re: [PATCH] Add missing files for OpenRC

2020-02-22 Thread Michal Prívozník
On 2/22/20 6:01 AM, Ryan Moeller wrote: > Signed-off-by: Ryan Moeller > --- > src/locking/Makefile.inc.am | 7 +++ > src/locking/virtlockd.init.in | 14 ++ > src/logging/Makefile.inc.am | 10 ++ > src/logging/virtlogd.init.in | 14 ++ > 4 files changed, 4

Re: [libvirt PATCH 00/11] qemu: introduce a per-VM event loop thread

2020-02-22 Thread Michal Prívozník
On 2/14/20 1:51 PM, Daniel P. Berrangé wrote: > This series changes the way we manage the QEMU monitor and > QEMU agent, such that all I/O is processed by a dedicated > event loop thread. > > Many times in the past years people are reported issues > where long running monitor event callbacks block

Re: [libvirt PATCH 02/11] qemu: drop ability to open monitor from FD

2020-02-22 Thread Michal Prívozník
On 2/14/20 1:52 PM, Daniel P. Berrangé wrote: > The qemuMonitorOpenFD method has not been used since it > was first introduced. > > Signed-off-by: Daniel P. Berrangé > --- > src/qemu/qemu_monitor.c | 10 -- > src/qemu/qemu_monitor.h | 5 - > 2 files changed, 15 deletions(-) Reviewe

Re: [libvirt PATCH 03/11] src: set the OS level thread name

2020-02-22 Thread Michal Privoznik
On 2/14/20 1:52 PM, Daniel P. Berrangé wrote: > Setting the thread name makes it easier to debug libvirtd > when many threads are running. > > Signed-off-by: Daniel P. Berrangé > --- > src/libvirt_private.syms | 1 + > src/util/virthread.c | 44 +++- >

Re: [libvirt PATCH 01/11] qemu: drop support for agent connections on PTYs

2020-02-22 Thread Michal Prívozník
On 2/14/20 1:51 PM, Daniel P. Berrangé wrote: > Libvirt has never configured the QEMU agent to support > running on a PTY implicitly. In theory an end user may > have written such an XML config, but this is reasonably > unlikely since when a bare is provided, libvirt > will auto-expand it to a UNI

Re: [libvirt PATCH 04/11] src: improve thread naming with human targetted names

2020-02-22 Thread Michal Prívozník
On 2/14/20 1:52 PM, Daniel P. Berrangé wrote: > Historically threads are given a name based on the C function, > and this name is just used inside libvirt. With OS level thread > naming this name is now visible to debuggers, but also has to > fit in 15 characters on Linux, so function names are too

[PATCH 3/3] qemu-img: Deprecate use of -b without -F

2020-02-22 Thread Eric Blake
Creating an image that requires format probing of the backing image is inherently unsafe (we've had several CVEs over the years based on probes leaking information to the guest on a subsequent boot). If our probing algorithm ever changes, or if other tools like libvirt determine a different probe

[PATCH 2/3] block: Add support to warn on backing file change without format

2020-02-22 Thread Eric Blake
For now, this is a mechanical addition; all callers pass false. But the next patch will use it to improve 'qemu-img rebase -u' when selecting a backing file with no format. Signed-off-by: Eric Blake --- block.c | 14 +++--- block/qcow2.c | 2 +- block/stream.c

[PATCH 0/3] Tighten qemu-img rules on missing backing format

2020-02-22 Thread Eric Blake
In the past, we have had CVEs caused by qemu probing one image type when an image started out as another but the guest was able to modify content. The solution to those CVEs was to encode backing format information into qcow2, to ensure that once we make a decision, we don't have to probe any furt