Re: [libvirt] [GSoC] Abstracting device address allocation

2016-06-12 Thread Tomasz Flendrich
Thank you for your input, I really appreciate it. My goal was to define a data structure with a minimal set of features that would make sense and could be further developed. > I know of a few problems with PCI address allocation, but abstracting the > data structure and functions used for alloc

Re: [libvirt] Question about virtio-pci in Aarch64

2016-06-12 Thread Cole Robinson
On 06/12/2016 10:29 AM, Kevin Zhao wrote: > Hi Cole && All, > Nice meeting you in the libvirt mail-list. Greetings from Linaro !!! > I am Kevin Zhao from Linaro and working for OpenStack on Aarch64. > Nowadays I find that the default "virtio" bus is "virtio-mmio" , not > "virtio-pci". Si

Re: [libvirt] [GSoC] Abstracting device address allocation

2016-06-12 Thread Laine Stump
On 06/08/2016 02:04 PM, Tomasz Flendrich wrote: Hello everyone, Let me introduce myself - I'm Tomasz Flendrich and I'm a Google Summer of Code student from University of Wrocław, Poland. My goal is to create a generic address allocator (for PCI, virtio, SCSI, etc.), because current handling of

[libvirt] [PATCH 1/6] extend usb controller model to support xen pvusb

