Re: [libvirt] [PATCH 5/5] libvirtd: Fix order of cleanup processing

2017-11-15 Thread Erik Skultety
On Fri, Nov 10, 2017 at 05:51:26PM -0500, John Ferlan wrote: > > > On 11/10/2017 10:23 AM, Erik Skultety wrote: > > On Tue, Nov 07, 2017 at 09:39:56PM -0500, John Ferlan wrote: > >> Current cleanup processing is ad-hoc at best - it's led to a couple of > >> strange and hard to diagnose timing

[libvirt] [PATCH] virsh: fixing wrong datatype of 'set-lifcycle-action' command options.

2017-11-15 Thread Julio Faracco
The 'set-lifcycle-action' is throwing a weird error after executing it with the '--help' option. The command output is showing the options 'type' and 'action' are as optional, but they aren't. Both are required. virsh # set-lifecycle-action --help ... SYNOPSIS set-lifecycle-action [--type

[libvirt] 答复: Re: [PATCH 0/2] Add 'l2-cache-size' property to specify maximum size of the L2 table cache for qcow2 image

2017-11-15 Thread Lin Ma
>>> John Ferlan 2017/11/15 星期三 下午 6:54 >>> > > >On 11/14/2017 08:58 PM, Lin Ma wrote: >> Lin Ma (2): >> caps: Add capability for maximum size of the qcow2 L2 table cache v> qemu: Add support for 'l2-cache-size' property of qcow2 >> > >There's already something on list

[libvirt] [PATCH go-xml] Add support for panic device

2017-11-15 Thread zhenwei.pi
Add DomainAddressISA for panic device address. Add DomainPanic. Add test code. Signed-off-by: zhenwei.pi --- domain.go | 38 ++ domain_test.go | 28 +--- 2 files changed, 63 insertions(+), 3

Re: [libvirt] [PATCH 1/2] storage: Resolve storage driver crash

2017-11-15 Thread John Ferlan
On 11/07/2017 08:38 AM, John Ferlan wrote: > > > On 11/07/2017 04:36 AM, Ján Tomko wrote: >> On Mon, Nov 06, 2017 at 03:53:08PM -0500, John Ferlan wrote: >>> Resolve a storage driver crash as a result of a long running >>> storageVolCreateXML when the virStorageVolPoolRefreshThread is >>> run

Re: [libvirt] [PATCH 16/21] resctrl: Add functions to work with resctrl allocations

2017-11-15 Thread John Ferlan
[...] >> /* Info-related functions */ >> int >> virResctrlGetInfo(virResctrlInfoPtr *resctrl) >> @@ -318,3 +465,866 @@ virResctrlInfoGetCache(virResctrlInfoPtr resctrl, >> VIR_FREE(*controls); >> goto cleanup; >> } >> + >> + >> +/* Alloc-related functions */ >> +static

Re: [libvirt] [PATCH 3/5] libvirtd: Alter refcnt processing for domain server objects

2017-11-15 Thread John Ferlan
On 11/14/2017 09:17 AM, Erik Skultety wrote: > On Sun, Nov 12, 2017 at 09:46:48AM -0500, John Ferlan wrote: >> >> [...] >> >>> Now the actual review. >>> virNetDaemonAddServer is only used when spawning a new daemon or setting up >>> LXC >>> controller. The function essentially does: >>> >>>

Re: [libvirt] [PATCH 21/21] docs: Add CAT (resctrl) support into news.xml

2017-11-15 Thread John Ferlan
On 11/13/2017 03:50 AM, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > docs/news.xml | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/docs/news.xml b/docs/news.xml > index ef855d895886..e06c981e36da 100644 > --- a/docs/news.xml >

Re: [libvirt] [PATCH 20/21] qemu: Add support for resctrl

2017-11-15 Thread John Ferlan
Commit messages have either gone on a diet or the writer is on strike On 11/13/2017 03:50 AM, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/qemu/qemu_process.c | 61 > + > 1 file changed, 56

