Re: [libvirt] [PATCH 0/3] sample: vfio mdev display devices.

2018-04-24 Thread Gerd Hoffmann
Hi, > Here's another proposal that's really growing on me: > > * Fix the vendor drivers! Allow devices to be opened and probed >without these external dependencies. Hmm. If you try use gvt with tcg then, wouldn't qemu think "device probed ok, all green" then even though that isn't the c

Re: [libvirt] [PATCH v2 06/11] conf: Add VM Generation ID parse/format support

2018-04-24 Thread Peter Krempa
On Mon, Apr 23, 2018 at 20:00:00 -0400, John Ferlan wrote: > The VM Generation ID is a mechanism to provide a unique 128-bit, > cryptographically random, and integer value identifier known as > the GUID (Globally Unique Identifier) to the guest OS. The value > is used to help notify the guest opera

Re: [libvirt] [PATCH v2 05/11] conf: Add flag to regenerate genid for virDomainDefCopy

2018-04-24 Thread Peter Krempa
On Mon, Apr 23, 2018 at 19:59:59 -0400, John Ferlan wrote: > Add the VIR_DOMAIN_DEF_COPY_NEWGENID to indicate that the generated > domain definition should adjust the genid value before returning the > @def to the caller. > > Signed-off-by: John Ferlan > --- > src/conf/domain_conf.c | 12 +++

Re: [libvirt] [PATCH v2 10/11] qemu: Add VM Generation ID to qemu command line

2018-04-24 Thread Peter Krempa
On Mon, Apr 23, 2018 at 20:00:04 -0400, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1149445 > > If the domain requests usage of the genid functionality, > then add the QEMU '-device vmgenid' to the command line > providing either the supplied or generated GUID value. > > Add

Re: [libvirt] [qemu RFC v3 1/3] qapi: add SysEmuTarget to "common.json"

2018-04-24 Thread Kashyap Chamarthy
On Sat, Apr 21, 2018 at 01:12:44AM +0200, Laszlo Ersek wrote: > We'll soon need an enumeration type that lists all the softmmu targets > that QEMU (the project) supports. Introduce @SysEmuTarget to > "common.json". [...] > Notes: > RFCv3: > > - The patch is new in this version. [Dan,

Re: [libvirt] [PATCH rust] git: add config file telling git-publish how to send patches

2018-04-24 Thread Daniel P . Berrangé
On Mon, Apr 23, 2018 at 03:39:13PM +0200, Andrea Bolognani wrote: > On Mon, 2018-04-23 at 15:20 +0200, Ján Tomko wrote: > On Mon, Apr 23, 2018 at > 01:54:32PM +0100, Daniel P. Berrangé wrote: > > > +[gitpublishprofile "default"] > > > +base = master > > > +to = libvir-list@redhat.com > > > +prefix

Re: [libvirt] [PATCH v2 0/2] fix parallel shutdown in libvirt-guests.sh

2018-04-24 Thread Andrea Bolognani
On Thu, 2018-04-19 at 08:41 +0200, Christian Ehrhardt wrote: > Working on a few issues in parallel shutdown. The first is fixing a real > issue, > while the latter avoids printing a message with an empty variable. > > *Updates since V1* > - added Reviewed-by to patch #1 > - added second patch t

Re: [libvirt] [PATCH] virNumaGetHugePageInfo: Return page_avail and page_free as ULL

2018-04-24 Thread Daniel P . Berrangé
On Mon, Apr 23, 2018 at 05:44:38PM +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1569678 > > On some large systems (with ~400GB of RAM) it is possible for > unsigned int to overflow in which case we report invalid number > of 4K pages pool size. Switch to unsigned lo

Re: [libvirt] [PATCH v2 0/2] fix parallel shutdown in libvirt-guests.sh

2018-04-24 Thread Michal Privoznik
On 04/24/2018 10:23 AM, Andrea Bolognani wrote: > On Thu, 2018-04-19 at 08:41 +0200, Christian Ehrhardt wrote: >> Working on a few issues in parallel shutdown. The first is fixing a real >> issue, >> while the latter avoids printing a message with an empty variable. >> >> *Updates since V1* >> -

