Re: [libvirt] [PATCH v5 03/13] conf: Introduce a new PCI address extension flag

2018-09-11 Thread Yi Min Zhao
在 2018/9/11 下午4:37, Andrea Bolognani 写道: On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote: [...] @@ -164,6 +164,7 @@ struct _virDomainDeviceInfo { * assignment, never saved and never reported. */ int pciConnectFlags; /* enum virDomainPCIConnectFlags */ +int pciAddre

Re: [libvirt] [PATCH v4 00/23] Introduce metadata locking

2018-09-11 Thread Bjoern Walk
Michal Privoznik [2018-09-10, 11:36AM +0200]: > Technically, this is v4 of: > > https://www.redhat.com/archives/libvir-list/2018-August/msg01627.html > > However, this is implementing different approach than any of the > previous versions. > > One of the problems with previous version was that

[libvirt] [PATCH 2/4] src: fix incorrect indentation or empty for first line in function body

2018-09-11 Thread Shi Lei
Signed-off-by: Shi Lei --- src/bhyve/bhyve_command.c | 3 - src/bhyve/bhyve_conf.c | 6 +- src/bhyve/bhyve_driver.c | 33 +-- src/bhyve/bhyve_monitor.c | 1 - src/bhyve/bhyve_process.c | 1 - src/conf/cpu_conf.c

[libvirt] [PATCH 3/4] tests: fix incorrect indentation or empty for first line in function body

2018-09-11 Thread Shi Lei
Signed-off-by: Shi Lei --- tests/qemuxml2argvmock.c | 2 +- tests/sexpr2xmltest.c| 30 +- tests/virnetdevmock.c| 1 - tests/virnettlshelpers.c | 18 +++--- tests/virshtest.c| 118 +++ tests/vshtabletest.c | 3 - tests/xml2sex

[libvirt] [PATCH 0/4] cfg.mk: Introduce syntax-check rule for incorrect indentation or empty line in function body

2018-09-11 Thread Shi Lei
This series introduce syntax-check rule for below: 1. For incorrect indentation of the first line in function body int foo(int a0, ...) { [NOT 4 spaces]int first-line; ... ... } 2. For empty first line of function body int foo(int a0, ...) { [empty line] int second-line;

[libvirt] [PATCH 4/4] tools: fix incorrect indentation or empty for first line in function body

2018-09-11 Thread Shi Lei
Signed-off-by: Shi Lei --- tools/virsh-volume.c | 1 - tools/virt-admin.c | 1 - 2 files changed, 2 deletions(-) diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index 9d6ebd2..42d1170 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -520,7 +520,6 @@ cmdVolCreateFrom(vsh

[libvirt] [PATCH 1/4] cfg.mk: Introduce syntax-check rule for incorrect indentation or empty for first line in function body

2018-09-11 Thread Shi Lei
Signed-off-by: Shi Lei --- cfg.mk | 11 +++ 1 file changed, 11 insertions(+) diff --git a/cfg.mk b/cfg.mk index 609ae86..a43cb1c 100644 --- a/cfg.mk +++ b/cfg.mk @@ -702,6 +702,17 @@ sc_preprocessor_indentation: echo '$(ME): skipping test $@: cppi not installed' 1>&2; \

Re: [libvirt] [PATCH 5/5] tests: add qemuxml2argv memfd-memory-numa test

2018-09-11 Thread John Ferlan
On 09/11/2018 04:48 AM, Marc-André Lureau wrote: > Hi > > On Tue, Sep 11, 2018 at 2:57 AM, John Ferlan wrote: >> >> >> On 09/07/2018 07:32 AM, marcandre.lur...@redhat.com wrote: >>> From: Marc-André Lureau >>> >>> Check anonymous memory is backed by memfd if qemu is capable. >>> >>> Signed-off

Re: [libvirt] [PATCH V3 1/2] libxl: drop support for Xen < 4.6

2018-09-11 Thread Jim Fehlig
On 9/11/18 4:38 PM, Jim Fehlig wrote: Currently the libxl driver claims support for Xen >= 4.4, but Xen 4.4 and 4.5 are no longer supported upstream. Let's increase the minimum supported Xen version to 4.6 and change the defined LIBXL_API_VERSION to 0x040500, which is the API version defined when

[libvirt] [PATCH V3 1/2] libxl: drop support for Xen < 4.6

2018-09-11 Thread Jim Fehlig
Currently the libxl driver claims support for Xen >= 4.4, but Xen 4.4 and 4.5 are no longer supported upstream. Let's increase the minimum supported Xen version to 4.6 and change the defined LIBXL_API_VERSION to 0x040500, which is the API version defined when Xen 4.6 was released. Since Xen 4.6 co

[libvirt] [PATCH V3 0/2] libxl: drop support for Xen 4.4 and 4.5

2018-09-11 Thread Jim Fehlig
V2: https://www.redhat.com/archives/libvir-list/2018-September/msg00383.html New in V3: - Change definition of LIBXL_API_VERSION to 0x040500, the API version set when Xen 4.6 was released - Drop the 'true' parameter to LIBVIRT_CHECK_PKG macro so configure fails if libxl is requested but the d

[libvirt] [PATCH V3 2/2] news: Announce dropping support for Xen 4.4 and 4.5

2018-09-11 Thread Jim Fehlig
Signed-off-by: Jim Fehlig ACKed-by: Michal Privoznik --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 9d16b2930b..3ed6ff8aeb 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -45,6 +45,17 @@ + +

[libvirt] [PATCH v4 4/4] block/rbd: add deprecation documentation for filename keyvalue pairs

2018-09-11 Thread Jeff Cody
Signed-off-by: Jeff Cody --- qemu-deprecated.texi | 15 +++ 1 file changed, 15 insertions(+) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 1b9c007f12..8d285b281e 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -190,6 +190,21 @@ used instead. In order

[libvirt] [PATCH v4 0/4] block/rbd: enable filename parsing on open

2018-09-11 Thread Jeff Cody
Changes from v3: Patch 4: Typo fixed [Eric] Added examples [Eric] Changes from v2: = Patch 4: New, document deprecation. [Eric] Patch 3,2: Add r-b's Changes from v1: = Patch 1: Don't pass unused BlockDriverState to helper function Pat

[libvirt] [PATCH v4 2/4] block/rbd: Attempt to parse legacy filenames

2018-09-11 Thread Jeff Cody
When we converted rbd to get rid of the older key/value-centric encoding format, we broke compatibility with image files with backing file strings encoded in the old format. This leaves a bit of an ugly conundrum, and a hacky solution. If the initial attempt to parse the "proper" options fails, i

[libvirt] [PATCH v4 1/4] block/rbd: pull out qemu_rbd_convert_options

2018-09-11 Thread Jeff Cody
Code movement to pull the conversion from Qdict to BlockdevOptionsRbd into a helper function. Reviewed-by: Eric Blake Reviewed-by: John Snow Signed-off-by: Jeff Cody --- block/rbd.c | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/block

[libvirt] [PATCH v4 3/4] block/rbd: add iotest for rbd legacy keyvalue filename parsing

2018-09-11 Thread Jeff Cody
This is a small test that will check for the ability to parse both legacy and modern options for rbd. The way the test is set up is for failure to occur, but without having to wait to timeout on a non-existent rbd server. The error messages in the success path show that the arguments were parsed.

Re: [libvirt] [PATCH v3 4/4] block/rbd: add deprecation documenation for filename keyvalue pairs

2018-09-11 Thread Jeff Cody
On Tue, Sep 11, 2018 at 04:56:36PM -0500, Eric Blake wrote: > [MAINTAINERS says libvir-list should have been cc'd; not sure why that > didn't happen] > Thanks > On 9/11/18 4:34 PM, Jeff Cody wrote: > >Signed-off-by: Jeff Cody > > In the subject: s/documenation/documentation/ > > >--- > > qem

Re: [libvirt] [PATCH v3 4/4] block/rbd: add deprecation documenation for filename keyvalue pairs

2018-09-11 Thread Eric Blake
[MAINTAINERS says libvir-list should have been cc'd; not sure why that didn't happen] On 9/11/18 4:34 PM, Jeff Cody wrote: Signed-off-by: Jeff Cody In the subject: s/documenation/documentation/ --- qemu-deprecated.texi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/qemu-depr

Re: [libvirt] [PATCH] qemu_domain: Drop namespace check from top level functions

2018-09-11 Thread John Ferlan
On 09/07/2018 08:05 AM, Michal Privoznik wrote: > In some cases we are checking if the mount namespace is enabled > at two places: one is at the beginning of exported function (e.g. > qemuDomainNamespaceSetupDisk()) and the other is at the beginning > of qemuDomainNamespaceMknodPaths() which is

Re: [libvirt] [PATCH 02/10] util: add interface retrieving CMT capability

2018-09-11 Thread John Ferlan
[...] >> Maybe the capability output should: >> >> >> >> >> ... >> >> >> Where the '3' is because you read from "L3_MON" and only important if you >> feel >> 1 or 2 or something else would be generated eventually. >> > > The adding of 'level' attribute make it more clear for indicating t

Re: [libvirt] [PATCH 5/5] tests: add qemuxml2argv memfd-memory-numa test

2018-09-11 Thread Marc-André Lureau
Hi On Tue, Sep 11, 2018 at 7:39 PM, John Ferlan wrote: > > > On 09/11/2018 09:45 AM, Marc-André Lureau wrote: >> Hi >> >> On Tue, Sep 11, 2018 at 5:21 PM, John Ferlan wrote: >>> >>> [...] >>> >> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c >> index 35df63b2ac..76008a8

Re: [libvirt] Terminal input “udevadm trigger” command,then produce “nl_recv returned with error:No buffer space available”

2018-09-11 Thread Erik Skultety
On Tue, Sep 04, 2018 at 08:50:55PM +0800, xiajid...@cmss.chinamobile.com wrote: > Dear libvirt experts, > > Hi, this is a question more suitable for libvirt-us...@redhat.com, as libvir-list is meant for upstream development. > > I have add some patch as follow.this two patch add buffer size to av

Re: [libvirt] [PATCH 07/10] conf: refactor virDomainResctrlAppend

2018-09-11 Thread John Ferlan
On 09/10/2018 02:13 PM, Wang, Huaqiang wrote: > > >> -Original Message- >> From: John Ferlan [mailto:jfer...@redhat.com] >> Sent: Wednesday, September 5, 2018 11:49 PM >> To: Wang, Huaqiang ; libvir-list@redhat.com >> Cc: Feng, Shaohe ; Niu, Bing ; >> Ding, Jian-feng ; Zang, Rui >> Su

Re: [libvirt] [PATCH 06/10] util: Introduce resctrl monitor for CMT

2018-09-11 Thread John Ferlan
On 09/10/2018 02:10 PM, Wang, Huaqiang wrote: > > >> -Original Message- >> From: John Ferlan [mailto:jfer...@redhat.com] >> Sent: Wednesday, September 5, 2018 11:00 PM >> To: Wang, Huaqiang ; libvir-list@redhat.com >> Cc: Feng, Shaohe ; Niu, Bing ; >> Ding, Jian-feng ; Zang, Rui >> Su

Re: [libvirt] [PATCH v5] qemu: Introduce state_lock_timeout to qemu.conf

2018-09-11 Thread Michal Privoznik
On 09/10/2018 10:22 PM, John Ferlan wrote: > > > On 09/05/2018 11:09 PM, Yi Wang wrote: >> When doing some job holding state lock for a long time, >> we may come across error: > > blank line > >> "Timed out during operation: cannot acquire state change lock" > > blank line > >> Well, sometime

Re: [libvirt] [PATCH 1/2] qemu: Remove network type limitation for qemuARPGetInterfaces

2018-09-11 Thread Chen Hanxiao
At 2018-09-11 13:51:43, "Lin Ma" wrote: >On 09/10/2018 02:55 PM, Chen Hanxiao wrote: > >At 2018-09-07 18:44:53, "Lin Ma" wrote: >>When we call qemuARPGetInterfaces to get IP from host's arp table, The >>iface's type has nothing to do with it, We should allow all of type. >> >>Sig

Re: [libvirt] [PATCH 0/6] Introduce VIR_AUTOCLOSE macro for closing fd automatically

2018-09-11 Thread Shi Lei
On 2018-09-11 at 20:50, Erik Skultety wrote: >On Mon, Sep 10, 2018 at 11:47:49AM +0800, Shi Lei wrote: >> This series introduce VIR_AUTOCLOSE macro which can force close fd of the >> file >> automatically when the fd goes out of scope. It's used to eliminate >> VIR_FORCE_CLOSE >> in cleanup secti

Re: [libvirt] [PATCH 5/5] tests: add qemuxml2argv memfd-memory-numa test

2018-09-11 Thread John Ferlan
On 09/11/2018 09:45 AM, Marc-André Lureau wrote: > Hi > > On Tue, Sep 11, 2018 at 5:21 PM, John Ferlan wrote: >> >> [...] >> > diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c > index 35df63b2ac..76008a8d07 100644 > --- a/tests/qemuxml2argvtest.c > +++ b/tests/qe

Re: [libvirt] [PATCH 4/6] util: netdev: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE

2018-09-11 Thread Shi Lei
On 2018-09-11 at 20:44, Erik Skultety wrote: >On Mon, Sep 10, 2018 at 11:47:53AM +0800, Shi Lei wrote: >> By making use of GNU C's cleanup attribute handled by the VIR_AUTOCLOSE >> macro, >> many of the VIR_FORCE_CLOSE calls can be dropped, which in turn leads to >> getting rid of many of our clea

Re: [libvirt] [PATCH v5 11/13] qemu: Add hotpluging support for PCI devices on S390 guests

2018-09-11 Thread Andrea Bolognani
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote: [...] > +static int > +qemuDomainAttachExtensionDevice(qemuMonitorPtr mon, > +virDomainDeviceInfoPtr info) > +{ > +if (!virZPCIDeviceAddressIsEmpty(&info->addr.pci.zpci)) > +return qemuDomainAttachZPCI

Re: [libvirt] [PATCH 1/6] util: file: introduce VIR_AUTOCLOSE macro to close fd of the file automatically

2018-09-11 Thread Shi Lei
On 2018-09-11 at 20:22, Michal Privoznik wrote: >On 09/10/2018 05:47 AM, Shi Lei wrote: >> By making use of GNU C's cleanup attribute handled by the VIR_AUTOCLOSE >> macro, >> many of the VIR_FORCE_CLOSE calls can be dropped, which in turn leads to >> getting rid of many of our cleanup sections. >

Re: [libvirt] [PATCH v5 10/13] qemu: Generate and use zPCI device in QEMU command line

2018-09-11 Thread Andrea Bolognani
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote: [...] > +char * > +qemuBuildZPCIDevStr(virDomainDeviceInfoPtr dev) > +{ > +virBuffer buf = VIR_BUFFER_INITIALIZER; > + > +virBufferAddLit(&buf, "zpci"); > +virBufferAsprintf(&buf, ",uid=%u", dev->addr.pci.zpci.uid); > +virBufferA

Re: [libvirt] [PATCH] test: Remove possible infinite loop in virnetsockettest

2018-09-11 Thread John Ferlan
On 09/11/2018 07:19 AM, Michal Privoznik wrote: > On 09/07/2018 02:26 PM, John Ferlan wrote: >> Commit 39015a6f3 modified the test to be more reliable/realistic, >> but without checking the return status of virEventRunDefaultImpl >> it's possible that the test could run infinitely. >> >> Found b

Re: [libvirt] [PATCH 3/3] storage: Allow inputvol to be encrypted

2018-09-11 Thread John Ferlan
On 09/11/2018 07:16 AM, Michal Privoznik wrote: > On 08/21/2018 06:23 PM, John Ferlan wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1613737 >> >> When processing the inputvol for encryption, we need to handle >> the case where the inputvol is encrypted. This then allows for >> the encryp

Re: [libvirt] [PATCH v5 09/13] conf: Allocate/release 'uid' and 'fid' in PCI address

2018-09-11 Thread Andrea Bolognani
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote: [...] > If the user > define zPCI extension address but zPCI capability doesn't exist, an > error will be reported. You're (no longer) checking for the capability here, so the commit message should be updated accordingly. [...] > +bool > +virD

Re: [libvirt] [PATCH 5/5] tests: add qemuxml2argv memfd-memory-numa test

2018-09-11 Thread Marc-André Lureau
Hi On Tue, Sep 11, 2018 at 5:21 PM, John Ferlan wrote: > > [...] > diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 35df63b2ac..76008a8d07 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2928,6 +2928,11 @@ mymain(void)

[libvirt] [PATCH 2/2] conf: Move hypervisor specific nhugepage checks

2018-09-11 Thread John Ferlan
Commit 82327038 moved a couple of checks out of the XML parser into the domain validation; however, those checks seem to be more useful as hypervisor specific checks rather than the more general domain conf checks (nothing in the docs indicate a specific error). Fortunately only QEMU was processin

[libvirt] [PATCH 1/2] doc: Update the wording around the backingStore

2018-09-11 Thread John Ferlan
Commit bc6d3121a was far too terse when describing the new elements, attributes, and allow values. Provide a few more words to help describe. Signed-off-by: John Ferlan --- docs/formatdomain.html.in | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/formatdoma

[libvirt] [PATCH 0/2] Cleanup memoryBacking docs and move some hugepages checks

2018-09-11 Thread John Ferlan
While reviewing the -memfd series: https://www.redhat.com/archives/libvir-list/2018-September/msg00381.html I noted that a couple of checks seemed out of place in the the domain_conf processing. They seem more "in place" in the hypvervisor processing. And while doing this I also noted the docume

Re: [libvirt] [PATCH 3/5] qemu: prefer memfd for anonymous memory

2018-09-11 Thread Marc-André Lureau
Hi On Tue, Sep 11, 2018 at 5:14 PM, Igor Mammedov wrote: > On Tue, 11 Sep 2018 12:49:12 +0100 > "Dr. David Alan Gilbert" wrote: > >> * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: >> > Hi >> > >> > On Tue, Sep 11, 2018 at 3:26 PM, Dr. David Alan Gilbert >> > wrote: >> > > * Marc-André

Re: [libvirt] [PATCH 5/5] tests: add qemuxml2argv memfd-memory-numa test

2018-09-11 Thread John Ferlan
[...] >>> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c >>> index 35df63b2ac..76008a8d07 100644 >>> --- a/tests/qemuxml2argvtest.c >>> +++ b/tests/qemuxml2argvtest.c >>> @@ -2928,6 +2928,11 @@ mymain(void) >>> DO_TEST("fd-memory-no-numa-topology", QEMU_CAPS_OBJECT_MEMORY_

Re: [libvirt] [PATCH 3/5] qemu: prefer memfd for anonymous memory

2018-09-11 Thread Igor Mammedov
On Tue, 11 Sep 2018 12:49:12 +0100 "Dr. David Alan Gilbert" wrote: > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > > Hi > > > > On Tue, Sep 11, 2018 at 3:26 PM, Dr. David Alan Gilbert > > wrote: > > > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > > >> Hi > > >> > >

Re: [libvirt] [PATCH 4/5] conf: drop hugepage non-anoymous memory requirement

2018-09-11 Thread John Ferlan
On 09/11/2018 04:37 AM, Marc-André Lureau wrote: > Hi > > On Tue, Sep 11, 2018 at 2:56 AM, John Ferlan wrote: >> >> "non-anonymous" >> >> On 09/07/2018 07:32 AM, marcandre.lur...@redhat.com wrote: >>> From: Marc-André Lureau >>> >>> memfd is able to allocate hugepage anonymous memory. >>> >>>

Re: [libvirt] [PATCH 3/5] qemu: prefer memfd for anonymous memory

2018-09-11 Thread John Ferlan
On 09/11/2018 03:53 AM, Marc-André Lureau wrote: > Hi > > On Tue, Sep 11, 2018 at 2:46 AM, John Ferlan wrote: >> >> On 09/07/2018 07:32 AM, marcandre.lur...@redhat.com wrote: >>> From: Marc-André Lureau >>> >> >> Would be nice to have a few more words here. If you provide them I can >> add the

[libvirt] [libvirt PATCH v5 1/1] xen_common: Convert to typesafe virConf acessors

2018-09-11 Thread Fabiano Fidêncio
There are still a few places using virConfGetValue(), checking for the specific type of the pointers and so on. However, those places are not going to be converted as: - Using virConfGetValue*() would trigger virReportError() in the current code, which would cause, at least, some misleading message

[libvirt] [libvirt PATCH v5 0/1] Finish the conversion to virConfGetValue* functions

2018-09-11 Thread Fabiano Fidêncio
This patchset finishes the conversion to virConfGetValue* functions, started by Daniel Berrange a few months ago. Please, mind that although we could make virConfGetValue* functions more generic in order to support numbers and booleans as strings, that doesn't seem the safest path to take. The sid

Re: [libvirt] [PATCH 0/6] Introduce VIR_AUTOCLOSE macro for closing fd automatically

2018-09-11 Thread Erik Skultety
On Mon, Sep 10, 2018 at 11:47:49AM +0800, Shi Lei wrote: > This series introduce VIR_AUTOCLOSE macro which can force close fd of the file > automatically when the fd goes out of scope. It's used to eliminate > VIR_FORCE_CLOSE > in cleanup sections. The new macro consults VIR_AUTOFREE and VIR_AUTOP

Re: [libvirt] [PATCH 4/6] util: netdev: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE

2018-09-11 Thread Erik Skultety
On Mon, Sep 10, 2018 at 11:47:53AM +0800, Shi Lei wrote: > By making use of GNU C's cleanup attribute handled by the VIR_AUTOCLOSE macro, > many of the VIR_FORCE_CLOSE calls can be dropped, which in turn leads to > getting rid of many of our cleanup sections. > > Signed-off-by: Shi Lei > --- > sr

Re: [libvirt] [PATCH v5 08/13] qemu: Add zPCI address definition check

2018-09-11 Thread Andrea Bolognani
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote: > We should ensure that the Qemu should support zPCI when zPCI address is s/Qemu/QEMU/ [...] > +static int > +qemuDomainZPCIAddressDefValidate(virDomainDeviceDef *dev, > + virQEMUCapsPtr qemuCaps) The secon

Re: [libvirt] [PATCH] news: Mention Xen support for PM suspend and wakeup

2018-09-11 Thread Michal Privoznik
On 09/10/2018 07:03 PM, Jim Fehlig wrote: > Signed-off-by: Jim Fehlig > --- > docs/news.xml | 9 + > 1 file changed, 9 insertions(+) ACK Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] qemu: fix deadlock if create qemuProcessReconnect thread failed

2018-09-11 Thread Wang Yechao
qemuProcessReconnectHelper has hold the doms lock, if create qemuProcessReconnect thread failed, it will get the doms lock again to remove the dom from doms list. add obj->inReconnetCtx flag to avoid deadlock. Signed-off-by: Wang Yechao --- src/conf/domain_conf.h | 1 + src/conf/virdomaino

Re: [libvirt] [PATCH 1/6] util: file: introduce VIR_AUTOCLOSE macro to close fd of the file automatically

2018-09-11 Thread Michal Privoznik
On 09/10/2018 05:47 AM, Shi Lei wrote: > By making use of GNU C's cleanup attribute handled by the VIR_AUTOCLOSE macro, > many of the VIR_FORCE_CLOSE calls can be dropped, which in turn leads to > getting rid of many of our cleanup sections. > > Signed-off-by: Shi Lei > --- > src/util/virfil

[libvirt] [PATCH] nwfilter:fix deadlock when nwfilter reload

2018-09-11 Thread Wang Yechao
user run "firewalld-cmd --reload" nwfilterStateReload called in main thread step 1. virRWLockWrite(&updateLock) step 2. virNWFilterLoadAllConfigs step 3. virRWLockUnlock(&updateLock); lauch a vm: qemuDomainCreateXML runs in other thread step 1. virRWLockRead(&updateLock); step 2. qemuProcessStart

[libvirt] [PATCH] nwfilter: fix deadlock when nwfilter reload

2018-09-11 Thread Wang Yechao
user run "firewalld-cmd --reload" nwfilterStateReload called in main thread step 1. virRWLockWrite(&updateLock) step 2. virNWFilterLoadAllConfigs step 3. virRWLockUnlock(&updateLock); lauch a vm: qemuDomainCreateXML runs in other thread step 1. virRWLockRead(&updateLock); step 2. qemuProcessStart

[libvirt] [PATCH] nwfilter:fix deadlock when nwfilter reload

2018-09-11 Thread Wang Yechao
user run "firewalld-cmd --reload" nwfilterStateReload called in main thread step 1. virRWLockWrite(&updateLock) step 2. virNWFilterLoadAllConfigs step 3. virRWLockUnlock(&updateLock); lauch a vm: qemuDomainCreateXML runs in other thread step 1. virRWLockRead(&updateLock); step 2. qemuProcessStart

[libvirt] Terminal input “udevadm trigger” command,then produce “nl_recv returned with error:No buffer space available”

2018-09-11 Thread xiajidong
Dear libvirt experts, I have add some patch as follow.this two patch add buffer size to avoid to produce “nl_recv returned with error:No buffer space available” 1. libvirt-nodedev-Increase-the-netlink-socket-buffer-size-to-t.patch 2. libvirt-util-increase-libnl-buffer-size.patch b

[libvirt] [PATCH] nwfilter:fix deadlock when nwfilter reload

2018-09-11 Thread Wang Yechao
user run "firewalld-cmd --reload" nwfilterStateReload called in main thread step 1. virRWLockWrite(&updateLock) step 2. virNWFilterLoadAllConfigs step 3. virRWLockUnlock(&updateLock); lauch a vm: qemuDomainCreateXML runs in other thread step 1. virRWLockRead(&updateLock); step 2. qemuProcessStart

[libvirt] [PATCH] nwfilter:fix deadlock when nwfilter reload

2018-09-11 Thread Wang Yechao
user run "firewalld-cmd --reload" nwfilterStateReload called in main thread step 1. virRWLockWrite(&updateLock) step 2. virNWFilterLoadAllConfigs step 3. virRWLockUnlock(&updateLock); lauch a vm: qemuDomainCreateXML runs in other thread step 1. virRWLockRead(&updateLock); step 2. qemuProcessStart

Re: [libvirt] [PATCH v5 07/13] conf: Introduce parser, formatter for uid and fid

2018-09-11 Thread Andrea Bolognani
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote: [...] > +static int > +virZPCIDeviceAddressIsValid(virZPCIDeviceAddressPtr zpci) This is a predicate, so it should return a bool. [...] > +virReportError(VIR_ERR_XML_ERROR, > + _("Invalid PCI address uid='0x%x', "

Re: [libvirt] [PATCH 3/5] qemu: prefer memfd for anonymous memory

2018-09-11 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > Hi > > On Tue, Sep 11, 2018 at 3:26 PM, Dr. David Alan Gilbert > wrote: > > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > >> Hi > >> > >> On Tue, Sep 11, 2018 at 2:32 PM, Dr. David Alan Gilbert > >> wrote: > >> > * Marc-Andr

Re: [libvirt] [PATCH 1/9] tests: drop 'drive' from qemuxml2startup tests

2018-09-11 Thread Michal Privoznik
On 09/09/2018 04:10 AM, Ján Tomko wrote: > Commit 0bdb704 renamed the corresponding xml->argv tests, > but due to the optimistic nature of xml->startup xml testing, > this test was quietly skipped. > > Signed-off-by: Ján Tomko > --- > .../qemuxml2startupxmloutdata/{disk-drive-shared.xml => disk-

Re: [libvirt] [PATCH 4/9] tests: only run startup XML tests if requested

2018-09-11 Thread Michal Privoznik
On 09/09/2018 04:10 AM, Ján Tomko wrote: > Use the recently introduced flag as a witness. > This reduces the apparent number of test cases > to the real number of test cases. > > Note that this does not suffer from the same problem > as commit 70255fa was fixing, because the condition > for runnin

Re: [libvirt] [PATCH 8/9] tests: turn skipLegacyCPUs into a flag

2018-09-11 Thread Michal Privoznik
On 09/09/2018 04:10 AM, Ján Tomko wrote: > Make it obvious when it is used intentionally and error > out when used in combination with real capabilities. > > Signed-off-by: Ján Tomko > --- > tests/qemuxml2argvtest.c | 23 --- > 1 file changed, 12 insertions(+), 11 deletions(-

Re: [libvirt] [PATCH 5/9] tests: report errors in QEMU XML->startup XML tests

2018-09-11 Thread Michal Privoznik
On 09/09/2018 04:10 AM, Ján Tomko wrote: > Now that the function is only run if requested by > the FLAG_STEAL_VM flag, we know that missing data > is an error, not a request to skip the test. > > The existence of the output file is now checked by > virTestCompareToFile, which allows usage of > the

Re: [libvirt] [PATCH 2/9] tests: add macro for dealing with exclusive flags

2018-09-11 Thread Michal Privoznik
On 09/09/2018 04:10 AM, Ján Tomko wrote: > We can reject some non-sensical combinations with an error > message, once we add flags for them. > > Introduce a macro to make this easier. > > Signed-off-by: Ján Tomko > --- > tests/qemuxml2argvtest.c | 18 ++ > 1 file changed, 18 ins

Re: [libvirt] [PATCH 6/9] tests: drop redundant virQEMUCapsFilterByMachineType

2018-09-11 Thread Michal Privoznik
On 09/09/2018 04:10 AM, Ján Tomko wrote: > Introduced by commit . > > Made redundant by commit 1e9a083 which switched to using > qemuProcessCreatePretendCmd, where capabilities are filtered > in qemuProcessInit after being fetched from the cache. > > Signed-off-by: Ján Tomko > --- > tests/qemux

Re: [libvirt] [PATCH 9/9] qemu: remove unnecessary virQEMUCapsFreeHostCPUModel

2018-09-11 Thread Michal Privoznik
On 09/09/2018 04:10 AM, Ján Tomko wrote: > After removing the host CPU model re-computation, > this function is no longer necessary. > > This reverts commits: > commit d0498881a04772f9f63b03de80fb4c33d090 > virQEMUCapsFreeHostCPUModel: Don't always free host cpuData > commit 5276ec712a44b368

Re: [libvirt] [PATCH 3/9] tests: introduce macro for qemu XML->startup XML

2018-09-11 Thread Michal Privoznik
On 09/09/2018 04:10 AM, Ján Tomko wrote: > Use this macro to indicate the intention to also > run the XML->startup XML test. > > It sets the newly introduced FLAG_STEAL_VM flag, > which is the new witness for the XML->argv test > to leave the VM object behind. > > This will allow us to report pro

Re: [libvirt] [PATCH 7/9] tests: do not mangle real qemu caps in xml2argvtest

2018-09-11 Thread Michal Privoznik
On 09/09/2018 04:10 AM, Ján Tomko wrote: > None of the things testUpdateQEMUCaps adjusts are applicable > for tests that use the DO_TEST_CAPS macros, i.e. > real QEMU capabilities parsed from the XML files: > > The architecture must be chosen before we even open the caps > file, CPU models are alr

Re: [libvirt] [PATCH] api,qemu: add block latency histogram

2018-09-11 Thread Vladimir Sementsov-Ogievskiy
04.09.2018 09:59, Nikolay Shirokovskiy wrote: Hi, Peter. I have questions to several of your comments: On 03.09.2018 14:59, Peter Krempa wrote: On Mon, Sep 03, 2018 at 13:58:31 +0300, Nikolay Shirokovskiy wrote: This patch adds option to configure/read latency histogram of block device IO oper

Re: [libvirt] [PATCH v5 06/13] conf: Introduce address caching for PCI extensions

2018-09-11 Thread Andrea Bolognani
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote: > This patch provides a caching mechanism for the device address > extensions uid and fid on S390. For efficient sparse address allocation, > we introduce two hash tables for uid/fid which hold the address set > information per domain. Also in o

Re: [libvirt] [PATCH 3/5] qemu: prefer memfd for anonymous memory

2018-09-11 Thread Marc-André Lureau
Hi On Tue, Sep 11, 2018 at 3:26 PM, Dr. David Alan Gilbert wrote: > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: >> Hi >> >> On Tue, Sep 11, 2018 at 2:32 PM, Dr. David Alan Gilbert >> wrote: >> > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: >> >> Hi >> >> >> >> On Tue, Se

Re: [libvirt] [PATCHv3 1/3] util: netlink: Introduce virNetlinkNewLink helper

2018-09-11 Thread John Ferlan
On 09/11/2018 02:29 AM, Erik Skultety wrote: > On Mon, Sep 10, 2018 at 01:17:43PM -0400, John Ferlan wrote: >> [...] >> I would say: * Returns 0 on success, -1 on error. Additionally, if the @error is * non-zero, then the failure occurred during virNetlinkCommand, but

Re: [libvirt] [PATCH 3/5] qemu: prefer memfd for anonymous memory

2018-09-11 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > Hi > > On Tue, Sep 11, 2018 at 2:32 PM, Dr. David Alan Gilbert > wrote: > > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > >> Hi > >> > >> On Tue, Sep 11, 2018 at 12:37 PM, Michal Privoznik > >> wrote: > >> > On 09/11/2018 1

Re: [libvirt] [PATCH] qemu: free SEV caps in virQEMUCapsDispose

2018-09-11 Thread Michal Privoznik
On 09/09/2018 03:59 AM, Ján Tomko wrote: > Commit 77f51ab5 started parsing an copying the SEV capabilities, > but omitted the free call. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_capabilities.c | 2 ++ > 1 file changed, 2 insertions(+) > ACK Michal -- libvir-list mailing list libvir

Re: [libvirt] [PATCH 0/2] Remove unnecessary/duplicated qemuAgentCheckError calls

2018-09-11 Thread Michal Privoznik
On 09/07/2018 10:01 PM, John Ferlan wrote: > Followup to review comments I made for recent agent series. > > John Ferlan (2): > qemu: Remove duplicated qemuAgentCheckError > qemu: Remove duplicated qemuAgentCheckError > > src/qemu/qemu_agent.c | 8 ++-- > 1 file changed, 2 insertions(+),

Re: [libvirt] [PATCH] test: Remove possible infinite loop in virnetsockettest

2018-09-11 Thread Michal Privoznik
On 09/07/2018 02:26 PM, John Ferlan wrote: > Commit 39015a6f3 modified the test to be more reliable/realistic, > but without checking the return status of virEventRunDefaultImpl > it's possible that the test could run infinitely. > > Found by Coverity > > Signed-off-by: John Ferlan > --- > test

Re: [libvirt] [PATCH 3/3] storage: Allow inputvol to be encrypted

2018-09-11 Thread Michal Privoznik
On 08/21/2018 06:23 PM, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1613737 > > When processing the inputvol for encryption, we need to handle > the case where the inputvol is encrypted. This then allows for > the encrypted inputvol to be used either for an output encrypted >

Re: [libvirt] [PATCH 0/3] Allow inputvol when creating vol from inputvol to be encrypted

2018-09-11 Thread Michal Privoznik
On 08/21/2018 06:23 PM, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1613737 > > Details in the patches (and even more in the bz). > > John Ferlan (3): > storage: Remove secretPath from _virStorageBackendQemuImgInfo > storage: Allow for inputvol to have any format for encr

Re: [libvirt] [PATCH 2/3] storage: Allow for inputvol to have any format for encryption

2018-09-11 Thread Michal Privoznik
On 08/21/2018 06:23 PM, John Ferlan wrote: > Commit 39cef12a9 altered/fixed the inputvol processing to create > a multistep process when using an inputvol to create an encrypted > output volume; however, it unnecessarily assumed/restricted the > inputvol to be of 'raw' format only. > > Modify the

Re: [libvirt] [PATCH 3/5] qemu: prefer memfd for anonymous memory

2018-09-11 Thread Marc-André Lureau
Hi On Tue, Sep 11, 2018 at 2:32 PM, Dr. David Alan Gilbert wrote: > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: >> Hi >> >> On Tue, Sep 11, 2018 at 12:37 PM, Michal Privoznik >> wrote: >> > On 09/11/2018 12:46 AM, John Ferlan wrote: >> >> >> >> On 09/07/2018 07:32 AM, marcandre.lur

Re: [libvirt] [PATCH 3/5] qemu: prefer memfd for anonymous memory

2018-09-11 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > Hi > > On Tue, Sep 11, 2018 at 12:37 PM, Michal Privoznik > wrote: > > On 09/11/2018 12:46 AM, John Ferlan wrote: > >> > >> On 09/07/2018 07:32 AM, marcandre.lur...@redhat.com wrote: > >>> From: Marc-André Lureau > >>> > >> > >> Would b

Re: [libvirt] [PATCH 3/5] qemu: prefer memfd for anonymous memory

2018-09-11 Thread Marc-André Lureau
Hi On Tue, Sep 11, 2018 at 12:37 PM, Michal Privoznik wrote: > On 09/11/2018 12:46 AM, John Ferlan wrote: >> >> On 09/07/2018 07:32 AM, marcandre.lur...@redhat.com wrote: >>> From: Marc-André Lureau >>> >> >> Would be nice to have a few more words here. If you provide them I can >> add them... T

Re: [libvirt] [PATCHv4 1/2] util: netlink: Introduce virNetlinkNewLink helper to simplify virNetDev*Create

2018-09-11 Thread Shi Lei
On 2018-09-11 at 17:16, Erik Skultety wrote: >On Tue, Sep 11, 2018 at 04:23:56PM +0800, Shi Lei wrote: >> This patch introduces virNetlinkNewLink helper which wraps the common >> libnl/netlink code to create a new link. >> The helper simplifies virNetDevBridgeCreate and virNetDevMacVLanCreate >> by

Re: [libvirt] [PATCH] add nodeset='all' and default for interleave mode

2018-09-11 Thread Michal Privoznik
On 09/11/2018 04:28 PM, Peng Hao wrote: > For interleave mode,sometimes we want to allocate mmeory regularly > in all nodes on the host. But different hosts has different node number. > So we add nodeset='all' for interleave mode and if nodeset=NULL default > nodeset is 'all' for interleave mode. >

Re: [libvirt] [PATCHv4 1/2] util: netlink: Introduce virNetlinkNewLink helper to simplify virNetDev*Create

2018-09-11 Thread Erik Skultety
On Tue, Sep 11, 2018 at 04:23:56PM +0800, Shi Lei wrote: > This patch introduces virNetlinkNewLink helper which wraps the common > libnl/netlink code to create a new link. > The helper simplifies virNetDevBridgeCreate and virNetDevMacVLanCreate > by using virNetlinkNewLink. > > Signed-off-by: Shi L

[libvirt] [PATCH v2] qemu: check for vhostusers bandwidth

2018-09-11 Thread Roland Schulz
Vhostuser doesn't support bandwidth and due to backwards compatibility it was decided to just warn users instead of erroring out https://bugzilla.redhat.com/show_bug.cgi?id=1524230 Signed-off-by: Roland Schulz --- src/qemu/qemu_command.c | 9 + 1 file changed, 9 insertions(+) diff --gi

Re: [libvirt] [PATCH 5/5] tests: add qemuxml2argv memfd-memory-numa test

2018-09-11 Thread Marc-André Lureau
Hi On Tue, Sep 11, 2018 at 2:57 AM, John Ferlan wrote: > > > On 09/07/2018 07:32 AM, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> >> Check anonymous memory is backed by memfd if qemu is capable. >> >> Signed-off-by: Marc-André Lureau >> --- >> tests/qemuxml2argvdata/memfd-m

Re: [libvirt] [PATCH 3/5] qemu: prefer memfd for anonymous memory

2018-09-11 Thread Michal Privoznik
On 09/11/2018 09:53 AM, Marc-André Lureau wrote: > Hi > > On Tue, Sep 11, 2018 at 2:46 AM, John Ferlan wrote: >> >> On 09/07/2018 07:32 AM, marcandre.lur...@redhat.com wrote: >>> From: Marc-André Lureau >>> >> >> Would be nice to have a few more words here. If you provide them I can >> add them.

Re: [libvirt] [PATCH] docs: Fix missing timestamp inside backingStore.

2018-09-11 Thread Erik Skultety
On Mon, Sep 10, 2018 at 11:57:13PM -0300, Julio Faracco wrote: > All backingStore XML definitions have a XML tag with the timestamp. This > timestamp is not defined insinde RNG volume storage schema and it is > causing some problems to validate and check volume XMLs. > > Resolves: https://bugzilla.

Re: [libvirt] [PATCH 3/5] qemu: prefer memfd for anonymous memory

2018-09-11 Thread Michal Privoznik
On 09/11/2018 12:46 AM, John Ferlan wrote: > > On 09/07/2018 07:32 AM, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> > > Would be nice to have a few more words here. If you provide them I can > add them... The if statement is difficult to read unless you know what > each field

Re: [libvirt] [PATCH v5 03/13] conf: Introduce a new PCI address extension flag

2018-09-11 Thread Andrea Bolognani
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote: [...] > @@ -164,6 +164,7 @@ struct _virDomainDeviceInfo { > * assignment, never saved and never reported. > */ > int pciConnectFlags; /* enum virDomainPCIConnectFlags */ > +int pciAddressExtFlags; /* enum virDomainPCIAddress

Re: [libvirt] [PATCH 4/5] conf: drop hugepage non-anoymous memory requirement

2018-09-11 Thread Marc-André Lureau
Hi On Tue, Sep 11, 2018 at 2:56 AM, John Ferlan wrote: > > "non-anonymous" > > On 09/07/2018 07:32 AM, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> >> memfd is able to allocate hugepage anonymous memory. >> >> Signed-off-by: Marc-André Lureau >> --- >> src/conf/domain_conf.

[libvirt] [PATCHv4 2/2] util: netlink: Add wrapper macros to make virNetlinkNewLink more readable

2018-09-11 Thread Shi Lei
This patch adds wrapper macros around nla_nest_[start|end] and nla_put which can make virNetlinkNewLink more readable. Signed-off-by: Shi Lei --- src/util/virnetlink.c | 35 +++ src/util/virnetlink.h | 23 +++ 2 files changed, 34 insertions(+),

[libvirt] [PATCHv4 0/2] Add virNetlinkNewLink helper for simplifying virNetDev*Create

2018-09-11 Thread Shi Lei
v3 here: https://www.redhat.com/archives/libvir-list/2018-September/msg00233.html Diff from v3: This series make changes according to the comments from Erik and John. Shi Lei (2): util: netlink: Introduce virNetlinkNewLink helper to simplify virNetDev*Create util: netlink: Add wrapper mac

[libvirt] [PATCHv4 1/2] util: netlink: Introduce virNetlinkNewLink helper to simplify virNetDev*Create

2018-09-11 Thread Shi Lei
This patch introduces virNetlinkNewLink helper which wraps the common libnl/netlink code to create a new link. The helper simplifies virNetDevBridgeCreate and virNetDevMacVLanCreate by using virNetlinkNewLink. Signed-off-by: Shi Lei --- src/libvirt_private.syms| 1 + src/util/virnetdevbrid

Re: [libvirt] [PATCH V2 2/2] news: Announce dropping support for Xen 4.4 and 4.5

2018-09-11 Thread Andrea Bolognani
On Tue, 2018-09-11 at 09:48 +0200, Michal Privoznik wrote: > On 09/11/2018 01:13 AM, Jim Fehlig wrote: > Alternatively, we can have new section: > > > > Like we did for 4.5.0 and 4.3.0 releases. Yeah, please do that. "Dropped support for X" is not really something that you can file under "New f

Re: [libvirt] [PATCH 3/5] qemu: prefer memfd for anonymous memory

2018-09-11 Thread Marc-André Lureau
Hi On Tue, Sep 11, 2018 at 2:46 AM, John Ferlan wrote: > > On 09/07/2018 07:32 AM, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> > > Would be nice to have a few more words here. If you provide them I can > add them... The if statement is difficult to read unless you know what

Re: [libvirt] [PATCH V2 1/2] libxl: drop support for Xen < 4.6

2018-09-11 Thread Michal Privoznik
On 09/11/2018 01:13 AM, Jim Fehlig wrote: > Currently the libxl driver claims support for Xen >= 4.4, but > Xen 4.4 and 4.5 are no longer supported upstream. Let's increase > the minimum supported version to 4.6. > > Since Xen 4.6 contains a pkgconfig file, drop the now unused code > that falls ba

  1   2   >