Re: [libvirt] [PATCH 16/21] resctrl: Add functions to work with resctrl allocations

2017-11-15 Thread Martin Kletzander
On Wed, Nov 15, 2017 at 01:17:56PM -0500, John Ferlan wrote: [...] Two blank lines (multiple instances in new functions) I tried keeping this one more organized, two lines between groups of functions, one line between functions in the same group.  But I can do two everywhere, the fact

Re: [libvirt] [PATCH 19/21] tests: Add virresctrltest

2017-11-15 Thread John Ferlan
On 11/13/2017 03:50 AM, Martin Kletzander wrote: > This test has 2 different uses: > > 1) DO_TEST_FREE initializes capabilities from vircaps2xmldata (since it > exists > there already) and then requests list of free bitmaps (all unallocated > space) from virresctrl.c > > 2)

Re: [libvirt] [PATCH 0/2] Add 'l2-cache-size' property to specify maximum size of the L2 table cache for qcow2 image

2017-11-15 Thread Kashyap Chamarthy
On Wed, Nov 15, 2017 at 04:09:28PM +0100, Alberto Garcia wrote: > On Wed 15 Nov 2017 12:21:24 PM CET, Kashyap Chamarthy wrote: > > [Cc: Alberto Garcia of QEMU, who added the 'l2-cache-size' upstream] > > [...] > > >> There's already something on list about l2 cache, see > >> > >>

Re: [libvirt] Redesigning Libvirt: Adopting use of a safe language

2017-11-15 Thread Richard W.M. Jones
On Wed, Nov 15, 2017 at 02:59:20PM +, Daniel P. Berrange wrote: > On Wed, Nov 15, 2017 at 12:28:30PM +0100, Bjoern Walk wrote: > > Why has there never been a truly satisfying standard library for C for > > this kind of stuff? If such a project would exist, this wheel > > re-inventing would be

Re: [libvirt] Redesigning Libvirt: Better supporting non-hypervisor agnostic concepts

2017-11-15 Thread Daniel P. Berrange
On Wed, Nov 15, 2017 at 05:57:45PM +, Richard W.M. Jones wrote: > On Tue, Nov 14, 2017 at 05:25:03PM +, Daniel P. Berrange wrote: > > I would anticipate a standalone process "libvirt-qemu" that an > > application can spawn, providing a normal domain XML file via the > > command line or

Re: [libvirt] [PATCH 16/21] resctrl: Add functions to work with resctrl allocations

2017-11-15 Thread John Ferlan
[...] >> >> Two blank lines (multiple instances in new functions) >> > > I tried keeping this one more organized, two lines between groups of > functions, one line between functions in the same group.  But I can do > two everywhere, the fact that I don't fully agree is irrelevant >

Re: [libvirt] [PATCH 16/21] resctrl: Add functions to work with resctrl allocations

2017-11-15 Thread Pavel Hrdina
On Mon, Nov 13, 2017 at 09:50:31AM +0100, Martin Kletzander wrote: > With this commit we finally have a way to read and manipulate basic resctrl > settings. Locking is done only on exposed functions that read/write from/to > resctrlfs. Not in fuctions that are exposed in virresctrlpriv.h as

Re: [libvirt] Redesigning Libvirt: Adopting use of a safe language

