[libvirt] [PATCHv3] qemu: add a check for slot and base when build dimm address

2015-06-15 Thread Luyao Huang
qemu command line. Signed-off-by: Luyao Huang lhu...@redhat.com --- v3: rename qemuBuildMemoryDeviceAddr to qemuCheckMemoryDimmConflict and remove the refactor. src/qemu/qemu_command.c | 37 + 1 file changed, 37 insertions(+) diff --git a/src/qemu

[libvirt] [PATCH 04/10] conf: use virDomainChrSourceDef to save the path

2015-06-16 Thread Luyao Huang
As the backend of shmem server is a unix type chr device, save it in virDomainChrSourceDef can reuse the exist code for chr device. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 8 +--- src/conf/domain_conf.h | 2 +- src/qemu/qemu_command.c | 16

[libvirt] [PATCH 2/2] qemu: fix a document issue as we support host-passthrough with features

2015-06-17 Thread Luyao Huang
From the documentation :With this mode, the CPU visible to the guest should be exactly the same as the host CPU even in the aspects that libvirt does not understand. So this place document need fix. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_process.c | 6 -- 1 file

[libvirt] [PATCHv1.5 1/2] cpu:x86: fix specified features will disappear after migrate/restore

2015-06-17 Thread Luyao Huang
. Signed-off-by: Luyao Huang lhu...@redhat.com --- v1.5: just update the description. src/cpu/cpu_x86.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 2a14705..26601b6 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c

[libvirt] [PATCH 09/10] qemu: Implement shared memory device hot-unplug

2015-06-16 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 6 ++-- src/qemu/qemu_hotplug.c | 96 - src/qemu/qemu_hotplug.h | 3 ++ 3 files changed, 102 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu

[libvirt] [PATCH 06/10] conf: Add helpers to insert/remove/find shmem devices in domain def

2015-06-16 Thread Luyao Huang
The helpers will be useful when implementing hotplug and coldplug of shared memory devices. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 61 src/conf/domain_conf.h | 7 ++ src/libvirt_private.syms | 3 +++ 3

[libvirt] [PATCH 02/10] qemu: always build id when generate shared memory device CLI

2015-06-16 Thread Luyao Huang
When hot-unplug the device, qmp command device_del require a device id. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c| 4 ++-- tests/qemuxml2argvdata/qemuxml2argv-shmem.args | 16 2 files changed, 10 insertions(+), 10 deletions

[libvirt] [PATCH 07/10] qemu: Implement shared memory device cold (un)plug

2015-06-16 Thread Luyao Huang
Add support for using the attach/detach device APIs on the inactive configuration to add/del shared memory devices. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 21 +++-- 2 files changed, 20 insertions(+), 2

[libvirt] [PATCH 01/10] qemu: auto assign pci address for shared memory device

2015-06-16 Thread Luyao Huang
Shared memory device is base on PCI address, even we do not pass the pci address to qemu, qemu will auto assign a pci address for it. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c| 11 +++ tests/qemuxml2argvdata/qemuxml2argv-shmem.args

[libvirt] [PATCH 03/10] qemu: Refactor creation of shared memory device commandline

2015-06-16 Thread Luyao Huang
Rename qemuBuildShmemDevCmd to qemuBuildShmemDevStr and change the return type so that it can be reused in the device hotplug code later. And split the chardev creation part in a new function qemuBuildShmemBackendStr for reused in the device hotplug code later. Signed-off-by: Luyao Huang lhu

[libvirt] [PATCH 08/10] qemu: Implement share memory device hot-plug

2015-06-16 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 10 - src/qemu/qemu_hotplug.c | 60 + src/qemu/qemu_hotplug.h | 3 +++ 3 files changed, 72 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src

[libvirt] [PATCH 05/10] conf:audit: introduce audit function for shared memory device

2015-06-16 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- docs/auditlog.html.in| 16 src/conf/domain_audit.c | 16 src/conf/domain_audit.h | 6 ++ src/libvirt_private.syms | 1 + 4 files changed, 39 insertions(+) diff --git a/docs/auditlog.html.in b/docs

[libvirt] [PATCH 10/10] qemu: report error when shmem have a invalid address

2015-06-16 Thread Luyao Huang
If user pass a invalid address shared memory device to qemu, qemu won't report the error, but will auto assign a pci address to the shared memory device. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu

[libvirt] [PATCH 00/10] Implement shared memory device - Part 1

2015-06-16 Thread Luyao Huang
This part contains some small fix and Implement the hot-plug/hot-unplug and cold-plug/cold-unplug for Inter-VM Shared Memory PCI device. Luyao Huang (10): qemu: auto assign pci address for shared memory device qemu: always build id when generate shared memory device CLI qemu: Refactor

[libvirt] [PATCHv2] qemu: add a check for slot and base when build dimm address

2015-05-27 Thread Luyao Huang
qemu command line. Signed-off-by: Luyao Huang lhu...@redhat.com --- v2: move the check to qemuBuildMemoryDeviceStr() to check the dimm address when start/hot-plug a memory device. src/qemu/qemu_command.c | 77 - 1 file changed, 57 insertions

[libvirt] [PATCH] conf: improve the address check for dimm type

2015-05-27 Thread Luyao Huang
-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6e57425..413f839 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3089,7 +3089,10

[libvirt] [PATCH] qemu: fix wrong call addressrelease function when attach RNG device success

2015-05-31 Thread Luyao Huang
Add a return value check to avoid the wrong address release. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 170768b..f70e3d8 100644 --- a/src/qemu

[libvirt] [PATCH] conf:audit: fix no audit log when start a vm with iothread

2015-05-31 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_audit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c index 4ea10d2..1900039 100644 --- a/src/conf/domain_audit.c +++ b/src/conf/domain_audit.c @@ -885,6 +885,8

[libvirt] [PATCH] qemu: fix forget pass the return value to variable @ret

2015-05-31 Thread Luyao Huang
If we do not pass the return value from qemuDomainRemoveRNGDevice() function to variable @ret, qemuDomainRemoveDevice() functiuon will always fail when recive rng device unplug event from qemu monitor. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_hotplug.c | 2 +- 1 file

[libvirt] [libvirt-test-api][PATCH] Introduce new test case for setMemoryStatsPeriod

2015-07-02 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- cases/linux_domain.conf | 6 +++ repos/domain/set_memory_period.py | 84 +++ 2 files changed, 90 insertions(+) create mode 100644 repos/domain/set_memory_period.py diff --git a/cases

[libvirt] [PATCH] qemu: remove deadcode in qemuDomain{HelperGetVcpus|GetIOThreadsLive}

2015-07-02 Thread Luyao Huang
We set hostcpus but not use them. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 8 1 file changed, 8 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7a04e67..3f002b3 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu

[libvirt] [PATCH] qemu: move the guest status check before agent config and status check

2015-07-03 Thread Luyao Huang
is not running will be better than agent is not connected. Move the guest status check more early to output error to point out guest status is not right. Also from the logic, a running vm is a basic requirement to use agent, we cannot use agent if vm is not running. Signed-off-by: Luyao Huang lhu

[libvirt] [PATCH] virsh: report error if vcpu number exceed the guest maxvcpu number