Re: [libvirt] [PATCH 0/8] vfio-ccw passthrough support

2018-04-24 Thread Shalini Chellathurai Saroja
Polite ping. On 04/11/2018 05:49 PM, Shalini Chellathurai Saroja wrote: Let us support the basic channel I/O passthrough infrastructure based on vfio, which have been introduced in QEMU 2.10. The current focus is to support dasd-eckd (cu_type/dev_type = 0x3990/0x3390) as the target device. Sha

Re: [libvirt] [PATCH] virNumaGetHugePageInfo: Return page_avail and page_free as ULL

2018-04-24 Thread Michal Privoznik
On 04/24/2018 10:42 AM, Daniel P. Berrangé wrote: > On Mon, Apr 23, 2018 at 05:44:38PM +0200, Michal Privoznik wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1569678 >> >> On some large systems (with ~400GB of RAM) it is possible for >> unsigned int to overflow in which case we report invali

Re: [libvirt] [RFC v2] external (pull) backup API

2018-04-24 Thread Nikolay Shirokovskiy
On 23.04.2018 16:50, Eric Blake wrote: > On 04/23/2018 05:38 AM, Nikolay Shirokovskiy wrote: > >>> I'd argue the converse. Libvirt already knows how to do atomic updates >>> of XML files that it tracks. If libvirtd crashes/restarts in the middle >>> of an API call, you already have indeterminat

Re: [libvirt] [PATCH] qemu: Add I/O thread support info into domain capabilities

2018-04-24 Thread Michal Privoznik
On 04/23/2018 04:50 PM, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > docs/schemas/domaincaps.rng | 9 + > src/conf/domain_capabilities.c| 3 +++ > src/conf/domain_capabilities.h| 1 + > src

Re: [libvirt] [PATCH] qemu: Add I/O thread support info into domain capabilities

2018-04-24 Thread Martin Kletzander
On Tue, Apr 24, 2018 at 01:03:46PM +0200, Michal Privoznik wrote: On 04/23/2018 04:50 PM, Martin Kletzander wrote: Signed-off-by: Martin Kletzander --- docs/schemas/domaincaps.rng | 9 + src/conf/domain_capabilities.c| 3 +++ src/conf

Re: [libvirt] [PATCH 11/14] remote: refactor code for building UNIX socket paths

2018-04-24 Thread Michal Privoznik
On 04/19/2018 07:09 PM, Daniel P. Berrangé wrote: > The code for building UNIX socket paths will be getting more complex to > cope with accessing various different daemons. Refactor it to eliminate > the code duplication and isolation the logic for constructing paths. > > Signed-off-by: Daniel P.

Re: [libvirt] [PATCH 10/14] remote: split URI scheme into driver and transport upfront

2018-04-24 Thread Michal Privoznik
On 04/19/2018 07:09 PM, Daniel P. Berrangé wrote: > Currently the remote driver extracts the transport from URI scheme and > plays games to temporarily hide the driver part when formatting URIs. > Refactor the code to split the URI scheme upfront so the two pieces are > easily available where neede

Re: [libvirt] [PATCH 07/14] driver: use normal error reporting APIs when loading modules

2018-04-24 Thread Michal Privoznik
On 04/19/2018 07:09 PM, Daniel P. Berrangé wrote: > The driver module loading code is one of the few places that still uses > VIR_ERROR for reporting failures. Convert it to normal error reporting > APIs. > > Signed-off-by: Daniel P. Berrangé > --- > src/driver.c | 34 +++

Re: [libvirt] [PATCH 01/14] build: prevent unloading of all public libraries

2018-04-24 Thread Michal Privoznik
On 04/19/2018 07:09 PM, Daniel P. Berrangé wrote: > We previously added "-z nodelete" to the build of libvirt.so to prevent > crashes when thread local destructors run which point to a code that > has been dlclose()d: > > commit 384b9a76a5e387f64cfe8f83f4a518bb302e80f7 > Author: Daniel P. Berr

