Re: [libvirt] [BUG] EPOLL_CLOEXEC undeclared

2012-01-23 Thread Philipp Hahn
Hello Eric, On Thursday 19 January 2012 21:38:22 Eric Blake wrote: > That's an unusual mix, where the syscall exists (since 2.6.27) but libc > is too old to use the syscall. The original kernel was 2.6.26, but which later was updated to 2.6.32 for better support of newer hardware. > Then how ab

Re: [libvirt] [PATCH] xen: Don't crash when we fail to init caps

2012-01-23 Thread Daniel P. Berrange
On Sun, Jan 22, 2012 at 12:30:20PM +0100, Guido Günther wrote: > On Fri, Jan 20, 2012 at 05:01:48PM +, Daniel P. Berrange wrote: > > On Fri, Jan 20, 2012 at 05:57:34PM +0100, Guido Günther wrote: > > > by dereferencing a NULL pointer in the call to > > > virNodeSuspendGetTargetMask. > > > > >

Re: [libvirt] Allow custom metadata in domain configuration XML

2012-01-23 Thread Daniel P. Berrange
On Fri, Jan 20, 2012 at 02:55:27PM -0700, Eric Blake wrote: > On 01/20/2012 01:15 PM, Zeeshan Ali (Khattak) wrote: > > From 6895c107970ea6daf3d0e7f8be9a1a4e97b2278b Mon Sep 17 00:00:00 2001 > > From: "Zeeshan Ali (Khattak)" > > Date: Fri, 20 Jan 2012 21:50:35 +0200 > > Subject: [PATCH] Allow custo

Re: [libvirt] [PATCH 1/2] API: make declaration of _LAST enum values conditional

2012-01-23 Thread Daniel P. Berrange
On Fri, Jan 20, 2012 at 10:41:37PM +0100, Jiri Denemark wrote: > On Fri, Jan 20, 2012 at 14:06:26 -0700, Eric Blake wrote: > > Although this is a public API break, it only affects users that > > were compiling against *_LAST values, and can be trivially > > worked around without impacting compilati

Re: [libvirt] Allow custom metadata in domain configuration XML

2012-01-23 Thread Jiri Denemark
On Mon, Jan 23, 2012 at 10:33:18 +, Daniel P. Berrange wrote: > On Fri, Jan 20, 2012 at 02:55:27PM -0700, Eric Blake wrote: > > 2. we probably need an API to allow the user to change this XML on the > > fly for a running domain. Which means you ought to investigate whether > > you can merge yo

Re: [libvirt] [libvirt-glib] API to get/set custom metadata from/to domain config

2012-01-23 Thread Christophe Fergeau
On Fri, Jan 20, 2012 at 11:11:57PM +0200, Zeeshan Ali (Khattak) wrote: > From: "Zeeshan Ali (Khattak)" > > --- > libvirt-gconfig/libvirt-gconfig-domain.c | 115 > + > libvirt-gconfig/libvirt-gconfig-domain.h |8 ++ > libvirt-gconfig/libvirt-gconfig-helpers.c |

Re: [libvirt] [PATCH 1/4] QEMU guest agent support

2012-01-23 Thread Daniel P. Berrange
On Thu, Jan 19, 2012 at 03:18:00PM -0700, Eric Blake wrote: > On 01/17/2012 04:44 AM, Michal Privoznik wrote: > > There is now a standard QEMU guest agent that can be installed > > and given a virtio serial channel > > > > > > > > Do we really want to be documenting a path in the libv

Re: [libvirt] [PATCH 1/4] QEMU guest agent support