2017-11-15 Thread Richard W.M. Jones
As a point of reference, libguestfs started to allow OCaml in the daemon this summer, so effectively you can now use OCaml to implement libguestfs APIs. (I'm not suggesting libvirt should use OCaml). Some points: - We have a mixed C / OCaml daemon. The vast majority of the code is still C

Re: [libvirt] Redesigning Libvirt: Better supporting non-hypervisor agnostic concepts

2017-11-15 Thread Richard W.M. Jones
On Tue, Nov 14, 2017 at 05:25:03PM +, Daniel P. Berrange wrote: > I would anticipate a standalone process "libvirt-qemu" that an > application can spawn, providing a normal domain XML file via the > command line or stdin. It would then connect to libvirtd to register > its existance and claim

Re: [libvirt] [PATCH 18/21] tests: Minor adjustments for test data

2017-11-15 Thread John Ferlan
On 11/13/2017 03:50 AM, Martin Kletzander wrote: > This patch modifies some not yet used test data so that the adding a test > using > this data is a clean patch and not an addition of huge file with some > adjustments in small files that will be hidden in the middle of that commit. > These

Re: [libvirt] [PATCH 17/21] conf: cachetune

2017-11-15 Thread John Ferlan
Short, sweet, and to the point. Looks like this patch does nothing, eh? :-)... Of course you realized that based on my patch 15 review. After reading the cover letter I was expecting a least a few sentences here, but nothing, sigh. On 11/13/2017 03:50 AM, Martin Kletzander wrote: >

Re: [libvirt] [PATCH 13/14] qemu: switch s390/s390x default console back to serial

2017-11-15 Thread Andrea Bolognani
On Wed, 2017-11-15 at 12:50 +0100, Andrea Bolognani wrote: > From: Pino Toscano > > Now that and on s390/s390x behave a bit more like the > other architectures, remove this extra differentation, and use sclp > console by default for new guests. New virtio consoles can

Re: [libvirt] [PATCH 12/14] conf: convert sclp/sclplm as

2017-11-15 Thread Andrea Bolognani
On Wed, 2017-11-15 at 12:50 +0100, Andrea Bolognani wrote: > From: Pino Toscano > > In case we are allowed to break the ABI of a s390/s390x guest, then > convert the first sclp/sclplm console from to , just > like it is done on other architectures. > > Signed-off-by: Pino

Re: [libvirt] [PATCH 11/14] conf: pass parseFlags down to virDomainDefAddConsoleCompat

2017-11-15 Thread Andrea Bolognani
On Wed, 2017-11-15 at 12:50 +0100, Andrea Bolognani wrote: > From: Pino Toscano > > Signed-off-by: Pino Toscano > --- > src/conf/domain_conf.c | 10 ++ > src/conf/domain_conf.h | 3 ++- > src/vz/vz_sdk.c| 2 +- Assuming the series

Re: [libvirt] [PATCH 10/14] conf: add VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP/SCLPLM

2017-11-15 Thread Andrea Bolognani
On Wed, 2017-11-15 at 12:50 +0100, Andrea Bolognani wrote: > @@ -10249,6 +10249,15 @@ qemuBuildSerialChrDeviceStr(char **deviceStr, > } > break; > > +case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP: > +case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLPLM: > +if

[libvirt] [PATCH 15/14] docs: Improve documentation for serial consoles

2017-11-15 Thread Andrea Bolognani
Our current documentation is missing some information and doesn't do a great job at explaining how the and elements are connected. Let's try to fix that. Signed-off-by: Andrea Bolognani --- docs/formatdomain.html.in | 212 +- 1

Re: [libvirt] [PATCH 0/2] Add 'l2-cache-size' property to specify maximum size of the L2 table cache for qcow2 image

2017-11-15 Thread Alberto Garcia
On Wed 15 Nov 2017 12:21:24 PM CET, Kashyap Chamarthy wrote: > [Cc: Alberto Garcia of QEMU, who added the 'l2-cache-size' upstream] [...] >> There's already something on list about l2 cache, see >> >> https://www.redhat.com/archives/libvir-list/2017-September/msg00553.html >> >> it adds 3

Re: [libvirt] Redesigning Libvirt: Adopting use of a safe language

2017-11-15 Thread Daniel P. Berrange
On Wed, Nov 15, 2017 at 12:28:30PM +0100, Bjoern Walk wrote: > Daniel P. Berrange [2017-11-14, 05:27PM +]: > > The Problem(s) > > == > > > > When libvirt was created, C was the only viable choice for anything aiming > > to be > > a core system library