Re: [libvirt] [PATCH 05/14] driver: fix handling of error return from finding resource

2018-04-24 Thread Michal Privoznik
On 04/19/2018 07:09 PM, Daniel P. Berrangé wrote: > The virFileFindResource method merely builds up the expected fully > qualified path to the resource. It does not actually check if it exists > on disk. The loadable module callers were mistakenly thinking a NULL > indicates the file doesn't exist

Re: [libvirt] [PATCH 09/14] remote: honour errors from virDriverLoadModule

2018-04-24 Thread Michal Privoznik
On 04/19/2018 07:09 PM, Daniel P. Berrangé wrote: > The libvirtd daemon currently ignores the return status of > virDriverLoadModule entirely. This is way too loose, resulting in many > important problems going undiagnosed, resulting in a libvirtd that may > never work correctly. We should only ign

Re: [libvirt] [PATCH 06/14] driver: tighten check for whether loadable module exists or not

2018-04-24 Thread Michal Privoznik
On 04/19/2018 07:09 PM, Daniel P. Berrangé wrote: > Currently we do a access(R_OK) check to see whether a loadable module > exists, treating failure as non-fatal. This is unreasonably loose, as a > module which exists but has had incorrect permissions set will turn into > a silent skip. We only wan

Re: [libvirt] [PATCH 04/14] driver: don't keep a pointer to the loaded library handle

2018-04-24 Thread Michal Privoznik
On 04/19/2018 07:09 PM, Daniel P. Berrangé wrote: > Now that we've activated two hacks to prevent unloading of modules, > there is no point passing back a pointer to the loaded library handle. > > Signed-off-by: Daniel P. Berrangé > --- > src/driver.c | 23 +++---

Re: [libvirt] [PATCH 03/14] build: prevent unloading of dlopen'd modules

2018-04-24 Thread Michal Privoznik
On 04/19/2018 07:09 PM, Daniel P. Berrangé wrote: > We previously added "-z nodelete" to the build of libvirt.so to prevent > crashes when thread local destructors run which point to a code that > has been dlclose()d: > > commit 384b9a76a5e387f64cfe8f83f4a518bb302e80f7 > Author: Daniel P. Berr

Re: [libvirt] [PATCH 02/14] remote: stop trying to load Xen driver module

2018-04-24 Thread Michal Privoznik
On 04/19/2018 07:09 PM, Daniel P. Berrangé wrote: > The Xen driver was recently deleted, but libvirtd has left over code > that tries to use it. Fortunately this is dead code because WITH_XEN > will never be defined anymore. > > Signed-off-by: Daniel P. Berrangé > --- > src/remote/remote_daemon.

Re: [libvirt] [PATCH 08/14] driver: add option to make missing drivers a fatal problem

2018-04-24 Thread Michal Privoznik
On 04/19/2018 07:09 PM, Daniel P. Berrangé wrote: > Currently the driver module loading code does not report an error if the > driver module is physically missing on disk. This is useful for distro > packaging optional pieces. When the daemons are split up into one daemon > per driver, we will expe

Re: [libvirt] [PATCH 01/14] build: prevent unloading of all public libraries

2018-04-24 Thread Daniel P . Berrangé
On Tue, Apr 24, 2018 at 02:17:00PM +0200, Michal Privoznik wrote: > On 04/19/2018 07:09 PM, Daniel P. Berrangé wrote: > > We previously added "-z nodelete" to the build of libvirt.so to prevent > > crashes when thread local destructors run which point to a code that > > has been dlclose()d: > > >

Re: [libvirt] [PATCH 02/14] remote: stop trying to load Xen driver module

2018-04-24 Thread Daniel P . Berrangé
On Tue, Apr 24, 2018 at 02:16:59PM +0200, Michal Privoznik wrote: > On 04/19/2018 07:09 PM, Daniel P. Berrangé wrote: > > The Xen driver was recently deleted, but libvirtd has left over code > > that tries to use it. Fortunately this is dead code because WITH_XEN > > will never be defined anymore.

