Re: [libvirt] Question about qemuDomainLogContextNew

2017-03-26 Thread Erik Skultety
On Mon, Mar 27, 2017 at 11:39:09AM +0800, Liu Feng wrote: > Hi, Dear all > I have a question, and need your help. > I want to output some log message to > "/var/log/libvirt/qemu/instance-xx" when guest kernel crashed, so I add > following the code: >

[libvirt] [PATCH] docs: make interface start mode element optional

2017-03-26 Thread Laine Stump
This brings the libvirt version of this RNG file in line with the same file in netcf (as soon as the corresponding patch there is ACKed and pushed). There's no reason to require it when defining an interface (the config option it corresponds to is optional), and it isn't even output in the status

[libvirt] Question about qemuDomainLogContextNew

2017-03-26 Thread Liu Feng
Hi, Dear all I have a question, and need your help. I want to output some log message to "/var/log/libvirt/qemu/instance-xx" when guest kernel crashed, so I add following the code: static int qemuProcessHandleGuestPanic(q

[libvirt] [PATCH] conf: don't ignore for macvtap interfaces

2017-03-26 Thread Laine Stump
The parser had been clearing out *all* suggested device names for type='direct' (aka macvtap) interfaces. All of the code implementing macvtap allows for a user-specified device name, so we should allow it. In the case that an interface name starts with "macvtap" or "macvlan" though, we do still cl

Re: [libvirt] Plan for next release

2017-03-26 Thread Laine Stump
On 03/24/2017 07:47 AM, Daniel Veillard wrote: > Hi all, > > if we want to release around the end of the month, I think > we need to enter freeze on Monday end of day (for me europe) > to try to get the release around the next week-end. > >I assume that work for everyone, if not please tel

[libvirt] [PATCH] conf: validate that PCI controller index is < 256

2017-03-26 Thread Laine Stump
This is the maximum for many reasons, for starters because index == bus number, and a controller's bus number is 8 bits. This incidentally resolves: https://bugzilla.redhat.com/1329090 --- src/conf/domain_conf.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/conf/dom

Re: [libvirt] [PATCH] storage: Better describe logical pool creation/definition parameters

2017-03-26 Thread Laine Stump
On 03/25/2017 08:18 AM, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1398087 > > Clean up the virsh man page description for --pool-create-as in order > to better describe how the various arguments are used when creating > (or defining) a logical pool. > > Also move the --prin

Re: [libvirt] [PATCH 1/2] daemon: Rework remoteClientFreeFunc cleanup loops into C macro

2017-03-26 Thread Laine Stump
On 03/25/2017 08:51 AM, John Ferlan wrote: > Rather than 'n' repetitive code segments, let's create a single macro > which will make the code easier to read. > > Signed-off-by: John Ferlan > --- > daemon/remote.c | 120 > +++- > 1 file changed

Re: [libvirt] [PATCH v4 14/14] docs: Document the new hostdev and address type 'mdev'

2017-03-26 Thread Laine Stump
On 03/22/2017 11:27 AM, Erik Skultety wrote: > Signed-off-by: Erik Skultety > --- > docs/formatdomain.html.in | 46 -- > 1 file changed, 40 insertions(+), 6 deletions(-) I always like to put the docs changes in the same patch that modifies the schema a

Re: [libvirt] [PATCH v4 10/14] qemu: cgroup: Adjust cgroups' logic to allow mediated devices

2017-03-26 Thread Laine Stump
On 03/22/2017 11:27 AM, Erik Skultety wrote: > 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_domain.c | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/src/qemu/qemu_do

Re: [libvirt] [PATCH v4 13/14] test: Add some test cases for our test suite regarding the mdevs

2017-03-26 Thread Laine Stump
On 03/22/2017 11:27 AM, Erik Skultety wrote: > For now, these only cover the unmanaged, i.e. user pre-created devices. > > Signed-off-by: Erik Skultety > --- > ...ml2argv-hostdev-mdev-invalid-target-address.xml | 33 ++ > ...muxml2argv-hostdev-mdev-src-address-invalid.xml | 35 ++

Re: [libvirt] [PATCH v4 11/14] qemu: Bump the memory locking limit for mdevs as well

2017-03-26 Thread Laine Stump
On 03/22/2017 11:27 AM, Erik Skultety wrote: > Since mdevs are just another type of VFIO devices, we should increase > the memory locking limit the same way we do for VFIO PCI devices. > > Signed-off-by: Erik Skultety > --- > src/qemu/qemu_domain.c | 9 + > 1 file changed, 5 insertions(+

Re: [libvirt] [PATCH v4 12/14] qemu: Format mdevs on qemu command line

2017-03-26 Thread Laine Stump
On 03/22/2017 11:27 AM, Erik Skultety wrote: > 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 | 45 + > src/qemu/qemu_comma

Re: [libvirt] [PATCH v4 09/14] hostdev: Maintain a driver list of active mediated devices

2017-03-26 Thread Laine Stump
(I'm unable to apply this patch to the head of master with "git am -3", and it won't show me the conflicts (it just fails saying "fatal: sha1 information is lacking or useless (src/libvirt_private.syms), error: could not build fake ancestor". Because of this, all further review is based purely on e

Re: [libvirt] [PATCH v4 08/14] qemu: Assign PCI addresses for mediated devices as well

2017-03-26 Thread Laine Stump
On 03/22/2017 11:27 AM, Erik Skultety wrote: > So far, the official support is for x86_64 arch guests so unless a > different device API than vfio-pci is available let's only turn on > support for PCI address assignment. Once a different device API is > introduced, we can enable another address typ

Re: [libvirt] [PATCH v4 07/14] conf: Enable cold-plug of a mediated device

2017-03-26 Thread Laine Stump
On 03/22/2017 11:27 AM, 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 > --- > src/conf/domain_conf.c

Re: [libvirt] [PATCH v4 06/14] security: Enable labeling of vfio mediated devices

2017-03-26 Thread Laine Stump
On 03/22/2017 11:27 AM, Erik Skultety wrote: > 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. The sentence above is confused (i.e. I don't understand it)

Re: [libvirt] [PATCH v4 05/14] conf: Introduce new hostdev device type mdev

2017-03-26 Thread Laine Stump
On 03/22/2017 11:27 AM, Erik Skultety wrote: > A mediated device will be identified by a UUID (with 'model' now being > a mandatory attribute to represent the mediated device API) of > the user pre-created mediated device. The data necessary to identify a > mediated device can be easily extended i

Re: [libvirt] [PATCH v4 04/14] util: Introduce new module virmdev

2017-03-26 Thread Laine Stump
On 03/22/2017 11:27 AM, 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 + > src/libvirt_p

Re: [libvirt] [PATCH v4 10/10] docs: Add news entry for Migration using TLS

2017-03-26 Thread Roman Bogorodskiy
John Ferlan wrote: > Signed-off-by: John Ferlan > --- > docs/news.xml | 8 > 1 file changed, 8 insertions(+) > > diff --git a/docs/news.xml b/docs/news.xml > index f1bfeda..bb8a83c 100644 > --- a/docs/news.xml > +++ b/docs/news.xml > @@ -51,6 +51,14 @@ >enhanced check may

Re: [libvirt] [PATCH 2/2] bhyve: add xhci tablet support

2017-03-26 Thread Roman Bogorodskiy
Michal Privoznik wrote: > On 03/20/2017 05:31 PM, Roman Bogorodskiy wrote: > > Along with video and VNC support, bhyve has introduced USB tablet > > support as an input device. This tablet is exposed to a guest > > as a device on an XHCI controller. > > > > At present, tablet is the only support

Re: [libvirt] [PATCH] domaincapstest: add bhyve caps test

2017-03-26 Thread Roman Bogorodskiy
Michal Privoznik wrote: > On 03/19/2017 07:05 AM, Roman Bogorodskiy wrote: > > * Extract filling bhyve capabilities from virBhyveDomainCapsBuild() > >into a new function virBhyveDomainCapsFill() to make testing > >easier by not having to mock firmware directory listing and > >hyperv

Re: [libvirt] [PATCH] domain_capabilities: Don't report machine type for bhyve

2017-03-26 Thread Roman Bogorodskiy
Michal Privoznik wrote: > On 03/26/2017 11:01 AM, Roman Bogorodskiy wrote: > > Michal Privoznik wrote: > > > >> On 03/22/2017 06:46 AM, Roman Bogorodskiy wrote: > >>> Michal Privoznik wrote: > >>> > For some drivers the domain's machine type makes no sense. They > just don't use i

[libvirt] [PATCH] schema: domaincaps: make machine element optional

2017-03-26 Thread Roman Bogorodskiy
Commit df769041c made the 'machine' element in domaincaps optional. Update the schema to reflect that. --- Pushed as trivial as per https://www.redhat.com/archives/libvir-list/2017-March/msg01239.html docs/schemas/domaincaps.rng | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff

Re: [libvirt] [PATCH] domain_capabilities: Don't report machine type for bhyve

2017-03-26 Thread Michal Privoznik
On 03/26/2017 11:01 AM, Roman Bogorodskiy wrote: > Michal Privoznik wrote: > >> On 03/22/2017 06:46 AM, Roman Bogorodskiy wrote: >>> Michal Privoznik wrote: >>> For some drivers the domain's machine type makes no sense. They just don't use it. A great example is bhyve driver. Therefo

Re: [libvirt] [PATCH] domain_capabilities: Don't report machine type for bhyve

2017-03-26 Thread Roman Bogorodskiy
Michal Privoznik wrote: > On 03/22/2017 06:46 AM, Roman Bogorodskiy wrote: > > Michal Privoznik wrote: > > > >> For some drivers the domain's machine type makes no sense. They > >> just don't use it. A great example is bhyve driver. Therefore it > >> makes very less sense to report machine in

[libvirt] [PATCH] qemu: fix build with clang

2017-03-26 Thread Roman Bogorodskiy
qemuMigrationResetTLS() does not initialize 'ret' by default, so when it jumps to 'cleanup' on error, the 'ret' variable will be uninitialized, which clang complains about. Set it to '-1' by default. --- Pushed under the build-breaker rule. src/qemu/qemu_migration.c | 2 +- 1 file changed, 1 ins

Re: [libvirt] [PATCH] Coverity fix for virNetDevIPCheckIPv6ForwardingCallback

2017-03-26 Thread Laine Stump
On 03/24/2017 08:10 AM, Peter Krempa wrote: > On Fri, Mar 24, 2017 at 13:04:07 +0100, Cédric Bosdonnat wrote: >> Add check for more than one RTA_OIF, even though this is rather >> unlikely and get rid of the buggy switch / break. >> --- >> src/util/virnetdevip.c | 10 ++ >> 1 file changed,

Re: [libvirt] [PATCH] util: fix build on non-Linux

2017-03-26 Thread Laine Stump
On 03/25/2017 12:29 AM, Roman Bogorodskiy wrote: > Fix typo in virNetDevPFGetVF() stub: > > ATTRUBUTE_UNUSED -> ATTRIBUTE_UNUSED. Sigh. Sorry about that. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] virpci: fix build on non-Linux

2017-03-26 Thread Roman Bogorodskiy
virPCIGetDeviceAddressFromSysfsLink() should return virPCIDeviceAddressPtr, so return NULL in the stub instead of "-1". --- Pushed under the build-breaker rule. src/util/virpci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virpci.c b/src/util/virpci.c index 546aeb

[libvirt] [PATCH 2/2] remote: Fix possible use-after-free when sending event message

2017-03-26 Thread John Ferlan
Based upon an idea and some research by Wang King and xinhua.Cao . Since we're assigning the 'client' to our callback event lookaside list, it's imperative that we grab a reference to the object; otherwise, when the object is unref'd during virNetServerProcessClients when it's determined that the

Re: [libvirt] [PATCH libvirt-glib] examples: make detail strings match event details

2017-03-26 Thread John Ferlan
On 03/18/2017 09:49 AM, Guido Günther wrote: > --- > examples/event-test.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > ACK - matches what libvirt source for examples/object-events/event-test.c has John -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.c

[libvirt] [PATCH] storage: Better describe logical pool creation/definition parameters

2017-03-26 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1398087 Clean up the virsh man page description for --pool-create-as in order to better describe how the various arguments are used when creating (or defining) a logical pool. Also move the --print-xml to the end of the qualifiers since it's not properl

Re: [libvirt] [PATCH libvirt-glib] examples: make detail strings match event details

2017-03-26 Thread Guido Günther
On Sat, Mar 25, 2017 at 09:17:23AM -0400, John Ferlan wrote: > > > On 03/18/2017 09:49 AM, Guido Günther wrote: > > --- > > examples/event-test.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > ACK - matches what libvirt source for > examples/object-events/event-test.c ha

[libvirt] [PATCH] network: better validation of devices in hostdev network pool

2017-03-26 Thread Laine Stump
This adds a few validations to the devices listed for a hostdev network: * devices must be listed by PCI address, not by netdev name * listing a device by PCI address is valid only for hostdev networks, not for other types of network (e.g. macvtap passthrough). * each device in a hostdev pool

[libvirt] [PATCH 1/2] daemon: Rework remoteClientFreeFunc cleanup loops into C macro

2017-03-26 Thread John Ferlan
Rather than 'n' repetitive code segments, let's create a single macro which will make the code easier to read. Signed-off-by: John Ferlan --- daemon/remote.c | 120 +++- 1 file changed, 31 insertions(+), 89 deletions(-) diff --git a/daemon/rem

[libvirt] [PATCH 0/2] Fix possible use-after-free when sending event message

2017-03-26 Thread John Ferlan
Rework patches/logic most recently posted here: https://www.redhat.com/archives/libvir-list/2017-March/msg00072.html John Ferlan (2): daemon: Rework remoteClientFreeFunc cleanup loops into C macro remote: Fix possible use-after-free when sending event message daemon/remote.c | 158 +