[libvirt] [PATCH v2 1/3] virQEMUCapsHasPCIMultiBus: Fix @def type

2017-11-15 Thread Michal Privoznik
This function only queries domani @def. It doesn't change it. Therefore it should take const pointer. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH v2 3/3] qemuBuildDeviceAddressStr: Prefer default alias for PCI bus

2017-11-15 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1434451 Just like in 9324f67a572f9b32 we need to put default pci-root alias onto the command line instead of the one provided by user. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c| 30

[libvirt] [PATCH v2 0/3] Fix user provided aliases for some devices

2017-11-15 Thread Michal Privoznik
In case user provides an alias for a device that is implicit (e.g. IDE controller for 440fx, SATA for Q35, etc.) we don't put the device onto qemu command line. Therefore we can't set its alias. diff to v1: - more controllers covered Michal Privoznik (3): virQEMUCapsHasPCIMultiBus: Fix @def

[libvirt] [PATCH v2 2/3] qemuBuildDriveDevStr: Prefer default alias for SATA bus

2017-11-15 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1434451 Just like in 9324f67a572f9b32 we need to put default sata alias (which is hardcoded to "ide", obvious, right?) onto the command line instead of the one provided by user. Signed-off-by: Michal Privoznik ---

Re: [libvirt] [PATCH 12/21] resctrl: Instantiate all resctrl information at once

2017-11-15 Thread Pavel Hrdina
On Mon, Nov 13, 2017 at 09:50:27AM +0100, Martin Kletzander wrote: > This allows for looking up the cache control information more sensibly from > conf/capabilities.c and also provides more data to the virresctrl module that > will get more usable later on. > > Signed-off-by: Martin Kletzander

Re: [libvirt] [PATCH] qemuBuildDeviceAddressStr: Prefer default alias for PCI bus

2017-11-15 Thread Ján Tomko
On Tue, Nov 14, 2017 at 05:26:32PM +0100, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1434451 Just like in 9324f67a572f9b32 we need to put default pci-root alias onto the command line instead of the one provided by user. Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH 16/21] resctrl: Add functions to work with resctrl allocations

2017-11-15 Thread Martin Kletzander
On Tue, Nov 14, 2017 at 06:52:48PM -0500, John Ferlan wrote: On 11/13/2017 03:50 AM, Martin Kletzander wrote: With this commit we finally have a way to read and manipulate basic resctrl settings. Locking is done only on exposed functions that read/write from/to resctrlfs. Not in fuctions

Re: [libvirt] [PATCH 0/2] virtlo(ck|g)d: Two simple improvements

2017-11-15 Thread Michal Privoznik
On 11/14/2017 02:40 PM, Erik Skultety wrote: > Erik Skultety (2): > daemon: virtlogd: Drop the server shortcut ref pointer > daemon: virtlockd: Call virNetDaemonGetServer regardless of post exec > > src/locking/lock_daemon.c | 5 +++-- > src/logging/log_daemon.c | 54 >

Re: [libvirt] [PATCH] hooks: Fix a wrong description

2017-11-15 Thread Michal Privoznik
On 11/15/2017 08:51 AM, Chen Hanxiao wrote: > From: Chen Hanxiao > > In the definition of virHookQemuOpType and virHookNetworkOpType, > we should use 'stopped' rather than 'shutdown'. > > Signed-off-by: Chen Hanxiao > --- > docs/hooks.html.in | 2

[libvirt] PATCH go-xml : add virtualport support

2017-11-15 Thread Karol Czeryna
Hi guys! Working with terraform libvirt plugin I discovered lack of openvswitch support - but in libvirt-go there is no support for virtualport entry.. this patch adds virtualport support. diff --git a/network.go b/network.go index 10c4dfc..0f072ec 100644 --- a/network.go +++ b/network.go @@