2012-01-23 Thread Daniel P. Berrange
On Fri, Jan 20, 2012 at 07:16:22PM +0100, Michal Privoznik wrote: > On 19.01.2012 23:18, Eric Blake wrote: > > On 01/17/2012 04:44 AM, Michal Privoznik wrote: > >> There is now a standard QEMU guest agent that can be installed > >> and given a virtio serial channel > >> > >> > >> [snip

Re: [libvirt] Allow custom metadata in domain configuration XML

2012-01-23 Thread Daniel P. Berrange
On Fri, Jan 20, 2012 at 02:55:27PM -0700, Eric Blake wrote: > On 01/20/2012 01:15 PM, Zeeshan Ali (Khattak) wrote: > > From 6895c107970ea6daf3d0e7f8be9a1a4e97b2278b Mon Sep 17 00:00:00 2001 > > From: "Zeeshan Ali (Khattak)" > > Date: Fri, 20 Jan 2012 21:50:35 +0200 > > Subject: [PATCH] Allow custo

Re: [libvirt] [libvirt-glib] API to get/set custom metadata from/to domain config

2012-01-23 Thread Daniel P. Berrange
On Fri, Jan 20, 2012 at 11:11:57PM +0200, Zeeshan Ali (Khattak) wrote: > From: "Zeeshan Ali (Khattak)" > > --- > libvirt-gconfig/libvirt-gconfig-domain.c | 115 > + > libvirt-gconfig/libvirt-gconfig-domain.h |8 ++ > libvirt-gconfig/libvirt-gconfig-helpers.c |

Re: [libvirt] [PATCH] xen: Don't crash when we fail to init caps

2012-01-23 Thread Guido Günther
On Mon, Jan 23, 2012 at 10:22:35AM +, Daniel P. Berrange wrote: > On Sun, Jan 22, 2012 at 12:30:20PM +0100, Guido Günther wrote: > > On Fri, Jan 20, 2012 at 05:01:48PM +, Daniel P. Berrange wrote: > > > On Fri, Jan 20, 2012 at 05:57:34PM +0100, Guido Günther wrote: > > > > by dereferencing

[libvirt] [PATCH 0/3] qemu: support disabling/enabling kvmclock with elements

2012-01-23 Thread Paolo Bonzini
QEMU supports a bunch of CPUID features that are tied to the kvm CPUID nodes rather than the processor's. They are "kvmclock", "kvm_nopiodelay", "kvm_mmu", "kvm_asyncpf". These are not known to libvirt and their CPUID leaf might move if (for example) the Hyper-V extensions are enabled. Hence thei

[libvirt] [PATCH 1/4] qemu: get arch name from element

2012-01-23 Thread Paolo Bonzini
The qemu32 CPU model is chosen based on the name when creating the QEMU command line. Reflect the kvm32/kvm64/qemu32/qemu64 CPU models in the element when doing the opposite transformation. To do this, we need to not look at def->os.arch until after the command-line has been parsed. At the same

[libvirt] [PATCH 4/4] qemu: default to kvm32/kvm64 when KVM is enabled

2012-01-23 Thread Paolo Bonzini
The qemu32/qemu64 models are weird in that the exact combination of CPUID flags does not match any actual processor. kvm32 and kvm64 are a better match when not using TCG. Use them when -cpu is only needed to hardcode a 32-bit guest arch or for kvmclock. Signed-off-by: Paolo Bonzini --- src/qe

[libvirt] [PATCH 2/4] conf: add kvmclock timer

2012-01-23 Thread Paolo Bonzini
Add kvmclock timer to documentation, schema and parsers. Keep the platform timer first since it is kind of special, and alphabetize the others when possible (i.e. when it does not change the ABI). Signed-off-by: Paolo Bonzini --- docs/formatdomain.html.in |4 ++-- docs/schemas/domaincom

[libvirt] [PATCH 3/4] qemu: parse and create -cpu ...,-kvmclock

2012-01-23 Thread Paolo Bonzini
Creating part of the -cpu command-line from something other than the XML element introduces some ugliness. --- src/qemu/qemu_command.c| 72 ++-- tests/qemuargv2xmltest.c |4 + .../qemuxml2argv-cpu-host-kvmclock.args

[libvirt] [PATCH 2/4] virsh: Implement domioerror command

2012-01-23 Thread Jiri Denemark
--- tools/virsh.c | 111 +++ tools/virsh.pod | 11 + 2 files changed, 122 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index d635b56..92029fd 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -15809,6 +15809,

[libvirt] [PATCH 4/4] qemu: Implement virDomainIOError

2012-01-23 Thread Jiri Denemark
--- src/qemu/qemu_conf.h |1 + src/qemu/qemu_driver.c | 82 ++ src/qemu/qemu_monitor.c | 40 src/qemu/qemu_monitor.h |1 + src/qemu/qemu_monitor_json.c |8 src/qemu/qemu_monitor_text.c | 15

[libvirt] [PATCH 0/4] Add virDomainIOError API

2012-01-23 Thread Jiri Denemark
We already provide ways to detect when a domain has been paused as a result of I/O error, but there was no way of getting the exact error or even the device that experienced it. This new API may be used for both. Jiri Denemark (4): virDomainIOError public API and remote protocol virsh: Implem

[libvirt] [PATCH 1/4] virDomainIOError public API and remote protocol

2012-01-23 Thread Jiri Denemark
We already provide ways to detect when a domain has been paused as a result of I/O error, but there was no way of getting the exact error or even the device that experienced it. This new API may be used for both. --- include/libvirt/libvirt.h.in | 19 +++ src/driver.h

[libvirt] [PATCH 3/4] qemu: Refactor qemuMonitorGetBlockInfo

2012-01-23 Thread Jiri Denemark
QEMU always sends details about all available block devices as an answer for "info block"/"query-block" command. On the other hand, our qemuMonitorGetBlockInfo was made for a single block devices queries only. Thus, when asking for multiple devices, we asked qemu multiple times to always get the sa

Re: [libvirt] [BUG] EPOLL_CLOEXEC undeclared

2012-01-23 Thread Eric Blake
On 01/23/2012 02:48 AM, Philipp Hahn wrote: >> Then how about this patch: >> >> From 330f666036943a0fc423a4b5db2ca294fb2a4298 Mon Sep 17 00:00:00 2001 >> From: Eric Blake >> Date: Thu, 19 Jan 2012 13:35:39 -0700 >> Subject: [PATCH] build: skip lxc with too-old glibc > ... > > Looks good: Now the

Re: [libvirt] RFC: setting mac address on network devices being assigned to a guest via PCI passthrough ()

2012-01-23 Thread Paolo Bonzini
On 01/20/2012 10:50 PM, Laine Stump wrote: To refresh everyone's memory, the origin of the problem I'm trying to solve here is that the VFs of an SRIOV-capable ethernet card are given new random MAC addresses each time the card is initialized. If those VFs are then passed-through to a guest using

[libvirt] [PATCH v2 0/4] Add support for QEMU guest agent control

2012-01-23 Thread Michal Privoznik
These patches are taken from here: https://www.redhat.com/archives/libvir-list/2011-October/msg00135.html I've just rebased and polished them. The QEMU guest agent "/usr/bin/qemu-ga" has some handy functions for controlling the guest, not least, shutdown/reboot and filesystem freeze/tha

[libvirt] [PATCH v2 3/4] Wire up QEMU agent to reboot/shutdown APIs

2012-01-23 Thread Michal Privoznik
This makes use of the QEMU guest agent to implement the virDomainShutdownFlags and virDomainReboot APIs. With no flags specified, it will prefer to use the agent, but fallback to ACPI. Explicit choice can be made by using a suitable flag * src/qemu/qemu_driver.c: Wire up use of agent --- src/qemu

[libvirt] [PATCH v2 1/4] QEMU guest agent support

2012-01-23 Thread Michal Privoznik
There is now a standard QEMU guest agent that can be installed and given a virtio serial channel The protocol that runs over the guest agent is JSON based and very similar to the JSON monitor. We can't use exactly the same code because there are some odd differences in the

[libvirt] [PATCH v2 2/4] Add new virDomainShutdownFlags API

2012-01-23 Thread Michal Privoznik
Add a new API virDomainShutdownFlags and define: VIR_DOMAIN_SHUTDOWN_DEFAULT= 0, VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = (1 << 0), VIR_DOMAIN_SHUTDOWN_GUEST_AGENT= (1 << 1), Also define some flags for the reboot API VIR_DOMAIN_REBOOT_DEFAULT= 0, VIR_DOMAIN_RE

[libvirt] [PATCH v2 4/4] Allow choice of shutdown method via virsh

2012-01-23 Thread Michal Privoznik
Extend the 'shutdown' and 'reboot' methods so that they both accept a new argument --mode acpi|agent * tools/virsh.c: New args for shutdown/reboot * tools/virsh.pod: Document new args --- tools/virsh.c | 47 +-- tools/virsh.pod | 12 +

Re: [libvirt] [libvirt-glib] API to get/set custom metadata from/to domain config

2012-01-23 Thread Zeeshan Ali (Khattak)
On Mon, Jan 23, 2012 at 1:01 PM, Christophe Fergeau wrote: > On Fri, Jan 20, 2012 at 11:11:57PM +0200, Zeeshan Ali (Khattak) wrote: >> From: "Zeeshan Ali (Khattak)" >> >> --- >>  libvirt-gconfig/libvirt-gconfig-domain.c  |  115 >> + >>  libvirt-gconfig/libvirt-gconfig

[libvirt] [PATCH 2/2] Added RSS reporting

2012-01-23 Thread Martin Kletzander
Added RSS information gathering into qemuMemoryStats into qemu driver and the reporting into virsh dommemstat. --- include/libvirt/libvirt.h.in |7 ++- src/qemu/qemu_driver.c | 21 + tools/virsh.c|2 ++ 3 files changed, 25 insertions(+), 5 de

[libvirt] [PATCH 1/2] Added RSS information gathering into qemudGetProcessInfo

2012-01-23 Thread Martin Kletzander
One more parameter added into the function parsing /proc//stat and the call of the function is fixed as well. --- src/qemu/qemu_driver.c | 25 ++--- 1 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 608e82a..

[libvirt] [PATCH 0/2] Added RSS reporting for qemu

2012-01-23 Thread Martin Kletzander
This patch enables reporting of Resident Set Size for qemu process. It is available through qemudDomainMemoryStats and qemudGetProcessInfo. The reporting is also added into "virsh dommemstat" command. Martin Kletzander (2): Added RSS information gathering into qemudGetProcessInfo Added RSS rep

[libvirt] Re: [PATCH v2 4/4] Allow choice of shutdown method via virsh

2012-01-23 Thread Nicolas Sebrecht
The 23/01/12, Michal Privoznik wrote: > +By default the hypervisor will try to pick a suitable shutdown > +method. To specify an alternative method, the I<--mode> parameter > +can specify C or C. > + What's the "suitable shutdown method", BTW? If I don't give the --mode option, it is not clear wh

Re: [libvirt] [PATCH v2 4/4] Allow choice of shutdown method via virsh

2012-01-23 Thread Daniel P. Berrange
On Mon, Jan 23, 2012 at 04:41:43PM +0100, Nicolas Sebrecht wrote: > The 23/01/12, Michal Privoznik wrote: > > > +By default the hypervisor will try to pick a suitable shutdown > > +method. To specify an alternative method, the I<--mode> parameter > > +can specify C or C. > > + > > What's the "sui

Re: [libvirt] [PATCH v2 0/8] Add ability to store notes with domains

2012-01-23 Thread Peter Krempa
On 01/18/2012 03:23 PM, Peter Krempa wrote: I've reworked this patches to use a separate element for storing the short note. This v2 also contains som new patches, especially added support for the LXC driver, and optionaly API to get the description. (See patches marked as optional). These are no

Re: [libvirt] [PATCH 1/4] qemu: get arch name from element

2012-01-23 Thread Jiri Denemark
On Mon, Jan 23, 2012 at 14:11:08 +0100, Paolo Bonzini wrote: > The qemu32 CPU model is chosen based on the name when > creating the QEMU command line. Reflect the kvm32/kvm64/qemu32/qemu64 > CPU models in the element when doing the opposite transformation. > To do this, we need to not look at de

Re: [libvirt] [PATCH 4/4] qemu: default to kvm32/kvm64 when KVM is enabled

2012-01-23 Thread Jiri Denemark
On Mon, Jan 23, 2012 at 14:11:11 +0100, Paolo Bonzini wrote: > The qemu32/qemu64 models are weird in that the exact combination of > CPUID flags does not match any actual processor. kvm32 and kvm64 are > a better match when not using TCG. Use them when -cpu is only needed > to hardcode a 32-bit g

Re: [libvirt] [PATCH 4/4] qemu: default to kvm32/kvm64 when KVM is enabled

2012-01-23 Thread Daniel P. Berrange
On Mon, Jan 23, 2012 at 04:57:21PM +0100, Jiri Denemark wrote: > On Mon, Jan 23, 2012 at 14:11:11 +0100, Paolo Bonzini wrote: > > The qemu32/qemu64 models are weird in that the exact combination of > > CPUID flags does not match any actual processor. kvm32 and kvm64 are > > a better match when not

Re: [libvirt] [PATCH 2/4] conf: add kvmclock timer

2012-01-23 Thread Jiri Denemark
On Mon, Jan 23, 2012 at 14:11:09 +0100, Paolo Bonzini wrote: > Add kvmclock timer to documentation, schema and parsers. Keep the > platform timer first since it is kind of special, and alphabetize > the others when possible (i.e. when it does not change the ABI). Any chance the "clock" part in "k

Re: [libvirt] RFC: setting mac address on network devices being assigned to a guest via PCI passthrough ()

2012-01-23 Thread Laine Stump
On 01/23/2012 09:08 AM, Paolo Bonzini wrote: On 01/20/2012 10:50 PM, Laine Stump wrote: To refresh everyone's memory, the origin of the problem I'm trying to solve here is that the VFs of an SRIOV-capable ethernet card are given new random MAC addresses each time the card is initialized. If thos

Re: [libvirt] [PATCH v2 0/8] Add ability to store notes with domains

2012-01-23 Thread Eric Blake
On 01/23/2012 08:50 AM, Peter Krempa wrote: > On 01/18/2012 03:23 PM, Peter Krempa wrote: >> I've reworked this patches to use a separate element for storing the >> short note. This v2 also contains som new patches, especially added >> support for the LXC driver, and optionaly API to get the descri

Re: [libvirt] [PATCH 1/4] qemu: get arch name from element

2012-01-23 Thread Paolo Bonzini
On 01/23/2012 04:52 PM, Jiri Denemark wrote: I think we could just set cpu->model even if the model used in qemu command line was {qemu,kvm}{32,64}. That would probably mean we need to add some of the models in cpu_map.xml, though. Actually I was doing that on purpose, not just for laziness. :)