[libvirt] [PATCH 4/6] libxl: Add refcnt for args->vm during migration

2018-04-24 Thread John Ferlan
When adding the @vm to the @args for usage during a thread or callback, let's add the reference to it at the time of adding to ensure nothing else deletes it. The corresponding Unref is then added to the Dispose function. Signed-off-by: John Ferlan --- src/libxl/libxl_migration.c | 5 +++-- 1 fi

[libvirt] [PATCH 1/6] conf: Split FindBy{UUID|Name} into locked helpers

2018-04-24 Thread John Ferlan
Create helpers virDomainObjListFindByUUIDLocked and virDomainObjListFindByNameLocked to avoid the need to lock the domain object list leaving that task for the caller. Signed-off-by: John Ferlan --- src/conf/virdomainobjlist.c | 58 ++--- 1 file changed, 4

[libvirt] [PATCH 0/6] Complete cleanup of domain object usage

2018-04-24 Thread John Ferlan
This should be the "last time" (famous last words) needing to alter this processing. I hope to get more than one pair of eyes looking at the series. I've looked at it long enough to feel comfortable with the changes, but I also know I probably have looked at it so long that I could have missed some

[libvirt] [PATCH 5/6] libxl: Add refcnt for args->conn during migration

2018-04-24 Thread John Ferlan
Since the @dconn reference via args->conn will be used via a thread or callback, let's make sure memory associated with it isn't free'd unexpectedly before we use it. The Unref will be done when the object is Dispose'd. Signed-off-by: John Ferlan --- src/libxl/libxl_migration.c | 5 +++-- 1 file

[libvirt] [PATCH 2/6] conf: Use virDomainObjListFindBy*Locked for virDomainObjListAdd

2018-04-24 Thread John Ferlan
Use the FindBy{UUID|Name}Locked helpers which will return a locked and ref counted object rather than the direct virHashLookup and virObjectLock of the returned object. We'll need to temporarily virObjectUnref when we assign a new domain @def, but that will change shortly when virDomainObjListAddOb

[libvirt] [PATCH 3/6] conf: Move and use virDomainObjListRemoveLocked

2018-04-24 Thread John Ferlan
Rather than open code within virDomainObjListRemove, just call the *Locked function. Additionally, add comments to virDomainObjListRemove to describe the usage model. Signed-off-by: John Ferlan --- src/conf/virdomainobjlist.c | 64 + 1 file changed, 3

[libvirt] [PATCH 6/6] conf: Clean up object referencing for Add and Remove

2018-04-24 Thread John Ferlan
When adding a new object to the domain object list, there should have been 2 virObjectRef calls made one for each list into which the object was placed to match the 2 virObjectUnref calls that would occur during Remove as part of virHashRemoveEntry when virObjectFreeHashData is called when the elem

[libvirt] [rust PATCH] travis: fix syntax for script commands

2018-04-24 Thread Daniel P . Berrangé
The script: commands were listed without a leading '-' which caused travis to concatenate them into a single command. This meant the second command became a set of arguments to the first command. Historically cargo ignored these extra args so the mistake was not noticed, but it now generates a fata

[libvirt] [PATCH v2] qemu: Add I/O thread support info into domain capabilities

2018-04-24 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- docs/schemas/domaincaps.rng | 10 ++ src/conf/domain_capabilities.c| 3 +++ src/conf/domain_capabilities.h| 1 + src/qemu/qemu_capabilities.c | 11

Re: [libvirt] [rust PATCH] travis: fix syntax for script commands

2018-04-24 Thread Sahid Orentino Ferdjaoui
On Tue, Apr 24, 2018 at 01:33:20PM +0100, Daniel P. Berrangé wrote: > The script: commands were listed without a leading '-' which caused > travis to concatenate them into a single command. This meant the second > command became a set of arguments to the first command. Historically > cargo ignored

