Re: [libvirt] [PATCH] qemu: Forbid without

2017-02-06 Thread Jiri Denemark
On Mon, Feb 06, 2017 at 18:29:59 +0100, Andrea Bolognani wrote: > In order for memory locking to work, the hard limit on memory > locking (and usage) has to be set appropriately by the user. > > The documentation mentions the requirement already: with this > patch, it's going to be enforced by

Re: [libvirt] [resend v2 1/7] Resctrl: Add some utils functions

2017-02-06 Thread Eli Qiao
-- Eli Qiao Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Tuesday, 7 February 2017 at 12:11 AM, Daniel P. Berrange wrote: > On Mon, Feb 06, 2017 at 10:23:36AM +0800, Eli Qiao wrote: > > This patch adds some utils struct and functions to expose resctrl > > information. > > > >

Re: [libvirt] [resend v2 0/7] Support cache tune in libvirt

2017-02-06 Thread Eli Qiao
-- Eli Qiao Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Tuesday, 7 February 2017 at 3:03 AM, Marcelo Tosatti wrote: > On Mon, Feb 06, 2017 at 01:33:09PM -0200, Marcelo Tosatti wrote: > > On Mon, Feb 06, 2017 at 10:23:35AM +0800, Eli Qiao wrote: > > > This series patches are

Re: [libvirt] [resend v2 2/7] Resctrl: expose cache information to capabilities

2017-02-06 Thread Eli Qiao
-- Eli Qiao Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Tuesday, 7 February 2017 at 12:02 AM, Daniel P. Berrange wrote: > On Mon, Feb 06, 2017 at 10:23:37AM +0800, Eli Qiao wrote: > > This patch expose cache information to host's capabilites xml. > > > > For l3 cache

Re: [libvirt] [resend v2 4/7] Resctrl: Add private interface to set cachebanks

2017-02-06 Thread Eli Qiao
-- Eli Qiao Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Tuesday, 7 February 2017 at 12:17 AM, Daniel P. Berrange wrote: > On Mon, Feb 06, 2017 at 10:23:39AM +0800, Eli Qiao wrote: > > virResCtrlSetCacheBanks: Set cache banks of a libvirt domain. It will > > create new resource

[libvirt] [PATCH] libxl: fix disk detach when not specified

2017-02-06 Thread Jim Fehlig
When a user does not explicitly set a in the disk config, libvirt defers selection of a default to libxl. This approach works fine when starting a domain with such configuration or attaching a disk to a running domain. But when detaching such a disk, libxl will fail with "unrecognized disk

Re: [libvirt] [PATCH 5/5] xenFoxenFormatXLDisk: Don't leak @target

2017-02-06 Thread Jim Fehlig
Michal Privoznik wrote: > ==11260== 1,006 bytes in 1 blocks are definitely lost in loss record 106 of > 111 > ==11260==at 0x4C2AE5F: malloc (vg_replace_malloc.c:297) > ==11260==by 0x4C2BDFF: realloc (vg_replace_malloc.c:693) > ==11260==by 0x4EA430B: virReallocN (viralloc.c:245) >

Re: [libvirt] [resend v2 0/7] Support cache tune in libvirt

2017-02-06 Thread Marcelo Tosatti
On Mon, Feb 06, 2017 at 01:33:09PM -0200, Marcelo Tosatti wrote: > On Mon, Feb 06, 2017 at 10:23:35AM +0800, Eli Qiao wrote: > > This series patches are for supportting CAT featues, which also > > called cache tune in libvirt. > > > > First to expose cache information which could be tuned in

Re: [libvirt] [PATCH] docs: mention bhyve SATA address changes in news.xml

2017-02-06 Thread Roman Bogorodskiy
Andrea Bolognani wrote: > On Sun, 2017-02-05 at 16:52 +0400, Roman Bogorodskiy wrote: > [...] > > +   > > + > > +  bhyve: change address allocation schema for SATA disks > > + > > The indentation is all wrong, here and below. Please indent > using only spaces and make sure

[libvirt] [PATCH v2] docs: mention bhyve SATA address changes in news.xml

2017-02-06 Thread Roman Bogorodskiy
--- docs/news.xml | 19 +++ 1 file changed, 19 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index f408293a1..7990cc6d4 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -56,6 +56,25 @@ a fabric name has been removed by making it optional.

[libvirt] [PATCH] qemu: Forbid without

2017-02-06 Thread Andrea Bolognani
In order for memory locking to work, the hard limit on memory locking (and usage) has to be set appropriately by the user. The documentation mentions the requirement already: with this patch, it's going to be enforced by runtime checks as well. Note that this will make existing guests that don't