Re: [libvirt] [PATCH v2 0/8] Add ability to store notes with domains

2012-01-23 Thread Daniel P. Berrange
On Mon, Jan 23, 2012 at 09:17:51AM -0700, Eric Blake wrote: > On 01/23/2012 08:50 AM, Peter Krempa wrote: > > On 01/18/2012 03:23 PM, Peter Krempa wrote: > >> I've reworked this patches to use a separate element for storing the > >> short note. This v2 also contains som new patches, especially adde

Re: [libvirt] [PATCH 4/4] qemu: default to kvm32/kvm64 when KVM is enabled

2012-01-23 Thread Paolo Bonzini
On 01/23/2012 05:03 PM, Daniel P. Berrange wrote: > > The qemu32/qemu64 models are weird in that the exact combination of > > CPUID flags does not match any actual processor. kvm32 and kvm64 are > > a better match when not using TCG. Use them when -cpu is only needed > > to hardcode a 3

Re: [libvirt] [PATCH 2/4] conf: add kvmclock timer

2012-01-23 Thread Paolo Bonzini
On 01/23/2012 05:05 PM, Jiri Denemark wrote: > Add kvmclock timer to documentation, schema and parsers. Keep the > platform timer first since it is kind of special, and alphabetize > the others when possible (i.e. when it does not change the ABI). Any chance the "clock" part in "kvmclock" i

