Re: [libvirt] [RFC 2/3] xml: update xml parsing and formating about NVDIMM memory

2018-11-17 Thread Zhong, Luyao
On 11/8/2018 5:15 AM, John Ferlan wrote: NB: I had to remove "zh...@redhat.com" from the CC line since it failed to send. On 10/16/18 10:21 PM, Luyao Zhong wrote: Four new parameters were introduced into libvirt xml, including 'align', 'pmem', 'persistence' and 'unarmed', which are

Re: [libvirt] [RFC 3/3] qemu: update qemu command-line generating for NVDIMM memory

2018-11-17 Thread Zhong, Luyao
On 11/8/2018 5:17 AM, John Ferlan wrote: On 10/16/18 10:21 PM, Luyao Zhong wrote: According to the result parsing from xml, add corresponding properties into QEMU command line, including 'align', 'pmem', 'persistence' and 'nvdimm-persistence'. And add testcases related to these properties.

Re: [libvirt] [RFC 2/3] xml: update xml parsing and formating about NVDIMM memory

2018-11-17 Thread Zhong, Luyao
On 11/8/2018 5:15 AM, John Ferlan wrote: NB: I had to remove "zh...@redhat.com" from the CC line since it failed to send. On 10/16/18 10:21 PM, Luyao Zhong wrote: Four new parameters were introduced into libvirt xml, including 'align', 'pmem', 'persistence' and 'unarmed', which are

Re: [libvirt] [PATCH 2/3] conf: Add several cleanup paths

2018-11-17 Thread Radoslaw Biernacki
This patch breaks the error return value for: virDomainControllerDefFormat() virDomainSoundDefFormat() virDomainMemballoonDefFormat() Patch adds the "ret" variable but in error exit it use "return 0" statement. Actually this breaks compilation. Was this code compiled ? conf/domain_conf.c: In

[libvirt] [PATCH v2 3/4] util: Fix for NULL dereference

2018-11-17 Thread Radoslaw Biernacki
The device xml parser code does not set "model" while parsing virDomainDefPtr def->nets[i]->model can be NULL while latter compares strings with STREQ instead of STREQ_NULLABLE. Fixes: ac47e4a6225 (qemu: replace "def->nets[i]" with "net" and "def->sounds[i]" with "sound") Fixes:

Re: [libvirt] [PATCH 1/4] util: fixing wrong assumption that PF has to have netdev assigned

2018-11-17 Thread Radoslaw Biernacki
On Thu, 15 Nov 2018 at 12:23, Michal Privoznik wrote: > On 11/10/2018 01:56 PM, Radoslaw Biernacki wrote: > > libvirt wrongly assumes that VF netdev has to have the > > netdev assigned to PF. There is no such requirement in SRIOV standard. > > This patch change the virNetDevSwitchdevFeature()

[libvirt] [PATCH v2 0/4] util: Fixing libvirt errors on cavium/thunder-nicvf

2018-11-17 Thread Radoslaw Biernacki
ThunderX is Cavium SoC. This platform contain SRIOV NIC. Unlike other commonly known network devices it does not have VF functionality duplicated in its PF. PF is purely management device (on HW level). This creates several problems with existing libvirt code as in many places libvirt assumes

[libvirt] [PATCH v2 4/4] util: Fixing invalid error checking from virPCIGetNetname()

2018-11-17 Thread Radoslaw Biernacki
linkdev is In/Out function parameter as second order reference pointer so requires first order dereference for checking NULLs which can be a result from virPCIGetNetName() Fixes: d6ee56d7237 (util: change virPCIGetNetName() to not return error if device has no net name) Signed-off-by: Radoslaw

Re: [libvirt] [PATCH 3/4] util: Fix for NULL dereference

2018-11-17 Thread Radoslaw Biernacki
On Thu, 15 Nov 2018 at 12:23, Michal Privoznik wrote: > On 11/10/2018 01:56 PM, Radoslaw Biernacki wrote: > > The device xml parser code does not set "model" while parsing > > > > > > function='0x2'/> > > > > > > virDomainDefPtr def->nets[i]->model can be NULL while latter compares

[libvirt] [PATCH v2 2/4] util: Code simplification

2018-11-17 Thread Radoslaw Biernacki
Removing redundant sections of the code Signed-off-by: Radoslaw Biernacki Reviewed-by: Michal Privoznik --- src/util/virnetdev.c | 40 +++- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index f1c2ba8c17..9318de406c

[libvirt] [PATCH v2 1/4] util: fixing wrong assumption that PF has to have netdev assigned

2018-11-17 Thread Radoslaw Biernacki
libvirt wrongly assumes that VF netdev has to have the netdev assigned to PF. There is no such requirement in SRIOV standard. This patch change the virNetDevSwitchdevFeature() function to deal with SRIOV devices which does not have netdev on PF. Also removes one comment about PF netdev assumption.