Re: [libvirt] [PATCH 12/21] resctrl: Instantiate all resctrl information at once

2017-11-15 Thread Martin Kletzander
On Tue, Nov 14, 2017 at 10:57:26AM -0500, John Ferlan wrote: On 11/13/2017 03:50 AM, Martin Kletzander wrote: This allows for looking up the cache control information more sensibly from conf/capabilities.c and also provides more data to the virresctrl module that will get more usable later

[libvirt] [PATCH 07/14] conf: Add VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR

2017-11-15 Thread Andrea Bolognani
We can finally introduce a specific target type for the spapr-vty device used by pSeries guests, which means isa-serial will no longer show up to confuse users. We make sure migration works in both directions by interpreting the isa-serial target type, or the lack of target type, appropriately

[libvirt] [PATCH 01/14] qemu: Add QEMU_CAPS_DEVICE_SPAPR_VTY

2017-11-15 Thread Andrea Bolognani
Up until now we assumed the spapr-vty device would always be present, which is not very nice. Check for its availability before using it instead. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h

[libvirt] [PATCH 11/14] conf: pass parseFlags down to virDomainDefAddConsoleCompat

2017-11-15 Thread Andrea Bolognani
From: Pino Toscano Signed-off-by: Pino Toscano --- src/conf/domain_conf.c | 10 ++ src/conf/domain_conf.h | 3 ++- src/vz/vz_sdk.c| 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c

[libvirt] [PATCH 08/14] qemu: Support usb-serial and pci-serial on pSeries

2017-11-15 Thread Andrea Bolognani
The existing implementation set the address type for all serial devices to spapr-vio, which made it impossible to use other devices such as usb-serial and pci-serial; moreover, some decisions were made based on the address type rather than the device type. Resolves:

[libvirt] [PATCH 06/14] conf: Drop virDomainChrDeviceType.targetTypeAttr

2017-11-15 Thread Andrea Bolognani
This attribute was used to decide whether to format the type attribute of the element, but the logic didn't take into account all possible cases and as such could lead to unexpected results. Moreover, it's one more thing to keep track of, and can easily fall out of sync with other attributes.

[libvirt] [PATCH 04/14] conf: Run devicePostParse() again for the first serial device

2017-11-15 Thread Andrea Bolognani
The devicePostParse() callback is invoked for all devices so that drivers have a chance to set their own specific values; however, virDomainDefAddImplicitDevices() runs *after* the devicePostParse() callbacks have been invoked and can add new devices, in which case the driver wouldn't have a

[libvirt] [PATCH 13/14] qemu: switch s390/s390x default console back to serial

2017-11-15 Thread Andrea Bolognani
From: Pino Toscano Now that and on s390/s390x behave a bit more like the other architectures, remove this extra differentation, and use sclp console by default for new guests. New virtio consoles can still be added, and it is actually needed because of the limited number

[libvirt] [PATCH 12/14] conf: convert sclp/sclplm as

2017-11-15 Thread Andrea Bolognani
From: Pino Toscano In case we are allowed to break the ABI of a s390/s390x guest, then convert the first sclp/sclplm console from to , just like it is done on other architectures. Signed-off-by: Pino Toscano --- src/conf/domain_conf.c

[libvirt] [PATCH 03/14] qemu: Introduce qemuDomainChrDefPostParse()

2017-11-15 Thread Andrea Bolognani
Having a separate function for char device handling is better than adding even more code to qemuDomainDeviceDefPostParse(). Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff

[libvirt] [PATCH 10/14] conf: add VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP/SCLPLM

2017-11-15 Thread Andrea Bolognani
From: Pino Toscano Introduce specific target types for the two console devices (sclp and sclplm) used in s390 and s390x guests, so isa-serial is no more used for them. This makes usable on s390 and s390x guests, with at most only a single sclpconsole and one sclplmconsole

[libvirt] [PATCH 00/14] Fix serial console behavior on non-x86 architectures

