Re: [libvirt] [PATCH v2 1/3] qemu: Remove CPU features functions calling for non-x86 platform.

2013-09-06 Thread Li Zhang
On 2013年09月05日 19:08, Daniel P. Berrange wrote: On Tue, Sep 03, 2013 at 02:28:23PM +0800, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com CPU features are not supported on non-x86 and hasFeatures will be NULL. This patch is to remove CPU features functions calling to avoid errors.

Re: [libvirt] [PATCH] qemu: Remove unnecessary variable assignment

2013-09-06 Thread Ján Tomko
On 09/06/2013 07:35 AM, Hongwei Bi wrote: Remove unnecessary 'addrs = NULL' in qemuDomainAssignS390Addresses() and qemuDomainAssignPCIAddresses() due to the related Free function in label cleanup. But it is necessary, because we assign the value of addrs to priv-ccwaddrs. If we didn't set

[libvirt] [PATCH 1/1] qemu: avoid users specifying CPU features for non-x86 plaftorm.

2013-09-06 Thread Li Zhang
From: Li Zhang zhlci...@linux.vnet.ibm.com Currently, only X86 provides users CPU features with CPUID instruction. If users specify the features for non-x86, it should tell users to remove them. This patch is to report one error if features are specified by users for non-x86 platform.

Re: [libvirt] [PATCH] qemu: Remove unnecessary variable assignment

2013-09-06 Thread hw bi
I understand. Thanks for your reminding. 2013/9/6 Ján Tomko jto...@redhat.com On 09/06/2013 07:35 AM, Hongwei Bi wrote: Remove unnecessary 'addrs = NULL' in qemuDomainAssignS390Addresses() and qemuDomainAssignPCIAddresses() due to the related Free function in label cleanup. But it

Re: [libvirt] [ libvirt ] [ PATCH ] Added support for ARMv7 Big Endian

2013-09-06 Thread yogesh tillu
Hi All, Could you please let me know to whom should I contact to review this patch and for approval to get into this into libvirt repository. Thanks, Yogesh On Thu, Sep 5, 2013 at 5:22 PM, yogesh tillu tillu.yog...@gmail.com wrote: Hi All, Could you please review below patch, I have

Re: [libvirt] [PATCH 3/3] security_dac: Favour ACLs over chown()

2013-09-06 Thread Michal Privoznik
On 05.09.2013 16:14, Daniel P. Berrange wrote: On Wed, Aug 28, 2013 at 12:27:40PM +0200, Michal Privoznik wrote: On filesystems supporting ACLs we don't need to do a chown but we can just set ACLs to gain access for qemu. However, since we are setting these on too low level, where we don't

Re: [libvirt] [PATCH 3/3] security_dac: Favour ACLs over chown()

2013-09-06 Thread Daniel P. Berrange
On Fri, Sep 06, 2013 at 09:50:25AM +0200, Michal Privoznik wrote: On 05.09.2013 16:14, Daniel P. Berrange wrote: On Wed, Aug 28, 2013 at 12:27:40PM +0200, Michal Privoznik wrote: On filesystems supporting ACLs we don't need to do a chown but we can just set ACLs to gain access for qemu.

[libvirt] [PATCH] virBitmapFree: Change the function to a macro

2013-09-06 Thread Liuji (Jeremy)
The parameter of virBitmapFree function is just a pointer, not a pointer of pointer. The second VIR_FREE on virBitmapFree only assign NULL to the formal parameter. After calling the virBitmapFree function, the actual parameter are still not NULL. There are many code segment don't assign NULL to

Re: [libvirt] [PATCH] virBitmapFree: Change the function to a macro

2013-09-06 Thread Daniel P. Berrange
On Fri, Sep 06, 2013 at 10:30:56AM +, Liuji (Jeremy) wrote: The parameter of virBitmapFree function is just a pointer, not a pointer of pointer. The second VIR_FREE on virBitmapFree only assign NULL to the formal parameter. After calling the virBitmapFree function, the actual parameter

Re: [libvirt] [PATCH v2 0/3] expose baselabel for each sec model/virt type

2013-09-06 Thread Daniel P. Berrange
On Thu, Sep 05, 2013 at 01:49:42PM +0200, Giuseppe Scrivano wrote: Now each security model can define its own base label, that describes the default security context used by libvirt to run an hypervisor process. This information is exposed to users trough the host capabilities XML. Just a

Re: [libvirt] [PATCH v2 2/3] capabilities: add baselabel per sec driver/virt type to secmodel