Re: [libvirt] [rust PATCH] travis: fix syntax for script commands

2018-04-24 Thread Daniel P . Berrangé
On Tue, Apr 24, 2018 at 02:48:29PM +0200, Sahid Orentino Ferdjaoui wrote: > On Tue, Apr 24, 2018 at 01:33:20PM +0100, Daniel P. Berrangé wrote: > > The script: commands were listed without a leading '-' which caused > > travis to concatenate them into a single command. This meant the second > > com

Re: [libvirt] [PATCH rust] git: add config file telling git-publish how to send patches

2018-04-24 Thread Ján Tomko
On Mon, Apr 23, 2018 at 02:32:11PM +0100, Daniel P. Berrangé wrote: On Mon, Apr 23, 2018 at 03:20:53PM +0200, Ján Tomko wrote: I found the reverse order, i.e. 'rust PATCH' to be both nicer and more useful. (not to mention more common) For example, in some downstream lists I use a simple text ma

[libvirt] [PATCH 0/2] po: clean up some language translations

2018-04-24 Thread Daniel P . Berrangé
First we purge some translated strings that are no longer required, then we refresh from Zanata to purge bogus non-translations. Daniel P. Berrangé (2): Refresh translations to drop unused strings po: delete bogus translations from various languages po/af.mini.po | 2 +- po/am.mini.p

Re: [libvirt] [PATCH 0/2] po: clean up some language translations

2018-04-24 Thread Daniel P . Berrangé
On Tue, Apr 24, 2018 at 04:15:16PM +0100, Daniel P. Berrangé wrote: > First we purge some translated strings that are no longer required, then > we refresh from Zanata to purge bogus non-translations. > > Daniel P. Berrangé (2): > Refresh translations to drop unused strings > po: delete bogus

Re: [libvirt] [PATCH] util: improve virNetDevTapGetRealDeviceName

2018-04-24 Thread Roman Bogorodskiy
Michal Privoznik wrote: > On 04/08/2018 05:40 PM, Roman Bogorodskiy wrote: > > virNetDevTapGetRealDeviceName() is used on FreeBSD because interface > > names (such as one sees in output of tools like ifconfig(8)) might not > > match their /dev entity names, and for bhyve we need the latter. > >

Re: [libvirt] [PATCH 0/3] sample: vfio mdev display devices.

2018-04-24 Thread Alex Williamson
On Tue, 24 Apr 2018 09:17:37 +0200 Gerd Hoffmann wrote: > Hi, > > > Here's another proposal that's really growing on me: > > > > * Fix the vendor drivers! Allow devices to be opened and probed > >without these external dependencies. > > Hmm. If you try use gvt with tcg then, wouldn'

Re: [libvirt] [PATCH v2 05/11] conf: Add flag to regenerate genid for virDomainDefCopy

2018-04-24 Thread John Ferlan
On 04/24/2018 03:24 AM, Peter Krempa wrote: > On Mon, Apr 23, 2018 at 19:59:59 -0400, John Ferlan wrote: >> Add the VIR_DOMAIN_DEF_COPY_NEWGENID to indicate that the generated >> domain definition should adjust the genid value before returning the >> @def to the caller. >> >> Signed-off-by: John

[libvirt] [PATCH] remote: disable unused function on win32 platform build

2018-04-24 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- Pushed as trivial build fix src/remote/remote_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 3973b37d5f..95437b4365 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote

Re: [libvirt] [PATCH v2 06/11] conf: Add VM Generation ID parse/format support

2018-04-24 Thread John Ferlan
On 04/24/2018 03:21 AM, Peter Krempa wrote: > On Mon, Apr 23, 2018 at 20:00:00 -0400, John Ferlan wrote: >> The VM Generation ID is a mechanism to provide a unique 128-bit, >> cryptographically random, and integer value identifier known as >> the GUID (Globally Unique Identifier) to the guest OS.

Re: [libvirt] [PATCH v2 09/11] Remove check for duplicitous GenID in another VM