2017-11-15 Thread Andrea Bolognani
See the last commit for a short explanation of what this series is all about. Andrea Bolognani (10): qemu: Add QEMU_CAPS_DEVICE_SPAPR_VTY conf,qemu: Use type-aware switches where possible qemu: Introduce qemuDomainChrDefPostParse() conf: Run devicePostParse() again for the first serial

[libvirt] [PATCH 05/14] conf: Introduce VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE

2017-11-15 Thread Andrea Bolognani
This is the first step in getting rid of the assumption that isa-serial is the default target type for serial devices. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c | 8 +--- src/conf/domain_conf.h | 3 ++- src/qemu/qemu_command.c|

[libvirt] [PATCH 02/14] conf, qemu: Use type-aware switches where possible

2017-11-15 Thread Andrea Bolognani
The compiler can warn us if we add a value to the virDomainChrSerialTargetType enumeration but forget to handle it properly in the code. Let's take advantage of that. This commit is best viewed with 'git diff -w'. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c

[libvirt] [PATCH 09/14] conf: Add VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_PL011

2017-11-15 Thread Andrea Bolognani
We can finally introduce a specific target type for the pl011 device used by mach-virt guests, which means isa-serial will no longer show up to confuse users. We make sure migration works in both directions by interpreting the isa-serial target type, or the lack of target type, appropriately when

[libvirt] [PATCH 14/14] news: Update for serial console fixes

2017-11-15 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- docs/news.xml | 12 1 file changed, 12 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index efde4c8b7..7d2b20ecf 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -124,6 +124,18 @@ can prepare the files

Re: [libvirt] [PATCH] spec: don't package product dirs

2017-11-15 Thread Martin Kletzander
On Tue, Nov 14, 2017 at 06:12:56PM +0300, Nikolay Shirokovskiy wrote: On 13.11.2017 11:35, Martin Kletzander wrote: On Thu, Sep 28, 2017 at 09:35:45AM +0300, Nikolay Shirokovskiy wrote: Directories /var/{lib,cache}/libvirt/qemu/ are created by libvirtd on start and their owner:group is

Re: [libvirt] Redesigning Libvirt: Adopting use of a safe language

2017-11-15 Thread Bjoern Walk
Hello Daniel, thank you for this interesting insight. The future-proof choice of tools, especially programming languages, is certainly a problem that a lot of project have to solve sooner rather then later. For projects that are currently written in any non-memory-managed language, this issue is

Re: [libvirt] [PATCH 0/2] Add 'l2-cache-size' property to specify maximum size of the L2 table cache for qcow2 image

2017-11-15 Thread Kashyap Chamarthy
[Cc: Alberto Garcia of QEMU, who added the 'l2-cache-size' upstream] On Wed, Nov 15, 2017 at 05:54:13AM -0500, John Ferlan wrote: > > > On 11/14/2017 08:58 PM, Lin Ma wrote: > > Lin Ma (2): > > caps: Add capability for maximum size of the qcow2 L2 table cache > > qemu: Add support for

Re: [libvirt] [PATCH 0/2] Add 'l2-cache-size' property to specify maximum size of the L2 table cache for qcow2 image

2017-11-15 Thread John Ferlan
On 11/14/2017 08:58 PM, Lin Ma wrote: > Lin Ma (2): > caps: Add capability for maximum size of the qcow2 L2 table cache > qemu: Add support for 'l2-cache-size' property of qcow2 > There's already something on list about l2 cache, see

[libvirt] 答复: 答复: Help:Can libvirt restore several xen snapshots more faster at same time?

2017-11-15 Thread Chenjia (C)
Dear libvirt expert: Thanks for your reply. if we use ' virsh restore file --bypass-cache', we got the error message: 'unsupported flags (0x1) in function libxlDomainRestoreFlags'. By the way , May be our goal is not make it clear to you, add argument:'--bypass-cache'