2015-06-28 Thread Luyao Huang
-by: Luyao Huang lhu...@redhat.com --- tools/virsh-domain.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 27d62e9..681fc1a 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6497,6 +6497,11 @@ cmdVcpuPin(vshControl *ctl

[libvirt] [PATCH] conf: do not format redirfilter element if it do not have sub-element

2015-05-22 Thread Luyao Huang
When set a redirfilter element without sub-element, libvirt will format it like this: redirfilter /redirfilter Just drop this element if it do not have any sub-element. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 4 1 file changed, 4 insertions

[libvirt] [PATCH] util: improve the sysinfo element XML format

2015-05-22 Thread Luyao Huang
When set sysinfo element without sub-elements, libvirt will format it as: sysinfo type='smbios' /sysinfo After improve the format: sysinfo type='smbios'/ Signed-off-by: Luyao Huang lhu...@redhat.com --- src/util/virsysinfo.c | 33 ++--- 1 file changed, 22

[libvirt] [PATCH] qemu: fix not update weight in def after success

2015-08-12 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1253107 Update the weight in vm def to fix this. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7a984a8..0b984dc

[libvirt] [libvirt-test-api][PATCH 3/3] Add a new test case for ioThreadInfo

2015-08-12 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- cases/linux_domain.conf | 6 repos/domain/info_iothread.py | 80 +++ 2 files changed, 86 insertions(+) create mode 100644 repos/domain/info_iothread.py diff --git a/cases/linux_domain.conf b

[libvirt] [libvirt-test-api][PATCH 2/3] Add new test case for API pinIOThread

2015-08-12 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- cases/linux_domain.conf | 6 ++ repos/domain/pin_iothread.py | 158 +++ 2 files changed, 164 insertions(+) create mode 100644 repos/domain/pin_iothread.py diff --git a/cases/linux_domain.conf b/cases

[libvirt] [libvirt-test-api][PATCH 1/3] Introduce new test case for add/del IOthread

2015-08-12 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- cases/linux_domain.conf | 6 +++ repos/domain/add_del_iothread.py | 82 2 files changed, 88 insertions(+) create mode 100644 repos/domain/add_del_iothread.py diff --git a/cases/linux_domain.conf

[libvirt] [PATCHv2 0/2] qemu: fix the audit log is not correct for memory device

2015-08-13 Thread Luyao Huang
in qemuDomainRemoveMemoryDevice, since i just see only one place need jump to audit, so i refactor the code (thanks John's advise). Luyao Huang (2): qemu: fix the audit log is not correct after hot-plug memory success qemu: fix the audit log is not correct after hot-unplug memory device src/qemu

[libvirt] [PATCHv2 1/2] qemu: fix the audit log is not correct after hot-plug memory success

2015-08-13 Thread Luyao Huang
log will not right in that case. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_hotplug.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 1ea397f..def3de8 100644 --- a/src/qemu/qemu_hotplug.c

[libvirt] [PATCHv2 2/2] qemu: fix the audit log is not correct after hot-unplug memory device

2015-08-13 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1226234#c3 We use virDomainDefGetMemoryActual to get the newmem , but when we failed to remove the memory device, the virDomainDefGetMemoryActual will still output the oldmem size, so the audit log will not right in that case. Signed-off-by: Luyao

[libvirt] [PATCH] virsh: fix output the incorrect error after try failed

2015-08-17 Thread Luyao Huang
with matching id 123 The second line should be reset after call virshLookupDomainInternal, because after some tries we get domain pointer, so output error during we tried will make user confuse. Signed-off-by: Luyao Huang lhu...@redhat.com --- tools/virsh-domain.c | 2 ++ 1 file changed, 2 insertions

[libvirt] [PATCHv2] qemu: fix not update weight in def after success

2015-08-18 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1253107 Call virCgroupGetBlkioWeight to re-read blkio.weight right after it are set in order to keep our internal structures up-to-date. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2 insertions

[libvirt] [PATCH 0/2] 2 small fix for domrename

2015-08-16 Thread Luyao Huang
*** BLURB HERE *** Luyao Huang (2): virsh: fix always return false in domrename libvirt-domain: forbid use virDomainRename in readonly connection src/libvirt-domain.c | 1 + tools/virsh-domain.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- 1.8.3.1 -- libvir-list mailing

[libvirt] [PATCH 2/2] libvirt-domain: forbid use virDomainRename in readonly connection

2015-08-16 Thread Luyao Huang
This function will change the guest name, we shouldn't allow the readonly user do this. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 9065dab..9314f85 100644 --- a/src

[libvirt] [PATCH 1/2] virsh: fix always return false in domrename

2015-08-16 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- tools/virsh-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 173bb15..437e43e 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -9827,7 +9827,7

[libvirt] [PATCH] util:qemu: fix IOThreadinfo always get failed when get running vm status

2015-06-29 Thread Luyao Huang
, virProcessGetAffinity() will use default value (262144 or 1024) to create bitmap. This issue was introduced in commit 825df8c. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 4 ++-- src/util/virprocess.c | 7 --- src/util/virprocess.h | 2 +- 3 files changed, 7

[libvirt] [PATCH] qemu: fix not end the job after use OpenGraphics(FD) and get fail when exit monitor

2015-06-29 Thread Luyao Huang
If guest unexpect exit(qemu process be killed) and get failed when exit the monitor, guest job still handled by old function, this will make guest cannot start later. Need call qemuDomainObjEndJob to release job status before unref vm. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu

[libvirt] [PATCH] virsh: fix no error when pass a count = 0 to setvcpus

2015-07-29 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1248277 When count = 0, the client exit without set an error. Signed-off-by: Luyao Huang lhu...@redhat.com --- tools/virsh-domain.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c

Re: [libvirt] [PATCH 2/4] security: add security part for shmem device

2015-08-02 Thread Luyao Huang
Hi Marc-André On 07/27/2015 11:39 PM, Marc-André Lureau wrote: Hi On Thu, Jul 23, 2015 at 12:13 PM, Luyao Huanglhu...@redhat.com wrote: A new api to help set/restore the shmem deivce dac/selinux label. typo: deivce / device. thanks, i will fix this in next version Signed-off-by: Luyao

Re: [libvirt] [PATCH 2/4] security: add security part for shmem device

2015-08-02 Thread Luyao Huang
On 07/30/2015 06:00 PM, Daniel P. Berrange wrote: On Thu, Jul 23, 2015 at 06:13:47PM +0800, Luyao Huang wrote: A new api to help set/restore the shmem deivce dac/selinux label. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt_private.syms| 2 ++ src/security

Re: [libvirt] [PATCH 3/4] util: introduce new helpers to manage shmem device

2015-08-02 Thread Luyao Huang
Hi Marc-André On 07/27/2015 11:43 PM, Marc-André Lureau wrote: Hi On Thu, Jul 23, 2015 at 12:13 PM, Luyao Huang lhu...@redhat.com wrote: Signed-off-by: Luyao Huang lhu...@redhat.com --- configure.ac | 10 + po/POTFILES.in | 3 +- src/Makefile.am | 5

Re: [libvirt] [PATCH 3/4] util: introduce new helpers to manage shmem device

2015-08-02 Thread Luyao Huang
On 07/30/2015 06:12 PM, Daniel P. Berrange wrote: On Thu, Jul 23, 2015 at 06:13:48PM +0800, Luyao Huang wrote: Signed-off-by: Luyao Huang lhu...@redhat.com --- configure.ac | 10 + po/POTFILES.in | 3 +- src/Makefile.am | 5 +- src/libvirt_private.syms

Re: [libvirt] [PATCH 2/4] security: add security part for shmem device

2015-08-02 Thread Luyao Huang
On 07/30/2015 05:54 PM, Daniel P. Berrange wrote: On Thu, Jul 23, 2015 at 06:13:47PM +0800, Luyao Huang wrote: A new api to help set/restore the shmem deivce dac/selinux label. s/deivce/device/ Thanks, i will fix in next version Signed-off-by: Luyao Huang lhu...@redhat.com --- src

[libvirt] [python PATCH] examples: small fix for nodestats.py example

2015-07-30 Thread Luyao Huang
Add nodestats.py in MANIFEST.in and add a small description for nodestats.py in README Signed-off-by: Luyao Huang lhu...@redhat.com --- MANIFEST.in | 1 + examples/README | 3 +++ 2 files changed, 4 insertions(+) diff --git a/MANIFEST.in b/MANIFEST.in index b5ba783..0d66f9c 100644

[libvirt] [PATCH] virsh: fix domfsinfo wrong output in quiet mode

2015-08-04 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1250287 When run domfsinfo in quiet mode, we cannot get any useful information (just get \n), this is because we didn't use vshPrint to print useful information. Signed-off-by: Luyao Huang lhu...@redhat.com --- tools/virsh-domain.c | 6 +++--- 1 file

[libvirt] [PATCH] qemu: fix the error cover issue in qemuDomainAddCgroupForThread

2015-08-14 Thread Luyao Huang
Just like commit 704cf06, the error already will be set in virCgroup* function, and virCgroupAddTask will return -1, so We will always report error Operation not permitted in this place. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 3 --- 1 file changed, 3 deletions

[libvirt] [PATCH] lib: fix no zero arg check for iothread_id

2015-08-10 Thread Luyao Huang
it. Signed-off-by: Luyao Huang lhu...@redhat.com --- Is that okay to fix it in this place ? src/libvirt-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 837933f..8506942 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -7987,6

Re: [libvirt] [PATCH] lib: fix no zero arg check for iothread_id

2015-08-10 Thread Luyao Huang
On 08/10/2015 09:17 PM, John Ferlan wrote: On 08/10/2015 05:23 AM, Peter Krempa wrote: On Mon, Aug 10, 2015 at 17:06:31 +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1251886 We do not allow delete an iothread which id is 0 in virDomainDelIOThread, but allow

[libvirt] [PATCH] qemu: add a check for nodeset in qemuDomainSetNumaParamsLive

2015-08-14 Thread Luyao Huang
We will try to set the node to cpuset.mems without check if it is available, since we already have helper to check this. Call virNumaNodesetIsAvailable to check if node is available, then try to change it in the cgroup. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 3

[libvirt] [PATCH] qemu: fix the error cover issue in SetMemoryParameters

2015-07-22 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1245476 We won't return the errno after commit 0d7f45ae, and the more clearly error will be set in the code in vircgroup*. Also We will always report error Operation not permitted, because the return is -1. Signed-off-by: Luyao Huang lhu...@redhat.com

[libvirt] [PATCH 2/4] security: add security part for shmem device

2015-07-23 Thread Luyao Huang
A new api to help set/restore the shmem deivce dac/selinux label. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt_private.syms| 2 ++ src/security/security_dac.c | 67 +++ src/security/security_driver.h | 11 +++ src/security

[libvirt] [PATCH 1/4] conf: introduce seclabels in shmem device element

2015-07-23 Thread Luyao Huang
Introduce a new element in shmem device element, this could help users to change the shm label to a specified label. Signed-off-by: Luyao Huang lhu...@redhat.com --- docs/formatdomain.html.in | 7 ++ docs/schemas/domaincommon.rng | 3 +++ src/conf/domain_conf.c| 55

[libvirt] [PATCH 4/4] qemu: call the helpers in virshm.c to manage shmem device

2015-07-23 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_conf.h| 3 + src/qemu/qemu_driver.c | 4 ++ src/qemu/qemu_process.c | 158 3 files changed, 165 insertions(+) diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index

[libvirt] [PATCH 3/4] util: introduce new helpers to manage shmem device

2015-07-23 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- configure.ac | 10 + po/POTFILES.in | 3 +- src/Makefile.am | 5 +- src/libvirt_private.syms | 16 ++ src/util/virshm.c| 623 +++ src/util/virshm.h

[libvirt] [PATCH 0/4] manage the shmem device source

2015-07-23 Thread Luyao Huang
progrem, then setup the ivshmem-server by libvirt. we cannot do nothing for the ivshmem-server right now. Luyao Huang (4): conf: introduce seclabels in shmem device element security: add security part for shmem device util: introduce new helpers to manage shmem device qemu: call

[libvirt] [PATCH 2/2] test: introduce a function in test driver to check get vcpupin info

2015-07-14 Thread Luyao Huang
As there is a regression in use vcpupin get info, introduce a new function to test the virsh client. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/test/test_driver.c | 55 ++ tests/vcpupin | 34 +++ 2

[libvirt] [PATCH 0/2] fix the error when get the vcpupin info and add a test

2015-07-14 Thread Luyao Huang
I was so ashamed of writing a incorrect commit '848ab68' and didn't test with it. Patch 1/2 fix the issue and Patch 2/2 introduce a test for it. Luyao Huang (2): virsh: really fix the error if vcpu number exceed the guest maxvcpu number test: introduce a function in test driver for check

[libvirt] [PATCH 1/2] virsh: really fix the error if vcpu number exceed the guest maxvcpu number

2015-07-14 Thread Luyao Huang
Commit '848ab68' left a issue: when we try to get a vcpupin info with no no flags or --current flags, we still will get the wrong error. Because VIR_DOMAIN_AFFECT_CURRENT is 0, so this check flags VIR_DOMAIN_AFFECT_CURRENT will always get false. Signed-off-by: Luyao Huang lhu...@redhat.com

[libvirt] [PATCH] qemu: fix the audit log is not correct after hot-plug memory success

2015-07-17 Thread Luyao Huang
the audit log will not right in that case. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_hotplug.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 1ea397f..cf7ffa9 100644

[libvirt] [PATCH] qemu: fix some api cannot work when disable cpuset in conf

2015-07-20 Thread Luyao Huang
. hot add iothread. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_cgroup.c | 16 src/qemu/qemu_driver.c | 10 +++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 8ed74ee..640a223 100644

[libvirt] [PATCH] qemu: fix migration flags undefinesource cannot work

2015-10-27 Thread Luyao Huang
In commit f41be296, we moved vm->persistent check into qemuDomainRemoveInactive, but we didn't change the vm->persistent before call qemuDomainRemoveInactive in some place before and just call it to remove the inactive vm. Signed-off-by: Luyao Huang <lhu...@redhat.com> -

[libvirt] [PATCH] libvirt-domain: fix no error report when p2p migrate fail

2015-10-27 Thread Luyao Huang
After commit a26669d7, we only jump to error when virDomainMigrateUnmanagedParams return a value less than -1. this will make the migrate result always be success even we meet some problem. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/libvirt-domain.c | 2 +- 1 file chan

[libvirt] [PATCH] libvirt-domain: fix the error reporting when use the localhost as target uri

2015-10-27 Thread Luyao Huang
Remove the extra %s in error message when call virReportInvalidArg(). Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/libvirt-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 14aeb09..de7eb04 100644 ---

[libvirt] [PATCH] util: remove unnecessary code to avoid error overwrite

2015-10-28 Thread Luyao Huang
virCgroupRemove use VIR_ERROR to log the error and won't change the virLastErr in the thread, so no need do this. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/util/vircgroup.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircg

Re: [libvirt] [libvirt-test-api][PATCH 0/2]Fix issues in the method of getting vcpu thread id of vcpupin_live and cpu_affinity

2015-10-29 Thread Luyao Huang
ACK to all of them BR, Luyao - Original Message - From: "Hongming Zhang" To: libvir-list@redhat.com Sent: Thursday, October 29, 2015 3:19:29 PM Subject: [libvirt] [libvirt-test-api][PATCH 0/2]Fix issues in the method of getting vcpu thread id of vcpupin_live

[libvirt] [PATCH] util: set error if DAD is not finished

2015-10-29 Thread Luyao Huang
If DAD not finished in 5 seconds, user will get an unknown error like this: # virsh net-start ipv6 error: Failed to start network ipv6 error: An error occurred, but the cause is unknown Call virReportError to set an error. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- I found t

[libvirt] [PATCHv2] virsh: fix no error when pass a count <= 0 to setvcpus

2015-10-21 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1248277 When count <= 0, the client exit without set an error. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- v2: - use vshCommandOptUInt to forbid negative number, and check if count is zero. (thanks Peter and Andrea) tools/virsh-dom

[libvirt] [PATCH] conf: fix set the wrong fromconfig when specify addr in config

2015-10-19 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1238338#c6 If the user already specify address in xml, we will set the wrong $fromConfig, which will make libvirt output a wrong error message and make hot-plug fail when hot-plug a pci device (see commit 1e15be1 and 9a12b6c). Signed-off-by: Luyao

[libvirt] [PATCH] conf: Add serial target type to ABI stability check

2015-10-21 Thread Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1273686 There is no ABI check for serial target type attribute, just add it. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/conf/domain_conf.c | 8 1 file changed, 8 insertions(+) diff --git a/src/conf/domain_conf.c b/sr

[libvirt] [PATCHv2 0/3] improve the error report for virNodeAllocPages and virNodeGetFreePages

2015-10-20 Thread Luyao Huang
v1: https://www.redhat.com/archives/libvir-list/2015-September/msg01054.html v2: -improve the error message -improve the code struct -add a new patch for rework the exist way to check node and page size Luyao Huang (3): util: split the virNumaGetHugePageInfoPath into separate function util

[libvirt] [PATCH 2/3] util: move the pagesize and node check and error report to one place

2015-10-20 Thread Luyao Huang
--pagesize 2047 --pagecount 1 error: operation failed: page size 2047 is not available Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/util/virnuma.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/util/virnuma.c b/src/util/virnuma.c

[libvirt] [PATCHv2 1/3] util: split the virNumaGetHugePageInfoPath into separate function

2015-10-20 Thread Luyao Huang
the virNumaGetHugePageInfoPath will build the directory of system path, but we don't want that. Introduce a new helper to build the dir path could avoid this issue. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/util/virnuma.c | 51 +++

[libvirt] [PATCHv2 3/3] util: Produce friendlier error message to user

2015-10-20 Thread Luyao Huang
/node0/hugepages/hugepages-1kB/free_hugepages':No such file or directory Add two checks to catch this and therefore produce much more friendlier error messages. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/util/virnuma.c | 38 ++ 1 file chang

[libvirt] [PATCH] qemu: fix wrong nodeset info when numatune placement is auto

2015-10-12 Thread Luyao Huang
-by: Luyao Huang <lhu...@redhat.com> --- src/qemu/qemu_driver.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8cd5ee3..8ca55dd 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -10177,6 +1

[libvirt] [PATCH] qemu: fix no error settings if fail to find a disk match path

2015-07-08 Thread Luyao Huang
in the callers function. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 900740e..f134248 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c

[libvirt] [libvirt-test-api][PATCH] Add new test case for allocPages API

2015-08-28 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- cases/test_connection.conf | 4 ++ repos/virconn/connection_allocPages.py | 88 ++ 2 files changed, 92 insertions(+) create mode 100644 repos/virconn/connection_allocPages.py diff --git a/cases

[libvirt] [PATCHv2 1/5] conf: introduce seclabels in shmem device element

2015-08-27 Thread Luyao Huang
Introduce a new element in shmem device element, this could help users to change the shm label to a specified label. Signed-off-by: Luyao Huang lhu...@redhat.com --- docs/formatdomain.html.in | 7 ++ docs/schemas/domaincommon.rng | 3 + src/conf

[libvirt] [PATCHv2 3/5] util: introduce new helpers to manage shmem device

2015-08-27 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- configure.ac | 10 + po/POTFILES.in | 3 +- src/Makefile.am | 7 +- src/libvirt_private.syms | 24 ++ src/util/virshm.c| 739 +++ src/util/virshm.h

[libvirt] [PATCHv2 4/5] security: add security part for shmem device

2015-08-27 Thread Luyao Huang
A new api to help set/restore the shmem device label. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt_private.syms| 2 + src/security/security_dac.c | 100 src/security/security_driver.h | 9 src/security

[libvirt] [PATCHv2 2/5] conf: introduce shareable in shmem device element

2015-08-27 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- docs/formatdomain.html.in | 5 +++ docs/schemas/domaincommon.rng | 5 +++ src/conf/domain_conf.c | 6 +++ src/conf/domain_conf.h | 1

[libvirt] [PATCHv2 0/5] manage the shmem device source

2015-08-27 Thread Luyao Huang
, i think we could use that way in this place. Luyao Huang (5): conf: introduce seclabels in shmem device element conf: introduce shareable in shmem device element util: introduce new helpers to manage shmem device security: add security part for shmem device qemu: call the helpers

[libvirt] [PATCHv2 5/5] qemu: call the helpers in virshm.c to manage shmem device

2015-08-27 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_conf.h| 3 + src/qemu/qemu_driver.c | 4 ++ src/qemu/qemu_process.c | 157 3 files changed, 164 insertions(+) diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index

[libvirt] [libvirt-python][PATCH] generator: fix build fail with old xml lib

2015-09-01 Thread Luyao Huang
will get error. Let's use 'YYY in XXX.keys()' to avoid this issue. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator.py b/generator.py index 2fc838c..d9ae17e 100755 --- a/generator.py +++ b/generator.py

[libvirt] [PATCH] conf: fix crash when parse a disordered numa settings

2015-09-07 Thread Luyao Huang
-by: Luyao Huang <lhu...@redhat.com> --- src/conf/numa_conf.c | 10 +--- .../qemuxml2argv-cpu-numa-disordered.xml | 26 +++ .../qemuxml2xmlout-cpu-numa-disordered.xml | 29 ++ tests/qemuxml2xml

[libvirt] [libvirt-test-api][PATCH 1/2] introduce a new helper to parse mountinfo

2015-09-13 Thread Luyao Huang
And will return list like this : [{'devminor': '25', 'mountdir': '/sys/fs/cgroup/cpuset', 'devmajor': '0', 'mounttype': 'cgroup'},...] Signed-off-by: Luyao Huang <lhu...@redhat.com> --- utils/utils.py | 37 + 1 file changed, 37 insertions(+) diff

[libvirt] [libvirt-test-api][PATCH 2/2] Add a new test case for fsinfo API

2015-09-13 Thread Luyao Huang
Signed-off-by: Luyao Huang <lhu...@redhat.com> --- cases/linux_domain.conf | 10 + repos/domain/fsinfo.py | 103 2 files changed, 113 insertions(+) create mode 100644 repos/domain/fsinfo.py diff --git a/cases/linux_domain.conf b

[libvirt] [PATCH 2/2] util: Produce friendlier error message to user

2015-09-29 Thread Luyao Huang
/hugepages/hugepages-1kB/free_hugepages': No such file or directory Add two checks to catch this and therefore produce much more friendlier error messages. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/util/virnuma.c | 12 1 file changed, 12 insertions(+) diff --git

[libvirt] [PATCH 0/2] improve the error in 2 function

2015-09-29 Thread Luyao Huang
*** BLURB HERE *** Luyao Huang (2): util: split the virNumaGetHugePageInfoPath into separate function util: Produce friendlier error message to user src/util/virnuma.c | 54 ++ 1 file changed, 30 insertions(+), 24 deletions(-) -- 1.8.3.1

[libvirt] [PATCH 1/2] util: split the virNumaGetHugePageInfoPath into separate function

2015-09-29 Thread Luyao Huang
the virNumaGetHugePageInfoPath will build the directory of system path, but we don't want that. Introduce a new helper to build the dir path could avoid this issue. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/util/virnuma.c | 42 ++ 1 file chang

[libvirt] [libvirt-test-api][PATCH] Add a new test case for setUserPassword

2015-09-21 Thread Luyao Huang
Signed-off-by: Luyao Huang <lhu...@redhat.com> --- cases/linux_domain.conf | 22 repos/domain/set_user_passwd.py | 111 2 files changed, 133 insertions(+) create mode 100644 repos/domain/set_user_passwd.py diff --git a

[libvirt] [PATCH] Add a new test case for setUserPassword

2015-09-21 Thread Luyao Huang
Signed-off-by: Luyao Huang <lhu...@redhat.com> --- cases/linux_domain.conf | 22 repos/domain/set_user_passwd.py | 111 2 files changed, 133 insertions(+) create mode 100644 repos/domain/set_user_passwd.py diff --git a

Re: [libvirt] [PATCH] Add a new test case for setUserPassword

2015-09-21 Thread Luyao Huang
Please ignore this one, i have forgot set the header. - Original Message - From: "Luyao Huang" <lhu...@redhat.com> To: libvir-list@redhat.com Cc: "Luyao Huang" <lhu...@redhat.com> Sent: Monday, September 21, 2015 3:27:02 PM Subject: [libv

[libvirt] [PATCH] Makefile: fix build fail when make rpm

2015-09-22 Thread Luyao Huang
Build fail and error like this: CC qemu/libvirt_driver_qemu_impl_la-qemu_command.lo qemu/qemu_capabilities.c:46:27: fatal error: qemu_capspriv.h: No such file or directory #include "qemu_capspriv.h" Add qemu_capspriv.h to source. Signed-off-by: Luyao Huang <lhu...@redhat.

[libvirt] [libvirt-test-api][PATCHv2] Add new test case for allocPages API

2015-09-21 Thread Luyao Huang
Signed-off-by: Luyao Huang <lhu...@redhat.com> --- cases/test_connection.conf | 10 repos/virconn/connection_allocPages.py | 84 ++ 2 files changed, 94 insertions(+) create mode 100644 repos/virconn/connection_allocPages.py diff --git a

[libvirt] [PATCH] conf: escape string for disk driver name attribute

2015-09-22 Thread Luyao Huang
Just like e92e5ba1, this attribute was missed. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/conf/domain_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a3b3ccb..85c2d0d 100644 --- a/sr

[libvirt] somtimes libvirtd crashed when fail to start a guest, need help to debug

2015-12-08 Thread Luyao Huang
Dear list, I met a problem when test with the latest libvirt (build from current master branch), i found sometimes libvirtd crashed when guest fail to start. the reproduce way is very easy, but hard to meet: # cat /root/shdo2.sh #!/bin/sh while : do virsh start rhel7.0-rhel done # sh

[libvirt] [PATCHv2 0/4] Implement shared memory device (cold) hot-plug/unplug

2015-11-26 Thread Luyao Huang
v1: https://www.redhat.com/archives/libvir-list/2015-June/msg00830.html These patches implement the hot-plug/hot-unplug and cold-plug/cold-unplug for Inter-VM Shared Memory PCI device. Luyao Huang (4): conf: Add helpers to insert/remove/find shmem devices in domain def qemu: Implement shared

[libvirt] [PATCHv2 1/4] conf: Add helpers to insert/remove/find shmem devices in domain def

2015-11-26 Thread Luyao Huang
The helpers will be useful when implementing hotplug and coldplug of shared memory devices. Signed-off-by: Luyao Huang <lhu...@redhat.com> --- src/conf/domain_conf.c | 66 src/conf/domain_conf.h | 7 + src/libvirt_private.syms | 3

<    1   2   3   4   >