Re: [libvirt] [RFC PATCH 00/16] Introduce vGPU mdev framework to libvirt

2017-02-06 Thread Alex Williamson
On Mon, 6 Feb 2017 16:44:37 + "Daniel P. Berrange" wrote: > On Mon, Feb 06, 2017 at 01:19:42PM +0100, Erik Skultety wrote: > > Finally. It's here. This is the initial suggestion on how libvirt might > > interract with the mdev framework, currently only focussing on the

Re: [libvirt] [PATCH] docs: mention bhyve SATA address changes in news.xml

2017-02-06 Thread Andrea Bolognani
On Sun, 2017-02-05 at 16:52 +0400, Roman Bogorodskiy wrote: [...] > +   > + > +  bhyve: change address allocation schema for SATA disks > + The indentation is all wrong, here and below. Please indent using only spaces and make sure the result matches existing entries; be

Re: [libvirt] [RFC PATCH 00/16] Introduce vGPU mdev framework to libvirt

2017-02-06 Thread Daniel P. Berrange
On Mon, Feb 06, 2017 at 01:19:42PM +0100, Erik Skultety wrote: > Finally. It's here. This is the initial suggestion on how libvirt might > interract with the mdev framework, currently only focussing on the non-managed > devices, i.e. those pre-created by the user, since that will be revisited once

Re: [libvirt] [RFC PATCH 00/16] Introduce vGPU mdev framework to libvirt

2017-02-06 Thread Alex Williamson
On Mon, 6 Feb 2017 13:19:42 +0100 Erik Skultety wrote: > Finally. It's here. This is the initial suggestion on how libvirt might > interract with the mdev framework, currently only focussing on the non-managed > devices, i.e. those pre-created by the user, since that will

Re: [libvirt] [PATCH 01/16] util: Introduce new module virmdev

2017-02-06 Thread Michal Privoznik
On 06.02.2017 13:19, Erik Skultety wrote: > Beside creation, disposal, getter, and setter methods the module exports > methods to work with lists of mediated devices. > > Signed-off-by: Erik Skultety > --- > po/POTFILES.in | 1 + > src/Makefile.am | 1

Re: [libvirt] [PATCH 02/16] conf: Introduce new hostdev device type mdev

2017-02-06 Thread Michal Privoznik
On 06.02.2017 13:19, Erik Skultety wrote: > A mediated device will be identified by the host PCI address of the > parent physical device which is backing the given mediated device, and a > UUID of the user pre-created mediated device. The data necessary to > identify a mediated device can be

Re: [libvirt] [PATCH 03/16] docs: Update RNG schema to reflect the new hostdev type mdev

2017-02-06 Thread Michal Privoznik
On 06.02.2017 13:19, Erik Skultety wrote: > To keep the domain XML as much platform agnostic as possible, do not > expose an element/attribute which would contain path directly to the > syfs filesystem which the mediated devices are build upon. Instead, > identify each mediated device by the

Re: [libvirt] [PATCH 08/16] conf: Enable cold-plug of a mediated device

2017-02-06 Thread Michal Privoznik
On 06.02.2017 13:19, Erik Skultety wrote: > This merely introduces virDomainHostdevMatchSubsysMediatedDev method that > is supposed to check whether device being cold-plugged does not already > exist in the domain configuration. > > Signed-off-by: Erik Skultety > --- >

Re: [libvirt] [RFC PATCH 00/16] Introduce vGPU mdev framework to libvirt

2017-02-06 Thread Michal Privoznik
On 06.02.2017 13:19, Erik Skultety wrote: > Finally. It's here. This is the initial suggestion on how libvirt might > interract with the mdev framework, currently only focussing on the non-managed > devices, i.e. those pre-created by the user, since that will be revisited once > we all settled on

[libvirt] spice-gl bug: Failed to initialize EGL render node for SPICE GL