2018-04-24 Thread John Ferlan
On 04/24/2018 02:39 AM, Peter Krempa wrote: > On Mon, Apr 23, 2018 at 20:00:03 -0400, John Ferlan wrote: >> Signed-off-by: John Ferlan >> --- >> src/qemu/qemu_process.c | 68 >> ++--- >> 1 file changed, 2 insertions(+), 66 deletions(-) >> >> diff --g

Re: [libvirt] [RFC v2] external (pull) backup API

2018-04-24 Thread John Snow
On 04/23/2018 05:31 AM, Vladimir Sementsov-Ogievskiy wrote: > 21.04.2018 00:26, Eric Blake wrote: >> On 04/20/2018 01:24 PM, John Snow wrote: >> > Why is option 3 unworkable, exactly?: > > (3) Checkpoints exist as structures only with libvirt. They are saved > and remembered in th

Re: [libvirt] [PATCH 0/3] sample: vfio mdev display devices.

2018-04-24 Thread Kirti Wankhede
On 4/24/2018 3:10 AM, Alex Williamson wrote: > On Wed, 18 Apr 2018 12:31:53 -0600 > Alex Williamson wrote: > >> On Mon, 9 Apr 2018 12:35:10 +0200 >> Gerd Hoffmann wrote: >> >>> This little series adds three drivers, for demo-ing and testing vfio >>> display interface code. There is one mdev

Re: [libvirt] [RFC v2] external (pull) backup API

2018-04-24 Thread John Snow
On 04/23/2018 06:38 AM, Nikolay Shirokovskiy wrote: > > > On 21.04.2018 00:26, Eric Blake wrote: >> On 04/20/2018 01:24 PM, John Snow wrote: >> > Why is option 3 unworkable, exactly?: > > (3) Checkpoints exist as structures only with libvirt. They are saved > and remembered in t

Re: [libvirt] [PATCH v2 10/11] qemu: Add VM Generation ID to qemu command line

2018-04-24 Thread John Ferlan
On 04/24/2018 03:28 AM, Peter Krempa wrote: > On Mon, Apr 23, 2018 at 20:00:04 -0400, John Ferlan wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1149445 >> >> If the domain requests usage of the genid functionality, >> then add the QEMU '-device vmgenid' to the command line >> providing ei

Re: [libvirt] [PATCH 29/29] Require space after cast

2018-04-24 Thread Laine Stump
On 04/23/2018 10:16 AM, Martin Kletzander wrote: > On Mon, Apr 23, 2018 at 02:25:26PM +0100, Daniel P. Berrangé wrote: >> Personally I'm not a fan of adding the extra space - the cast is >> associated >> with the variable, so I don't think it needs it. >> > > I know we've discussed it earlier, and

Re: [libvirt] [PATCH] qemu: use target.port for isa-serial

2018-04-24 Thread John Ferlan
On 04/11/2018 07:22 AM, Thilo Cestonaro wrote: Not entirely my area of expertise, console serial ports, but I'll provide some feedback. Maybe someone else will chime in too... > A configured target.port is currently totaly ignored, while constructing s/totaly/totally s/,// > qemu commandline,

Re: [libvirt] [PATCH 0/3] sample: vfio mdev display devices.

2018-04-24 Thread Alex Williamson
On Wed, 25 Apr 2018 01:20:08 +0530 Kirti Wankhede wrote: > On 4/24/2018 3:10 AM, Alex Williamson wrote: > > On Wed, 18 Apr 2018 12:31:53 -0600 > > Alex Williamson wrote: > > > >> On Mon, 9 Apr 2018 12:35:10 +0200 > >> Gerd Hoffmann wrote: > >> > >>> This little series adds three drivers,

[libvirt] GSoC student introduction

2018-04-24 Thread Prafullkumar Tale
Hello, I'm Prafullkumar, a student participant from Google Summer of Code program. I'll be working to convert OCI-formatted containers to libvirt lxc containers[1] over the summer. I'm excited to be working with libvirt community and hope to make valuable contribution. I hangout on IRC with the h