2013-09-06 Thread Daniel P. Berrange
On Thu, Sep 05, 2013 at 01:49:44PM +0200, Giuseppe Scrivano wrote: for (i = 0; sec_managers[i]; i++) { +virCapsHostSecModelPtr sm = caps-host.secModels[i]; doi = virSecurityManagerGetDOI(sec_managers[i]); model = virSecurityManagerGetModel(sec_managers[i]); -

Re: [libvirt] [PATCH v2 1/3] security: add new internal function virSecurityManagerGetBaseLabel

2013-09-06 Thread Daniel P. Berrange
On Thu, Sep 05, 2013 at 01:49:43PM +0200, Giuseppe Scrivano wrote: virSecurityManagerGetBaseLabel queries the default settings used by a security model. Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- src/libvirt_private.syms | 1 + src/security/security_apparmor.c | 7

Re: [libvirt] [PATCH v2 3/3] capabilities: document and test baselabel

2013-09-06 Thread Daniel P. Berrange
On Thu, Sep 05, 2013 at 01:49:45PM +0200, Giuseppe Scrivano wrote: Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- docs/schemas/capability.rng | 8 tests/capabilityschemadata/caps-qemu-kvm.xml | 2 ++ tests/capabilityschemadata/caps-test3.xml| 2 ++ 3

Re: [libvirt] memory pinning problem

2013-09-06 Thread Daniel P. Berrange
On Tue, Aug 27, 2013 at 09:09:25AM +0200, David Weber wrote: Hi, we try to use vcpu pinning on a 2 socket server with Intel Xeon E5620 cpus, HT enabled and 2*6*16GiB Ram but experience problems if we try to start a guest on the second socket: error: Failed to start domain test error:

Re: [libvirt] [PATCH] LXC:fix typo in lxc_container.c

2013-09-06 Thread Daniel P. Berrange
On Thu, Sep 05, 2013 at 11:18:30PM -0400, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com fix typo in lxc_container.c Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- src/lxc/lxc_container.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ACK,

Re: [libvirt] [PATCH v2 2/3] cpu: Implement guestData and update for PPC

2013-09-06 Thread John Ferlan
On 09/03/2013 02:28 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com On Power platform, Power7+ can support Power7 guest. It needs to define XML configuration to specify guest's CPU model. For exmaple: cpu match='exact' modelPOWER7_v2.1/model vendorIBM/vendor

Re: [libvirt] [PATCH v2 3/3] cpu: Add cpu test cases for PPC CPU driver.

2013-09-06 Thread Shivaprasad G Bhat
Verified-by: Shivaprasad The cpu model to pvr value mappings are POWER7 - '0x003f0200' POWER7_v2.1 - '0x003f0201' POWER7_v2.3 - '0x003f0203' POWER7+_v2.1 - '0x004a0201' POWER8_v1.0 - '0x004b0100' Verified on, libvirt version: 1.1.2 Host : Fedora 19 - 3.11.0-rc7+ Guest : Fedora

[libvirt] [PATCH v2 3/3] cpu: Add cpu test cases for PPC CPU driver.

2013-09-06 Thread Shivaprasad G Bhat
Verified-by: Shivaprasad The cpu model to pvr value mappings are POWER7 - '0x003f0200' POWER7_v2.1 - '0x003f0201' POWER7_v2.3 - '0x003f0203' POWER7+_v2.1 - '0x004a0201' POWER8_v1.0 - '0x004b0100' Verified on, libvirt version: 1.1.2 Host : Fedora 19 - 3.11.0-rc7+ Guest : Fedora

Re: [libvirt] [PATCH v2 2/3] cpu: Implement guestData and update for PPC

2013-09-06 Thread Doug Goldstein
On Fri, Sep 6, 2013 at 6:32 AM, John Ferlan jfer...@redhat.com wrote: On 09/03/2013 02:28 AM, Li Zhang wrote: From: Li Zhang zhlci...@linux.vnet.ibm.com On Power platform, Power7+ can support Power7 guest. It needs to define XML configuration to specify guest's CPU model. For

Re: [libvirt] [PATCHv5 1/5] domifaddr: Implement the public APIs

2013-09-06 Thread Nehal J Wani
On Tue, Sep 3, 2013 at 6:51 PM, Osier Yang jy...@redhat.com wrote: On 01/09/13 21:43, Nehal J Wani wrote: Define a new API virDomainInterfaceAddresses, which returns the address information of a running domain's interfaces(s). If no interface name is specified, it returns the information of

[libvirt] [PATCHv6 3/5] domifaddr: Implement the API for qemu

2013-09-06 Thread Nehal J Wani
By querying the qemu guest agent with the QMP command guest-network-get-interfaces and converting the received JSON output to structured objects. Although ifconfig is deprecated, IP aliases created by ifconfig are supported by this API. The legacy syntax of an IP alias is: ifname:alias-name.

[libvirt] [PATCHv6 2/5] domifaddr: Implement the remote protocol

2013-09-06 Thread Nehal J Wani
daemon/remote.c * Define remoteSerializeDomainInterface, remoteDispatchDomainInterfaceAddresses src/remote/remote_driver.c * Define remoteDomainInterfaceAddresses src/remote/remote_protocol.x * New RPC procedure: REMOTE_PROC_DOMAIN_INTERFACE_ADDRESSES * Define structs

[libvirt] [PATCHv6 5/5] domifaddr: Expose python binding

2013-09-06 Thread Nehal J Wani
Expose virDomainInterfacesAddresses to python binding examples/python/Makefile.am: * Add new file domipaddrs.py examples/python/README: * Add documentation for the python example python/libvirt-override-api.xml: * Add new symbol for virDomainInterfacesAddresses python/libvirt-override.c:

Re: [libvirt] [PATCHv2 2/3] qemu: simplify list cleanup

2013-09-06 Thread Eric Blake
On 09/04/2013 07:54 AM, Daniel P. Berrange wrote: On Wed, Aug 28, 2013 at 03:01:23PM -0600, Eric Blake wrote: No need to open code now that we have a nice function. Interestingly, our virStringFreeList function is typed correctly (a malloc'd list of malloc'd strings is NOT const, whether at

[libvirt] [PATCH v3 2/2] capabilities: add baselabel per sec driver/virt type to secmodel

2013-09-06 Thread Giuseppe Scrivano
Expand the secmodel XML fragment of host with a sequence of baselabel's which describe the default security context used by libvirt with a specific security model and virtualization type: secmodel modelselinux/model doi0/doi baselabel type='kvm'system_u:system_r:svirt_t:s0/baselabel

Re: [libvirt] [PATCH 1/3] qemu: only parse basename when determining emulator properties

2013-09-06 Thread Eric Blake
On 09/04/2013 06:14 AM, Michal Privoznik wrote: On 28.08.2013 06:00, Eric Blake wrote: 'virsh domxml-from-native' and 'virsh qemu-attach' could misbehave for an emulator installed in (a somewhat unlikely) location such as /usr/local/qemu-1.6/qemu-system-x86_64 or (an even less likely)

[libvirt] [PATCH v3 1/2] security: add new internal function virSecurityManagerGetBaseLabel

2013-09-06 Thread Giuseppe Scrivano
virSecurityManagerGetBaseLabel queries the default settings used by a security model. Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- src/libvirt_private.syms | 1 + src/security/security_apparmor.c | 8 src/security/security_dac.c | 34

[libvirt] [PATCHv2] qemu: don't leak vm on failure

2013-09-06 Thread Eric Blake
Failure to attach to a domain during 'virsh qemu-attach' left the list of domains in an odd state: $ virsh qemu-attach 4176 error: An error occurred, but the cause is unknown $ virsh list --all IdName State 2

Re: [libvirt] [PATCH 5/3] qemu: don't leave shutdown inhibited on attach failure

2013-09-06 Thread Eric Blake
On 09/04/2013 06:13 AM, Michal Privoznik wrote: On 29.08.2013 00:38, Eric Blake wrote: While debugging a failure of 'virsh qemu-attach', I noticed that we were leaking the count of active domains on failure. This means that a libvirtd session that is supposed to quit after active domains

Re: [libvirt] [PATCH 4/3] qemu: don't leave vm in table on failure to attach

2013-09-06 Thread Eric Blake
On 09/04/2013 06:13 AM, Michal Privoznik wrote: On 28.08.2013 22:56, Eric Blake wrote: Failure to attach to a domain during 'virsh qemu-attach' left the list of domains in an odd state: $ virsh qemu-attach 4176 error: An error occurred, but the cause is unknown $ virsh list --all Id

Re: [libvirt] [PATCHv2] qemu: don't leak vm on failure

2013-09-06 Thread Eric Blake
On 09/06/2013 11:55 AM, Eric Blake wrote: Failure to attach to a domain during 'virsh qemu-attach' left the list of domains in an odd state: $ virsh qemu-attach 4176 error: An error occurred, but the cause is unknown -endjob: if (qemuDomainObjEndJob(driver, vm) == 0) { vm

Re: [libvirt] [PATCH] build: shut up automake warnings

2013-09-06 Thread Eric Blake
On 09/05/2013 07:04 AM, Eric Blake wrote: Unfortunately, 1.14 complains about subdir-objects way more than about anything else and I still haven't found the way out of that one. I found the way out (but with a caveat...) - you add 'subdir-objects' to the AM_INIT_AUTOMAKE line in configure.ac

[libvirt] [PATCH v2 3/5] cpu_models: add the support for qemu

2013-09-06 Thread Giuseppe Scrivano
Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- src/qemu/qemu_driver.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e37fe33..831a296 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -15882,6

[libvirt] [PATCH v2 0/5] add new API virConnectGetCPUModelNames

2013-09-06 Thread Giuseppe Scrivano
This series adds a new API virConnectGetCPUModelNames that allows to retrieve the list of CPU models known by the hypervisor for a specific architecture. This new function is mainly needed by virt-manager to not read directly the cpu_map.xml file (it could also be different when accessing a

[libvirt] [PATCH v2 2/5] cpu_models: implement the remote protocol

2013-09-06 Thread Giuseppe Scrivano
Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- daemon/remote.c | 47 +++ src/remote/remote_driver.c | 59 src/remote/remote_protocol.x | 20 ++- src/remote_protocol-structs | 11

[libvirt] [PATCHv6 0/5] Introduce API to query IP addresses for given domain

2013-09-06 Thread Nehal J Wani
This feature has been requested for a very long time. Since qemu guest agent gives us reliable results, now the wait is over. The RFC was first proposed by Michal Privoznik: http://www.redhat.com/archives/libvir-list/2012-February/msg00437.html A patch was submitted, using structs:

Re: [libvirt] [PATCH 3/3] qemu: recognize -machine accel=kvm when parsing native

2013-09-06 Thread Eric Blake
On 09/04/2013 06:13 AM, Michal Privoznik wrote: On 28.08.2013 06:00, Eric Blake wrote: In Fedora 19, 'qemu-kvm' is a simple wrapper that calls 'qemu-system-x86_64 -machine accel=kvm'. Attempting to use 'virsh qemu-attach $pid' to a machine started as: qemu-kvm -cdrom

[libvirt] [PATCHv6 4/5] domifaddr: Add virsh support

2013-09-06 Thread Nehal J Wani
Use virDomainInterfaceAddresses in virsh tools/virsh-domain-monitor.c * Introduce new command : domifaddr Usage: domifaddr domain [interface] [--full] [--snoop] [--lease] [--agent] Example outputs: virsh # domifaddr f18 Name MAC address Protocol Address

[libvirt] [PATCH v3 0/2] expose baselabel for each sec model/virt type

2013-09-06 Thread Giuseppe Scrivano
Now each security model can define its own base label, that describes the default security context used by libvirt to run an hypervisor process. This information is exposed to users trough the host capabilities XML. *v3 major changes - support LXC - merge virSecurityDACSetUser and

[libvirt] [PATCHv6 1/5] domifaddr: Implement the public APIs

2013-09-06 Thread Nehal J Wani
Define helper function virDomainInterfaceFree, which allows the upper layer application to free the domain interface object conveniently. The API is going to provide multiple methods by flags, e.g. * Query guest agent * Parse lease file of dnsmasq * DHCP snooping At this stage, it will

[libvirt] [PATCH v2 1/5] cpu_models: add new public API

2013-09-06 Thread Giuseppe Scrivano
The new function virConnectGetCPUModelNames allows to retrieve the list of CPU models known by the hypervisor for a specific architecture. Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- include/libvirt/libvirt.h.in | 18 + python/generator.py | 1 + src/cpu/cpu.c

[libvirt] [PATCH v2 5/5] cpu_models: add Python bindings

2013-09-06 Thread Giuseppe Scrivano
Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- python/generator.py | 2 +- python/libvirt-override-api.xml | 7 ++ python/libvirt-override.c | 56 + python/libvirt-override.py | 11 4 files changed, 75

[libvirt] [PATCH v2 4/5] cpu_models: add the support for the test protocol

2013-09-06 Thread Giuseppe Scrivano
Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- src/test/test_driver.c | 16 1 file changed, 16 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index c225618..03d9c96 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -5801,6