Re: [libvirt] [PATCH 4/4] qemu: default to kvm32/kvm64 when KVM is enabled

2012-01-23 Thread Daniel P. Berrange
On Mon, Jan 23, 2012 at 05:23:32PM +0100, Paolo Bonzini wrote: > On 01/23/2012 05:03 PM, Daniel P. Berrange wrote: > > The qemu32/qemu64 models are weird in that the exact combination of > > CPUID flags does not match any actual processor. kvm32 and kvm64 are > > a better matc

Re: [libvirt] [PATCH v2 0/8] Add ability to store notes with domains

2012-01-23 Thread Eric Blake
On 01/23/2012 09:23 AM, Daniel P. Berrange wrote: >> Changing or of a transient domain is a >> nice-to-have, but not the end of the world. Changing of a >> transient domain is a must-have, so we need at least one new API. >> Setting is important, while getting is only a shortcut (we can make th

Re: [libvirt] [PATCH v2 0/8] Add ability to store notes with domains

2012-01-23 Thread Daniel P. Berrange
On Mon, Jan 23, 2012 at 09:46:57AM -0700, Eric Blake wrote: > On 01/23/2012 09:23 AM, Daniel P. Berrange wrote: > >> Changing or of a transient domain is a > >> nice-to-have, but not the end of the world. Changing of a > >> transient domain is a must-have, so we need at least one new API. > >>

Re: [libvirt] RFC: setting mac address on network devices being assigned to a guest via PCI passthrough ()

2012-01-23 Thread Laine Stump
On 01/23/2012 11:12 AM, Laine Stump wrote: On 01/23/2012 09:08 AM, Paolo Bonzini wrote: In view of the discussion on SCSI passthrough, it seems to me that this should be attached to an element: BTW, another advantage of defining these in rather than is that it makes it easie

Re: [libvirt] [PATCH 4/4] qemu: default to kvm32/kvm64 when KVM is enabled

2012-01-23 Thread Paolo Bonzini
On 01/23/2012 05:30 PM, Daniel P. Berrange wrote: > On Mon, Jan 23, 2012 at 05:23:32PM +0100, Paolo Bonzini wrote: >> On 01/23/2012 05:03 PM, Daniel P. Berrange wrote: >> > The qemu32/qemu64 models are weird in that the exact combination of >> > CPUID flags does not match any actual

Re: [libvirt] [libvirt-glib] API to get/set custom metadata from/to domain config

2012-01-23 Thread Christophe Fergeau
On Mon, Jan 23, 2012 at 04:53:40PM +0200, Zeeshan Ali (Khattak) wrote: > On Mon, Jan 23, 2012 at 1:01 PM, Christophe Fergeau > wrote: > > I wouldn't make this recursive, I'd just set the namespace on the root > > node in case users of the API want to use different namespaces in the xml > > they e

[libvirt] [libvirt-glib] API to get/set custom metadata from/to domain config

2012-01-23 Thread Christophe Fergeau
Based on a patch from Zeeshan Ali (Khattak) --- libvirt-gconfig/libvirt-gconfig-domain.c | 60 + libvirt-gconfig/libvirt-gconfig-domain.h |7 +++ libvirt-gconfig/libvirt-gconfig-helpers-private.h |1 + libvirt-gconfig/libvirt-gconfig-helpers.c

[libvirt] [PATCH RFC 06/12] Add API for thread cancellation

2012-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" * src/util/threads-pthread.c, src/util/threads.h: Add virThreadCancel --- src/util/threads-pthread.c |5 + src/util/threads.h |1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/util/threads-pthread.c b/src/util/threads-pthread.

[libvirt] [PATCH RFC 00/12] Fine grained access control proof of concept

2012-01-23 Thread Daniel P. Berrange
This series of patch is the minimal required to get a working proof of concept implementation of fine grained access control in libvirt. This demonstrates - Obtaining a client identity from a socket - Ensuring RPC calls are executed with the correct identity sset - A policykit access driver th

[libvirt] [PATCH RFC 05/12] Add a virLogMessage alternative taking va_list args

2012-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Allow the logging APIs to be called with a va_list for format args, instead of requiring var-args usage. * src/util/logging.h, src/util/logging.c: Add virLogVMessage --- src/util/logging.c | 29 - src/util/logging.h |5 + 2 files

[libvirt] [PATCH RFC 04/12] Define basic internal API for access control

2012-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" --- include/libvirt/virterror.h |3 + po/POTFILES.in|1 + src/Makefile.am | 16 + src/access/apis.txt | 577 + src/access/viraccessdriver.h | 51 src/ac

[libvirt] [PATCH RFC 02/12] Add APIs to get at more client security data

2012-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Add new APIs virNetServerClientGetTLSSession, virNetServerClientIsLocal, virNetServerClientGetSecurityContext virNetServerClientGetSASLSession, virNetSocketGetSecurityContext and virNetTLSSessionGetX509DName --- src/rpc/virnetserverclient.c | 48 +

[libvirt] [PATCH RFC 11/12] Add a policy kit access control driver

2012-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" --- po/POTFILES.in |1 + src/Makefile.am | 12 ++- src/access/org.libvirt.domain.policy | 37 src/access/viraccessdriverpolkit.c | 163 ++ src/access/viraccessdriverpolkit.h

[libvirt] [PATCH RFC 03/12] Define public API for managing identities

2012-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" --- include/libvirt/libvirt.h.in | 30 +++ include/libvirt/virterror.h |1 + src/datatypes.h | 22 +- src/libvirt.c| 176 ++ src/util/virterror.c |6 ++ 5 files changed,

[libvirt] [PATCH RFC 01/12] Remove hack using existance of an 'identity' string to disable auth

2012-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Currently the server determines whether authentication of clients is complete, by checking whether an identity is set. This patch removes that lame hack and replaces it with an explicit method for changing the client auth code * daemon/remote.c: Update for new APis * s

[libvirt] [PATCH RFC 07/12] Add ability to associate real/effective identity on virNetServerClientPtr

2012-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Add APIs which allow storage of a real & effective identity on all server clients. Also add an API which allows creation of an initial identity based on the results of client authentication processes like TLS, x509, SASL, SO_PEERCRED --- src/rpc/virnetserverclient.c |

[libvirt] [PATCH RFC 08/12] Set the identity for the access manager during API call dispatch

2012-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" When dispatching an RPC API call, setup the access manager to hold the real & effective identities of the current server client whose RPC is being dispatched. The setting is thread-local, so only affects the API call in this thread --- src/rpc/virnetserverclient.c |

[libvirt] [PATCH RFC 09/12] Add configuration to QEMU driver to support access control managers

2012-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Introduce a new 'access_driver' configuration parameter which specifies the name of the access control manager driver to activate. By default the 'no op' driver is active --- src/qemu/qemu.conf |5 + src/qemu/qemu_conf.c | 10 ++ src/qemu/qemu_c

[libvirt] [PATCH RFC 12/12] Add an SELinux access control driver

2012-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" --- po/POTFILES.in |1 + src/Makefile.am |3 +- src/access/viraccessdriverselinux.c | 388 +++ src/access/viraccessdriverselinux.h | 28 +++ src/access/viraccessmanager.c |2 +

[libvirt] [PATCH RFC 10/12] Insert access control checks for virDomainObjPtr into QEMU driver

2012-01-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Inserts the minimal access control checks to the QEMU driver to protect usage of virDomainObjPtr objects. --- src/qemu/qemu_driver.c| 631 ++-- src/qemu/qemu_migration.c |5 + 2 files changed, 607 insertions(+), 29 delet

[libvirt] [PATCH] schema: Relax schema for domain name

2012-01-23 Thread Peter Krempa
The domain schema enforced restrictions on the domain name string that the code doesn't. This patch relaxes the check, leaving the restrictions on the driver or hypervisor. --- And maybe we should consider adding some restrictions on the qemu driver, as the daemon is competely fine with creating a

Re: [libvirt] RFC: setting mac address on network devices being assigned to a guest via PCI passthrough ()

2012-01-23 Thread Paolo Bonzini
On 01/23/2012 05:12 PM, Laine Stump wrote: In view of the discussion on SCSI passthrough, it seems to me that this should be attached to an element: Nice! I should have thought of this in my original proposal - it's the logical extension of having networks of type='hostdev'. I would

Re: [libvirt] RFC: setting mac address on network devices being assigned to a guest via PCI passthrough ()

2012-01-23 Thread Paolo Bonzini
Hit send too soon... a couple more observations. On 01/23/2012 05:12 PM, Laine Stump wrote: (Note that even with *no new XML*, we already have a problem where just scanning all the entries won't tell us about all host devices that are currently assigned exclusively to guests - using a network d

Re: [libvirt] [PATCH] schema: Relax schema for domain name

2012-01-23 Thread Daniel P. Berrange
On Mon, Jan 23, 2012 at 06:53:17PM +0100, Peter Krempa wrote: > The domain schema enforced restrictions on the domain name string that > the code doesn't. This patch relaxes the check, leaving the restrictions > on the driver or hypervisor. > --- > And maybe we should consider adding some restricti

Re: [libvirt] [PATCH] schema: Relax schema for domain name

2012-01-23 Thread Eric Blake
On 01/23/2012 10:53 AM, Peter Krempa wrote: > The domain schema enforced restrictions on the domain name string that > the code doesn't. This patch relaxes the check, leaving the restrictions > on the driver or hypervisor. > --- > And maybe we should consider adding some restrictions on the qemu dr

Re: [libvirt] [PATCH 0/7] Introduce sVirt to LXC driver

2012-01-23 Thread Daniel P. Berrange
On Wed, Jan 11, 2012 at 04:33:29PM +, Daniel P. Berrange wrote: > This patch series adds support for sVirt to the LXC driver. In this > series, all LXC guests continue to run unconfined by default. The > app has to explicitly request sVirt confinement for the guest. This > is to ensure backward

Re: [libvirt] RFC: setting mac address on network devices being assigned to a guest via PCI passthrough ()

2012-01-23 Thread Laine Stump
On 01/23/2012 01:06 PM, Paolo Bonzini wrote: On 01/23/2012 05:12 PM, Laine Stump wrote: In view of the discussion on SCSI passthrough, it seems to me that this should be attached to an element: Nice! I should have thought of this in my original proposal - it's the logical extension

Re: [libvirt] [PATCH v2 1/4] QEMU guest agent support

2012-01-23 Thread Eric Blake
On 01/23/2012 07:48 AM, Michal Privoznik wrote: > There is now a standard QEMU guest agent that can be installed > and given a virtio serial channel > > > > > You also need to update docs/formatdomain.html.in to include this specific example. May I propose that you squash

Re: [libvirt] [PATCH v2 2/3] Add test case for virHashEqual function

2012-01-23 Thread Stefan Berger
On 01/20/2012 07:16 PM, Eric Blake wrote: On 01/18/2012 09:20 AM, Stefan Berger wrote: Add a test case to test the virHashEqual function. --- tests/hashtest.c | 78 +++ 1 file changed, 78 insertions(+) Even better - you test your new AP

Re: [libvirt] [PATCH v2 2/4] Add new virDomainShutdownFlags API

2012-01-23 Thread Eric Blake
On 01/23/2012 07:48 AM, Michal Privoznik wrote: > Add a new API virDomainShutdownFlags and define: > > VIR_DOMAIN_SHUTDOWN_DEFAULT= 0, > VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = (1 << 0), > VIR_DOMAIN_SHUTDOWN_GUEST_AGENT= (1 << 1), > > Also define some flags for the reboot AP

Re: [libvirt] [PATCH v2 3/4] Wire up QEMU agent to reboot/shutdown APIs

2012-01-23 Thread Eric Blake
On 01/23/2012 07:48 AM, Michal Privoznik wrote: [for some reason, this one didn't get threaded properly - bug in git send-email?] > This makes use of the QEMU guest agent to implement the > virDomainShutdownFlags and virDomainReboot APIs. With > no flags specified, it will prefer to use the agent

Re: [libvirt] [PATCH v2 4/4] Allow choice of shutdown method via virsh

2012-01-23 Thread Eric Blake
On 01/23/2012 07:48 AM, Michal Privoznik wrote: > Extend the 'shutdown' and 'reboot' methods so that they both > accept a new argument > > --mode acpi|agent > > * tools/virsh.c: New args for shutdown/reboot > * tools/virsh.pod: Document new args > --- > tools/virsh.c | 47 +++

Re: [libvirt] [libvirt-glib] API to get/set custom metadata from/to domain config

2012-01-23 Thread Zeeshan Ali (Khattak)
On Mon, Jan 23, 2012 at 7:19 PM, Christophe Fergeau wrote: > Based on a patch from Zeeshan Ali (Khattak) Looks good! I'll test it later. Some minor issues: > +    gvir_config_object_set_namespace(custom_xml, ns, ns_uri, TRUE); You meant to pass 'FALSE' in the last arg? > +    g_return_val_if_

Re: [libvirt] [PATCH v2 3/3] nwfilter: Rebuild filters only if new filter is different than current

2012-01-23 Thread Eric Blake
On 01/18/2012 09:20 AM, Stefan Berger wrote: > Compare two filter definitions for equality and only rebuild/instantiate > the new filter if the two filters are found to be different. This improves > performance during an update of a filter with no obvious change or the > reloading > of filters dur

Re: [libvirt] [PATCH 1/7] Add virFileTouch for creating empty files

2012-01-23 Thread Eric Blake
On 01/11/2012 09:33 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Add a virFileTouch API which ensures that a file will always > exist, even if zero length > > * src/lxc/lxc_container.c, src/util/virfile.h: virFileTouch This line is not quite accurate, > --- > src/util/virfil

Re: [libvirt] [PATCH 2/7] Don't bind mount onto a char device for /dev/ptmx in LXC

2012-01-23 Thread Eric Blake
On 01/11/2012 09:33 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > The current setup code for LXC is bind mounting /dev/pts/ptmx > ontop of a character device /dev/ptmx. This is denied by SELinux s/ontop/on top/ > policy and is just wrong. The target of a bind mount should just

Re: [libvirt] [PATCH 3/7] Revert changes to sec label parsing

2012-01-23 Thread Eric Blake
On 01/11/2012 09:33 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Revert parsing changes: > > commit 302fe95ffa1bc5f1c61c0beb31a1adfbc38c668e > Author: Eric Blake > Date: Wed Jan 4 16:01:24 2012 -0700 > > seclabel: fix regression in libvirtd restart > > commit b

[libvirt] libvirt and mingw64 x64, bad idea?

2012-01-23 Thread Marc-André Lureau
Hi, I tried to update the fedora mingw package to follow the mingw64 packaging guideline and allow build for x86 and x64. But I got into build warning and errors for x86_64. (using Fedora Cross project repo: http://build1.openftd.org/fedora-cross/fedora-cross.repo, x86_64-w64-mingw32-gcc (GCC) 4.6

Re: [libvirt] [PATCH 4/7] Re-add domain device seclabel parsing / formatting

2012-01-23 Thread Eric Blake
On 01/11/2012 09:33 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > This re-introduces parsing & formatting for per device seclabels. > There is a new virDomainDeviceSeclabelPtr struct and corresponding > APIs for parsing/formatting. > --- > src/conf/domain_conf.c | 115 > ++

Re: [libvirt] [PATCH 4/7] Re-add domain device seclabel parsing / formatting

2012-01-23 Thread Eric Blake
On 01/23/2012 03:38 PM, Eric Blake wrote: > On 01/11/2012 09:33 AM, Daniel P. Berrange wrote: >> From: "Daniel P. Berrange" >> >> This re-introduces parsing & formatting for per device seclabels. >> There is a new virDomainDeviceSeclabelPtr struct and corresponding >> APIs for parsing/formatting.

Re: [libvirt] [PATCH 5/7] Add two new security label types

2012-01-23 Thread Eric Blake
On 01/11/2012 09:33 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > Curently security labels can be of type 'dynamic' or 'static'. > If no security label is given, then 'dynamic' is assumed. The > current code takes advantage of this default, and avoids even > saving elements with

Re: [libvirt] libvirt and mingw64 x64, bad idea?

2012-01-23 Thread Eric Blake
On 01/23/2012 03:29 PM, Marc-André Lureau wrote: > Hi, > > I tried to update the fedora mingw package to follow the mingw64 > packaging guideline and allow build for x86 and x64. But I got into > build warning and errors for x86_64. (using Fedora Cross project repo: > http://build1.openftd.org/fed

[libvirt] [libvirt-glib] Allow custom metadata in domain configuration XML

2012-01-23 Thread Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" Applications can now insert custom nodes and hierarchies into domain cofiguration XML. Although currently not enforced, application are required to use their own namespaces on every custom node they insert. --- docs/formatdomain.html.in |

[libvirt] Allow custom metadata in domain configuration XML

2012-01-23 Thread Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" Applications can now insert custom nodes and hierarchies into domain cofiguration XML. Although currently not enforced, application are required to use their own namespaces on every custom node they insert. --- docs/formatdomain.html.in |