2017-02-06 Thread Paul Kek
Hello, I am having issues with getting spice-gl to work properly with libvirt. There is a bugzilla report which describes the issue but until now there is still no solution (The patch didn't work on my system.) As I also mentioned there, I tried adding the `renderD128` device to

Re: [libvirt] [resend v2 4/7] Resctrl: Add private interface to set cachebanks

2017-02-06 Thread Daniel P. Berrange
On Mon, Feb 06, 2017 at 10:23:39AM +0800, Eli Qiao wrote: > virResCtrlSetCacheBanks: Set cache banks of a libvirt domain. It will > create new resource domain under `/sys/fs/resctrl` and fill the > schemata according the cache banks configration. > > virResCtrlUpdate: Update the schemata after

Re: [libvirt] [resend v2 1/7] Resctrl: Add some utils functions

2017-02-06 Thread Daniel P. Berrange
On Mon, Feb 06, 2017 at 10:23:36AM +0800, Eli Qiao wrote: > This patch adds some utils struct and functions to expose resctrl > information. > > virResCtrlAvailable: If resctrl interface exist on host > virResCtrlGet: get specify type resource contral information > virResCtrlInit: initialize

Re: [libvirt] [resend v2 2/7] Resctrl: expose cache information to capabilities

2017-02-06 Thread Daniel P. Berrange
On Mon, Feb 06, 2017 at 10:23:37AM +0800, Eli Qiao wrote: > This patch expose cache information to host's capabilites xml. > > For l3 cache allocation > > > > > > > > > > For l3 cache allocation supported cdp(seperate data/code): > > > > > > > >

Re: [libvirt] [resend v2 0/7] Support cache tune in libvirt

2017-02-06 Thread Marcelo Tosatti
On Mon, Feb 06, 2017 at 10:23:35AM +0800, Eli Qiao wrote: > This series patches are for supportting CAT featues, which also > called cache tune in libvirt. > > First to expose cache information which could be tuned in capabilites XML. > Then add new domain xml element support to add cacahe bank

Re: [libvirt] Issue with libvirtd

2017-02-06 Thread Michal Privoznik
On 06.02.2017 14:39, Boris Fiuczynski wrote: > On 01/10/2017 10:19 AM, Michal Privoznik wrote: >> On 01/10/2017 07:48 AM, Faysal Ali wrote: >>> Hi Michal, >> >> [It is usually good idea to keep the list CCed - it may help others >> finding a solution to their problems] >> >>> >>> Well I have

Re: [libvirt] Issue with libvirtd

2017-02-06 Thread Boris Fiuczynski
On 01/10/2017 10:19 AM, Michal Privoznik wrote: On 01/10/2017 07:48 AM, Faysal Ali wrote: Hi Michal, [It is usually good idea to keep the list CCed - it may help others finding a solution to their problems] Well I have created my little python/libivrt app to manage my virtual machines. I

Re: [libvirt] [PATCH v2 0/4] Support setting MTU in libvirt networks

2017-02-06 Thread Michal Privoznik
On 03.02.2017 18:35, Laine Stump wrote: > Similar to V1, but changing the XML to match Michal's patches, and > adding a patch that plumbs network MTU back through to the qemu > host_mtu option. > > Laine Stump (4): > util: add MTU arg to virNetDevTapCreateInBridgePort() > conf: support

Re: [libvirt] [PATCH v2 4/4] qemu: propagate bridge MTU into qemu "host_mtu" option

2017-02-06 Thread Michal Privoznik
On 03.02.2017 18:35, Laine Stump wrote: > libvirt was able to set the host_mtu option when an MTU was explicitly > given in the interface config (with ), set the MTU of a > libvirt network in the network config (with the same named > subelement), and would automatically set the MTU of any tap

Re: [libvirt] [Block Replication] Question about supporting COLO in libvirt

2017-02-06 Thread Daniel P. Berrange
On Mon, Feb 06, 2017 at 08:34:28PM +0800, Hailiang Zhang wrote: > Hi, > I'm trying to implement supporting COLO in libvirt, > But i found an annoying problem that libvirt does not > support the command line option argument syntax we used > for block replication in QEMU. > > That is libvirt does

[libvirt] [Block Replication] Question about supporting COLO in libvirt

2017-02-06 Thread Hailiang Zhang
Hi, I'm trying to implement supporting COLO in libvirt, But i found an annoying problem that libvirt does not support the command line option argument syntax we used for block replication in QEMU. That is libvirt does not support the bellow syntax for block: -drive

[libvirt] [PATCH 05/16] Adjust the formatter to reflect the new hostdev type mdev

2017-02-06 Thread Erik Skultety
Signed-off-by: Erik Skultety --- src/conf/domain_conf.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f7bdd7a..9663350 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -21140,6

[libvirt] [PATCH 04/16] conf: Adjust the domain parser to work with mdevs

2017-02-06 Thread Erik Skultety
As for the parser, the uuid element is optional and a UUID will be generated automatically if missing unless the device is unmanaged (default) in which case the element is mandatory, otherwise libvirt wouldn't have means to identify the device uniquely. Signed-off-by: Erik Skultety

[libvirt] [PATCH 02/16] conf: Introduce new hostdev device type mdev

2017-02-06 Thread Erik Skultety
A mediated device will be identified by the host PCI address of the parent physical device which is backing the given mediated device, and a UUID of the user pre-created mediated device. The data necessary to identify a mediated device can be easily extended in the future, once we need to enable

[libvirt] [PATCH 16/16] docs: Document the new hostdev device type 'mdev'

2017-02-06 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/formatdomain.html.in | 40 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 77d8e71..10cef31 100644 ---

[libvirt] [PATCH 14/16] qemu: Format mdevs on the qemu command line

2017-02-06 Thread Erik Skultety
Format the mediated devices on the qemu command line as -device vfio-pci,sysfsdev='/path/to/device/in/syfs'. Signed-off-by: Erik Skultety --- src/qemu/qemu_command.c | 49 + src/qemu/qemu_command.h | 5 + 2 files changed,

[libvirt] [PATCH 08/16] conf: Enable cold-plug of a mediated device

2017-02-06 Thread Erik Skultety
This merely introduces virDomainHostdevMatchSubsysMediatedDev method that is supposed to check whether device being cold-plugged does not already exist in the domain configuration. Signed-off-by: Erik Skultety --- src/conf/domain_conf.c | 19 +++ 1 file

[libvirt] [RFC PATCH 00/16] Introduce vGPU mdev framework to libvirt

2017-02-06 Thread Erik Skultety
Finally. It's here. This is the initial suggestion on how libvirt might interract with the mdev framework, currently only focussing on the non-managed devices, i.e. those pre-created by the user, since that will be revisited once we all settled on how the XML should look like, given we might not

[libvirt] [PATCH 10/16] hostdev: Maintain a driver list of active mediated devices

2017-02-06 Thread Erik Skultety
Keep track of the assigned mediated devices the same way we do it for the rest of hostdevs. Signed-off-by: Erik Skultety --- src/libvirt_private.syms | 1 + src/qemu/qemu_hostdev.c | 22 + src/qemu/qemu_hostdev.h | 4 ++ src/util/virhostdev.c| 126

[libvirt] [PATCH 06/16] security: dac: Enable labeling of vfio mediated devices

2017-02-06 Thread Erik Skultety
Label the VFIO IOMMU devices under /dev/vfio/ referenced by the symlinks in the sysfs (e.g. /sys/class/mdev_bus//iommu_group) which what qemu actually gets formatted on the command line. Signed-off-by: Erik Skultety --- src/security/security_dac.c | 58

[libvirt] [PATCH 15/16] test: Add some test cases for our test suite regarding the mdevs

2017-02-06 Thread Erik Skultety
For now, focus only on unmanaged devices, thus also testing whether the uuid element is present or not, since in case of unmanaged mediated devices it must be present. Signed-off-by: Erik Skultety --- ...qemuxml2argv-hostdev-mdev-unmanaged-no-uuid.xml | 37

[libvirt] [PATCH 13/16] qemu: namespace: Hook up the discovery of mdevs into the namespace code

2017-02-06 Thread Erik Skultety
Again, as for all the other hostdev device types, make sure that the /dev/vfio/ device will be added to the qemu namespace. Signed-off-by: Erik Skultety --- src/qemu/qemu_domain.c | 12 1 file changed, 12 insertions(+) diff --git a/src/qemu/qemu_domain.c

[libvirt] [PATCH 09/16] qemu: Assign PCI addresses for mediated devices as well

2017-02-06 Thread Erik Skultety
So far, the official support is for x86_64 arch guests so unless a different device API than vfio-pci is available let's assume PCI address assignment. Once a different device API is introduced, we'll actually have to start checking for the device API in the sysfs in order to assign a correct type

[libvirt] [PATCH 12/16] qemu: cgroup: Adjust cgroups' logic to allow mediated devices

2017-02-06 Thread Erik Skultety
As goes for all the other hostdev device types, grant the qemu process access to /dev/vfio/. Signed-off-by: Erik Skultety --- src/qemu/qemu_cgroup.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/src/qemu/qemu_cgroup.c

[libvirt] [PATCH 07/16] security: selinux: Enable labeling of vfio mediated devices

2017-02-06 Thread Erik Skultety
Label the VFIO IOMMU devices under /dev/vfio/ referenced by the symlinks in the sysfs (e.g. /sys/class/mdev_bus//iommu_group) which what qemu actually gets formatted on the command line. Signed-off-by: Erik Skultety --- src/security/security_selinux.c | 57

[libvirt] [PATCH 01/16] util: Introduce new module virmdev

2017-02-06 Thread Erik Skultety
Beside creation, disposal, getter, and setter methods the module exports methods to work with lists of mediated devices. Signed-off-by: Erik Skultety --- po/POTFILES.in | 1 + src/Makefile.am | 1 + src/libvirt_private.syms | 17 +++

[libvirt] [PATCH 03/16] docs: Update RNG schema to reflect the new hostdev type mdev

2017-02-06 Thread Erik Skultety
To keep the domain XML as much platform agnostic as possible, do not expose an element/attribute which would contain path directly to the syfs filesystem which the mediated devices are build upon. Instead, identify each mediated device by the parent physical device and a UUID which is an optional

[libvirt] [PATCH 11/16] hostdev: Introduce a reattach method for mediated devices

2017-02-06 Thread Erik Skultety
The name "reattach" does not really reflect the truth behind mediated devices, since these are purely software devices that do not need to be plugged back into the host in any way, however this patch pushes for naming consistency for methods where the logic behind the underlying operation stays

Re: [libvirt] [PATCH] char: drop data written to a disconnected pty

2017-02-06 Thread Paolo Bonzini
On 31/01/2017 14:45, Ed Swierk wrote: > When a serial port writes data to a pty that's disconnected, drop the > data and return the length dropped. This avoids triggering pointless > retries in callers like the 16550A serial_xmit(), and causes > qemu_chr_fe_write() to write all data to the log

Re: [libvirt] [PATCH v2 3/3] add per cpu stats to all domain stats

2017-02-06 Thread Nikolay Shirokovskiy
On 03.02.2017 19:09, Peter Krempa wrote: > On Thu, Feb 02, 2017 at 14:09:33 +0300, Nikolay Shirokovskiy wrote: >> Add per host cpu info provided in virDomainGetCPUStats to the >> stats provided in virConnectGetAllDomainStats. Namely: >> >> "cpu.count" - number of host cpus >> "cpu..time" - total

[libvirt] [PATCH 2/5] virusbmock: Link with libvirt_utils

2017-02-06 Thread Michal Privoznik
We are using couple of functions from there (e.g. virStrdup) and rely that the binary linking us has the libvirt_utils linked already. Well, this makes valgrind sad. Signed-off-by: Michal Privoznik --- tests/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1

[libvirt] [PATCH 3/5] testUSBList: don't leak @dev

2017-02-06 Thread Michal Privoznik
==22187== 77 (56 direct, 21 indirect) bytes in 1 blocks are definitely lost in loss record 23 of 37 ==22187==at 0x4C2BC75: calloc (vg_replace_malloc.c:624) ==22187==by 0x4E75685: virAlloc (viralloc.c:144) ==22187==by 0x4F0613A: virUSBDeviceNew (virusb.c:332) ==22187==by 0x4F05BA2:

[libvirt] [PATCH 4/5] qemuMonitorCPUModelInfoFree: Don't leak model_info->props

2017-02-06 Thread Michal Privoznik
==11846== 240 bytes in 1 blocks are definitely lost in loss record 81 of 107 ==11846==at 0x4C2BC75: calloc (vg_replace_malloc.c:624) ==11846==by 0x18C74242: virAllocN (viralloc.c:191) ==11846==by 0x4A05E8: qemuMonitorCPUModelInfoCopy (qemu_monitor.c:3677) ==11846==by 0x446E3C:

[libvirt] [PATCH 0/5] Fix couple of memleaks

2017-02-06 Thread Michal Privoznik
*** BLURB HERE *** Michal Privoznik (5): tests: Trace re-executing processes with valgrind virusbmock: Link with libvirt_utils testUSBList: don't leak @dev qemuMonitorCPUModelInfoFree: Don't leak model_info->props xenFoxenFormatXLDisk: Don't leak @target src/qemu/qemu_monitor.c | 1 +

[libvirt] [PATCH 5/5] xenFoxenFormatXLDisk: Don't leak @target

2017-02-06 Thread Michal Privoznik
==11260== 1,006 bytes in 1 blocks are definitely lost in loss record 106 of 111 ==11260==at 0x4C2AE5F: malloc (vg_replace_malloc.c:297) ==11260==by 0x4C2BDFF: realloc (vg_replace_malloc.c:693) ==11260==by 0x4EA430B: virReallocN (viralloc.c:245) ==11260==by 0x4EA7C52: virBufferGrow

[libvirt] [PATCH 1/5] tests: Trace re-executing processes with valgrind

2017-02-06 Thread Michal Privoznik
A lot of our tests re-execute themeselves after loading their mock library. This, however, makes valgrind sad because currently we do not tell it to trace the process after exec(). Signed-off-by: Michal Privoznik --- tests/Makefile.am | 3 ++- 1 file changed, 2