2016-06-12 Thread Chunyan Liu
According to libxl implementation, it supports pvusb controller of version 1.1 and version 2.0, and it supports two types of backend, 'pvusb' (dom0 backend) and 'qusb' (qemu backend). To match libxl support, extend usb controller schema to support more models: pvusb1 (pvusb, version 1.1), pvusb2 (

[libvirt] [PATCH 3/6] libxl: support usb controller hotplug

2016-06-12 Thread Chunyan Liu
Support USB controller hot-plug and hot-unplug. #virsh attach-device dom usbctrl.xml #virsh detach-device dom usbctrl.xml usbctrl.xml example: Signed-off-by: Chunyan Liu --- src/libxl/libxl_driver.c | 144 +++ 1 file changed, 144 insertions(+) d

[libvirt] [PATCH 5/6] xenconfig: add conversion of usb controller config to and from xml

2016-06-12 Thread Chunyan Liu
Signed-off-by: Chunyan Liu --- src/xenconfig/xen_xl.c | 203 + 1 file changed, 203 insertions(+) diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index c11cd1b..36d352c 100644 --- a/src/xenconfig/xen_xl.c +++ b/src/xenconfig/xen_xl.c @@

[libvirt] [PATCH 0/6] libxl: add support of pvusb controller

2016-06-12 Thread Chunyan Liu
This patch series is to add pvusb controller support in libxl driver. It should be applied on previous pvusb device support patch series. Chunyan Liu (6): extend usb controller model to support xen pvusb libxl: support USB controllers in creation time libxl: support usb controller hotplug

[libvirt] [PATCH 6/6] xlconfigtest: add test for usb controller conversion

2016-06-12 Thread Chunyan Liu
Signed-off-by: Chunyan Liu --- tests/xlconfigdata/test-usbctrl.cfg | 13 + tests/xlconfigdata/test-usbctrl.xml | 32 tests/xlconfigtest.c| 1 + 3 files changed, 46 insertions(+) create mode 100644 tests/xlconfigdata/test-usbctrl.cfg

[libvirt] [PATCH 4/6] libxl: check available controller and port when hotplugging USB device

2016-06-12 Thread Chunyan Liu
When hotplug a USB device, check if there is available controller and port, if not, automatically create a USB controller of version 2.0 and 8 ports. Signed-off-by: Chunyan Liu --- src/libxl/libxl_driver.c | 32 1 file changed, 32 insertions(+) diff --git a/src/

[libvirt] [PATCH 2/6] libxl: support USB controllers in creation time

2016-06-12 Thread Chunyan Liu
To support USB Controller in xen guest domains, just add USB controller in domain config xml as following: Signed-off-by: Chunyan Liu --- src/libxl/libxl_conf.c | 94 ++ src/libxl/libxl_conf.h | 4 +++ 2 files changed, 98 insertions(+) diff --gi

Re: [libvirt] [PATCH v2 0/5] bhyve: virConnectDomainXMLFromNative

2016-06-12 Thread Roman Bogorodskiy
Fabian Freyer wrote: > Aaand I'm reposting this series again, in the hope that this time it will > consistently send to the mailing list. Again, very sorry for the noise. > > Differences to v1: > - use gnulib's reentrant getopt implementation. This is necessary for thread > safety. > -

Re: [libvirt] [PATCH v2 1/5] config-post.h: define __GNUC_PREREQ if not defined

2016-06-12 Thread Roman Bogorodskiy
Fabian Freyer wrote: > Several gnulib headers rely on feature.h being included by ctype.h to provide > __GNUC_PREREQ, but on systems without glibc, this is not provided. In these > cases __GNUC_PREREQ gets redefined to 0, which causes build errors from checks > in src/internal.h. > Therefore, de

Re: [libvirt] [PATCH v2 3/5] bhyve: implement virConnectDomainXMLFromNative

2016-06-12 Thread Roman Bogorodskiy
Fabian Freyer wrote: > First, remove escaped newlines and split up the string into an argv-list for > the bhyve and loader commands, respectively. This is done by iterating over > the > string splitting it by newlines, and then re-iterating over each line, > splitting it by spaces. > > Since t

Re: [libvirt] [PATCH v2 4/5] bhyve: implement bhyve argument parser

2016-06-12 Thread Roman Bogorodskiy
Fabian Freyer wrote: > A simpe getopt-based argument parser is added for the /usr/sbin/bhyve command, > loosely based on its argument parser, which reads the following from the bhyve > command line string: > > * vm name > * number of vcpus > * memory size > * the time offset (UTC or localtime).

[libvirt] [PATCH v2 4/5] bhyve: implement bhyve argument parser

2016-06-12 Thread Fabian Freyer
A simpe getopt-based argument parser is added for the /usr/sbin/bhyve command, loosely based on its argument parser, which reads the following from the bhyve command line string: * vm name * number of vcpus * memory size * the time offset (UTC or localtime). This includes a capability check to see

[libvirt] [PATCH v2 3/5] bhyve: implement virConnectDomainXMLFromNative

2016-06-12 Thread Fabian Freyer
First, remove escaped newlines and split up the string into an argv-list for the bhyve and loader commands, respectively. This is done by iterating over the string splitting it by newlines, and then re-iterating over each line, splitting it by spaces. Since this code reuses part of the code of qem

[libvirt] [PATCH v2 2/5] gnulib: add getopt module

2016-06-12 Thread Fabian Freyer
Unconditionally use gnulib's getopt module. This is needed by the bhyve driver to provide a reentrant interface for getopt. --- bootstrap.conf | 1 + m4/virt-driver-bhyve.m4 | 3 +++ 2 files changed, 4 insertions(+) diff --git a/bootstrap.conf b/bootstrap.conf index 0db6b62..edea8c3 1006

[libvirt] [PATCH v2 5/5] bhyve: implement argument parser for loader

2016-06-12 Thread Fabian Freyer
A simple getopt-based argument parser is added for the /usr/sbin/bhyveload command, loosely based on its argument parser. The boot disk is guessed by iterating over all disks and matching their sources. If any non-default arguments are found, def->os.bootloaderArgs is set accordingly, and the boot

[libvirt] [PATCH v2 1/5] config-post.h: define __GNUC_PREREQ if not defined

2016-06-12 Thread Fabian Freyer
Several gnulib headers rely on feature.h being included by ctype.h to provide __GNUC_PREREQ, but on systems without glibc, this is not provided. In these cases __GNUC_PREREQ gets redefined to 0, which causes build errors from checks in src/internal.h. Therefore, define __GNUC_PREREQ as early as pos

[libvirt] [PATCH v2 0/5] bhyve: virConnectDomainXMLFromNative

2016-06-12 Thread Fabian Freyer
Aaand I'm reposting this series again, in the hope that this time it will consistently send to the mailing list. Again, very sorry for the noise. Differences to v1: - use gnulib's reentrant getopt implementation. This is necessary for thread safety. - config-post.h: __GNUC_PREREQ is define

Re: [libvirt] [PATCH] apparmor: Don't scrub environment of virtlogd process

2016-06-12 Thread Guido Günther
Hi Jim, On Mon, Jun 06, 2016 at 10:22:14PM -0600, Jim Fehlig wrote: > On 06/05/2016 05:06 AM, Guido Günther wrote: > > otherwise we drop variables like XDG_RUNTIME_DIR with qemu:///session > > and libvirtd faild to find virtlogd's socket. > > --- > > examples/apparmor/usr.sbin.libvirtd | 1 + > >

Re: [libvirt] [ruby-libvirt] Don't make volume upload zero bytes

2016-06-12 Thread Guido Günther
On Fri, Jun 10, 2016 at 03:58:09PM -0400, Chris Lalancette wrote: > On Fri, Jun 10, 2016 at 11:10 AM, Guido Günther wrote: > > > The virStreamSourceFunc internal_sendall currently returns the first > > value passed in from the block, which according the ruby-libvirt docs > > should be zero: > > >

[libvirt] [ruby-libvirt 2/2] Add volume upload example

2016-06-12 Thread Guido Günther
--- examples/upload_volume.rb | 36 1 file changed, 36 insertions(+) create mode 100644 examples/upload_volume.rb diff --git a/examples/upload_volume.rb b/examples/upload_volume.rb new file mode 100644 index 000..a051d46 --- /dev/null +++ b/examples/uploa

[libvirt] [ruby-libvirt 1/2] Add .gitignore

2016-06-12 Thread Guido Günther
--- .gitignore | 6 ++ 1 file changed, 6 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..f033dcf --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +ext/libvirt/extconf.h +ext/libvirt/_libvirt.so +ext/libvirt/Makefile +ext/libv

[libvirt] [PATCH] libxl: fix vm lock overwritten bug

2016-06-12 Thread Wang Yufei
In libxl driver we do virObjectRef in libxlDomainObjBeginJob, If virCondWaitUntil failed, it goes to error, do virObjectUnref, There's a chance that someone undefine the vm at the same time, and refs unref to zero, vm is freed in libxlDomainObjBeginJob. But the vm outside function is not Null, we d

Re: [libvirt] [PATCH] virt-login-shell: mark as Linux only

2016-06-12 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: > Currently, virt-login-shell is not allowed to build on Windows. > Howerver, as it's designed around LXC, it does not make sense to > build it on anything but Linux, so make the check strickter and allow to ^

[libvirt] [PATCH] virt-login-shell: mark as Linux only

2016-06-12 Thread Roman Bogorodskiy
Currently, virt-login-shell is not allowed to build on Windows. Howerver, as it's designed around LXC, it does not make sense to build it on anything but Linux, so make the check strickter and allow to enable it on Linux only. --- m4/virt-login-shell.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2

[libvirt] [PATCH 4/4] bhyve: fix bhyvexml2arg test

2016-06-12 Thread Roman Bogorodskiy
Don't use duplicating target dev names. --- tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder.xml | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder1.xml | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-bhyveload-bootorder3.xml | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-bhy

[libvirt] [PATCH 3/4] bhyve: add missing virhost(cpu|mem).h headers

2016-06-12 Thread Roman Bogorodskiy
--- src/bhyve/bhyve_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 6d21c2e..4ed5702 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -51,6 +51,8 @@ #include "cpu/cpu.h" #include "viraccessapicheck.h"

[libvirt] [PATCH 2/4] hostcpu: fix build on FreeBSD

2016-06-12 Thread Roman Bogorodskiy
* Fix misspelt function name: s/virHostCPUGetStatsFreebsd/virHostCPUGetStatsFreeBSD/ * Mark the first argument to virHostCPUGetInfo with ATTRIBUTE_UNUSED as it's not actually used on non-Linux --- src/util/virhostcpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH 0/4] A series of FreeBSD fixes

2016-06-12 Thread Roman Bogorodskiy
This is a series of a few fixes to FreeBSD build in general and to the bhyve driver in general. Pushed that under the build breaker and trivial rule. However, for the first two fixes I'm not sure that's the best fix possible, so I'm open for feedback. Roman Bogorodskiy (4): nodeinfo: fix build

[libvirt] [PATCH 1/4] nodeinfo: fix build on non-Linux

2016-06-12 Thread Roman Bogorodskiy
SYSFS_SYSTEM_PATH is only defined for Linux, however it's used outside of #ifdef __linux__ code, e.g. as the first argument to nodeCapsInitNUMAFake(). But as this argument's value is used on Linux only, it's safe to define SYSFS_SYSTEM_PATH to "fake" to get things built on FreeBSD. --- src/nodein