Re: [libvirt] [PATCH] virsh: Fix vcpupin command output wrong vcpu pinning info

2018-12-19 Thread lhuang
On 12/19/2018 05:27 PM, Michal Privoznik wrote: On 12/19/18 4:17 AM, Luyao Huang wrote: Commit 3072ded3 changed the waya to format the vcpu pinning info and forget to get cpumap for each vcpu during the loop, that cause vcpupin command will display vcpu 0 info for other vcpus.

Re: [libvirt] [PATCH] qemu: domain: validate memory access during validate domain config

2018-08-27 Thread lhuang
On 08/28/2018 06:01 AM, John Ferlan wrote: On 08/20/2018 05:48 AM, Luyao Huang wrote: commit 6534b3c4 try to raise an error when there is no numa nodes but set access='shared' in domain config. In that commit, we add a memory access validate function for memory device, but this check is not

Re: [libvirt] [PATCH] qemu: Make sure shmem memory is shared

2016-11-10 Thread lhuang
I have test this patch, and it works well. After this patch, Libvirt can generate share=yes in ivshmem-plain memory backend command line: # ps aux|grep r7 ... -object memory-backend-file,id=shmmem-shmem0,mem-path=/dev/shm/my_shmem1,size=4194304,share=yes -device

Re: [libvirt] [PATCH] tests: add missed directories in EXTRA_DIST

2016-07-12 Thread lhuang
On 07/12/2016 05:41 PM, Martin Kletzander wrote: On Tue, Jul 12, 2016 at 04:28:22PM +0800, Luyao Huang wrote: In commit ec5dcf2a and b0b4a35c, we have moved some xml to new directories, but forget fix the Makefile. Add 2 directories in EXTRA_DIST to fix broken vpath build. Signed-off-by:

Re: [libvirt] [PATCH] virsh: fix cpu-stats command output format issue

2016-01-26 Thread lhuang
On 01/26/2016 04:24 PM, Peter Krempa wrote: On Tue, Jan 26, 2016 at 10:25:05 +0800, Luyao Huang wrote: After commit 57177f1, the cpu-stats command format change to: CPU0: cpu_time 14401.507878990 seconds vcpu_time14378732785511 vcpu_time is not user friendly. After

Re: [libvirt] [PATCHv2 4/4] qemu: Implement shared memory device hot-unplug

2015-12-20 Thread lhuang
On 12/21/2015 10:24 AM, lhuang wrote: On 12/17/2015 08:26 PM, John Ferlan wrote: On 12/16/2015 09:43 PM, lhuang wrote: On 12/15/2015 08:39 PM, John Ferlan wrote: [...] +if (rc < 0) +return -1; + I know this is a copy of the RemoveRNGDevice; however, this code does

Re: [libvirt] [PATCHv2 4/4] qemu: Implement shared memory device hot-unplug

2015-12-20 Thread lhuang
On 12/17/2015 08:26 PM, John Ferlan wrote: On 12/16/2015 09:43 PM, lhuang wrote: On 12/15/2015 08:39 PM, John Ferlan wrote: [...] +if (rc < 0) +return -1; + I know this is a copy of the RemoveRNGDevice; however, this code doesn't remove an 'obj'. In fact, if !sh

Re: [libvirt] [PATCHv2 4/4] qemu: Implement shared memory device hot-unplug

2015-12-16 Thread lhuang
On 12/15/2015 08:39 PM, John Ferlan wrote: [...] +if (rc < 0) +return -1; + I know this is a copy of the RemoveRNGDevice; however, this code doesn't remove an 'obj'. In fact, if !shmem->server.enabled, then we don't enter the monitor at all. Thus the following event probably

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

2015-12-15 Thread lhuang
On 12/10/2015 08:50 AM, John Ferlan wrote: On 11/26/2015 04:06 AM, Luyao Huang wrote: The helpers will be useful when implementing hotplug and coldplug of shared memory devices. Signed-off-by: Luyao Huang --- src/conf/domain_conf.c | 66

Re: [libvirt] [PATCHv2 3/4] qemu: Implement share memory device hot-plug

2015-12-15 Thread lhuang
On 12/10/2015 09:23 AM, John Ferlan wrote: $SUBJ s/share/shared thanks for pointing out this On 11/26/2015 04:06 AM, Luyao Huang wrote: Signed-off-by: Luyao Huang --- src/qemu/qemu_driver.c | 10 - src/qemu/qemu_hotplug.c | 58

Re: [libvirt] [PATCHv2 4/4] qemu: Implement shared memory device hot-unplug

2015-12-15 Thread lhuang
On 12/10/2015 09:43 AM, John Ferlan wrote: On 11/26/2015 04:07 AM, Luyao Huang wrote: Signed-off-by: Luyao Huang --- src/qemu/qemu_driver.c | 4 ++- src/qemu/qemu_hotplug.c | 94 - src/qemu/qemu_hotplug.h | 3 ++ 3

Re: [libvirt] [PATCHv2 2/4] qemu: Implement shared memory device cold (un)plug

2015-12-15 Thread lhuang
On 12/10/2015 08:53 AM, John Ferlan wrote: On 11/26/2015 04:06 AM, Luyao Huang wrote: Add support for using the attach/detach device APIs on the inactive configuration to add/del shared memory devices. Signed-off-by: Luyao Huang --- src/libvirt_private.syms | 1 +

Re: [libvirt] [PATCH v2 00/10] Make loading domains with invalid XML possible

2015-12-02 Thread lhuang
On 12/02/2015 01:35 AM, Martin Kletzander wrote: We always had to deal with new parsing errors in a weird way. All of them needed to go into functions starting the domains. That messes up the code, it's confusing to newcomers and so on. I once had an idea that we can handle this stuff. We

Re: [libvirt] [PATCH v2 00/10] Make loading domains with invalid XML possible

2015-12-02 Thread lhuang
On 12/02/2015 05:13 PM, Martin Kletzander wrote: On Wed, Dec 02, 2015 at 04:46:20PM +0800, lhuang wrote: On 12/02/2015 01:35 AM, Martin Kletzander wrote: We always had to deal with new parsing errors in a weird way. All of them needed to go into functions starting the domains

Re: [libvirt] Ten years of libvirt

2015-11-03 Thread lhuang
Wow !! so cool ! Luyao On 11/03/2015 04:07 PM, Cedric Bosdonnat wrote: Hi all, This is my present for this 10 years anniversary: enjoy watching how you made libvirt grow fantastically in this gource video: https://vimeo.com/144404779 Happy anniversary (with delay)! -- Cedric On Mon,

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

2015-10-29 Thread lhuang
On 10/30/2015 02:15 AM, Laine Stump wrote: On 10/29/2015 08:32 AM, Maxim Perevedentsev wrote: On 10/29/2015 12:47 PM, Luyao Huang wrote: 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

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

2015-10-29 Thread lhuang
On 10/29/2015 08:32 PM, Maxim Perevedentsev wrote: On 10/29/2015 12:47 PM, Luyao Huang wrote: 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

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

2015-10-28 Thread lhuang
On 10/29/2015 04:54 AM, John Ferlan wrote: On 10/12/2015 05:28 AM, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1270715 Since commit 9deb96f remove check the nodeset from cgroup for a running vm, the numatune nodeset reporting for those guest numatune placement is auto is

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

2015-10-28 Thread lhuang
On 10/29/2015 05:21 AM, John Ferlan wrote: On 10/28/2015 03:06 AM, Luyao Huang wrote: 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 --- src/util/vircgroup.c | 10 --

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

2015-10-27 Thread lhuang
On 10/27/2015 05:45 PM, Martin Kletzander wrote: On Wed, Oct 21, 2015 at 03:14:03PM +0800, Luyao Huang wrote: 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 ---

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

2015-10-27 Thread lhuang
On 10/27/2015 05:45 PM, Martin Kletzander wrote: On Tue, Oct 27, 2015 at 04:53:59PM +0800, Luyao Huang wrote: 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

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

2015-10-22 Thread lhuang
On 10/22/2015 03:32 PM, Andrea Bolognani wrote: On Thu, 2015-10-22 at 11:27 +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1248277 When count <= 0, the client exit without set an error. Signed-off-by: Luyao Huang --- v2: - use vshCommandOptUInt to

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

2015-10-21 Thread lhuang
On 10/21/2015 09:58 PM, John Ferlan wrote: On 10/21/2015 12:13 AM, Luyao Huang wrote: Commit 1c24cfe9 fix the problem in virNumaSetPagePoolSize, this patch just like it and fix the issue in another function. when user use freepages and specify a invalid node or page size, will get error

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

2015-10-21 Thread lhuang
On 10/21/2015 05:28 PM, Andrea Bolognani wrote: On Wed, 2015-10-21 at 17:01 +0800, lhuang wrote: Hi peter and andrea, I was fixing some issue in virsh client and find this old problem, can i post a new version of this patch ? Right. I guess you could use my version of the patch

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

2015-10-21 Thread lhuang
On 10/20/2015 11:38 AM, Luyao Huang wrote: 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

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

2015-10-21 Thread lhuang
Hi peter and andrea, I was fixing some issue in virsh client and find this old problem, can i post a new version of this patch ? Thanks, Luyao On 07/30/2015 04:47 PM, Andrea Bolognani wrote: On Thu, 2015-07-30 at 10:05 +0200, Peter Krempa wrote: On Thu, Jul 30, 2015 at 09:51:15 +0200,

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

2015-10-12 Thread lhuang
On 10/09/2015 10:27 PM, John Ferlan wrote: On 10/08/2015 05:12 AM, lhuang wrote: On 10/02/2015 11:54 PM, John Ferlan wrote: On 09/30/2015 12:01 AM, Luyao Huang wrote: Commit 1c24cfe9 fix the problem in virNumaSetPagePoolSize, this patch just like it and fix the issue in another function

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

2015-10-08 Thread lhuang
On 10/02/2015 11:49 PM, John Ferlan wrote: On 09/30/2015 12:01 AM, Luyao Huang wrote: Commit 1c24cfe9 fix the problem in virNumaSetPagePoolSize, this patch just like it and fix the issue in another function. when user use freepages and specify a invalid node or page size, will get error

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

2015-10-08 Thread lhuang
On 10/02/2015 11:54 PM, John Ferlan wrote: On 09/30/2015 12:01 AM, Luyao Huang wrote: Commit 1c24cfe9 fix the problem in virNumaSetPagePoolSize, this patch just like it and fix the issue in another function. when user use freepages and specify a invalid node or page size, will get error

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

2015-10-08 Thread lhuang
Sorry for the delay, i just came back from a long holiday. On 10/02/2015 11:49 PM, John Ferlan wrote: On 09/30/2015 12:01 AM, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1265114 When pass 0 page_size to virNumaGetHugePageInfoPath function, we will get fail like this:

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

2015-09-23 Thread lhuang
On 09/23/2015 05:54 PM, Martin Kletzander wrote: On Tue, Sep 22, 2015 at 04:13:53PM +0800, Luyao Huang wrote: Just like e92e5ba1, this attribute was missed. Signed-off-by: Luyao Huang --- src/conf/domain_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ACK

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

2015-09-23 Thread lhuang
On 09/23/2015 02:44 PM, Ján Tomko wrote: On Wed, Sep 23, 2015 at 10:09:47AM +0800, Luyao Huang wrote: 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

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

2015-09-22 Thread lhuang
On 09/21/2015 06:09 PM, Michal Privoznik wrote: On 02.09.2015 07:58, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1222795#c6 if build libvirt-python with some old xml lib (python-pyxml), build will fail and error like this: File "generator.py", line 139, in start

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

2015-09-08 Thread lhuang
On 09/08/2015 04:40 PM, Michal Privoznik wrote: On 08.09.2015 06:59, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1260846 Introduced by 8fedbbdb, if we parse the disordered numa cell, will get segfault. This is because we allow parse the numa cell not in order and we alloc

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

2015-08-26 Thread lhuang
On 08/27/2015 06:06 AM, John Ferlan wrote: On 07/30/2015 10:19 PM, Luyao Huang wrote: 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

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

2015-08-26 Thread lhuang
On 08/27/2015 05:54 AM, John Ferlan wrote: On 08/13/2015 10:15 AM, Luyao Huang wrote: First review: http://www.redhat.com/archives/libvir-list/2015-July/msg00982.html Change in v2: - split it to two patches - fix some small mistake in hot-unplug part I change the code in

Re: [libvirt] [PATCH] qemu: Label correct per-VM path when starting

2015-08-25 Thread lhuang
On 08/25/2015 05:53 PM, Martin Kletzander wrote: Commit f1f68ca33433825ce0deed2d96f1990200bc6618 overused mdir_name() event though it was not needed in the latest version, hence labelling directory one level up in the tree and not the one it should. If anyone with SElinux managed to try run a

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

2015-08-25 Thread lhuang
On 08/26/2015 04:22 AM, John Ferlan wrote: On 08/18/2015 11:56 PM, Luyao Huang wrote: 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

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

2015-08-24 Thread lhuang
On 08/24/2015 08:52 PM, Martin Kletzander wrote: On Fri, Aug 14, 2015 at 05:37:28PM +0800, Luyao Huang wrote: 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,

Re: [libvirt] [libvirt-test-api][PATCH 3/3] Add a new case for getCPUStatus

2015-08-23 Thread lhuang
On 08/24/2015 11:41 AM, hongming wrote: On 06/02/2015 07:57 AM, hongming wrote: ACK and pushed Don't forget to remove trailing whitespace next time. Thanks Hongming On 05/18/2015 09:28 AM, Luyao Huang wrote: Signed-off-by: Luyao Huang lhu...@redhat.com --- cases/linux_domain.conf| 6

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

2015-08-18 Thread lhuang
On 08/19/2015 01:40 AM, John Ferlan wrote: On 08/14/2015 02:59 AM, Luyao Huang wrote: 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:

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

2015-08-18 Thread lhuang
On 08/19/2015 02:17 AM, Michal Privoznik wrote: On 14.08.2015 08:59, Luyao Huang wrote: 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:

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

2015-08-18 Thread lhuang
On 08/19/2015 01:32 AM, John Ferlan wrote: On 08/12/2015 09:53 PM, Luyao Huang wrote: 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

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

2015-08-18 Thread lhuang
On 08/18/2015 08:56 PM, Erik Skultety wrote: On 17/08/15 11:56, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1254152 When we use some virsh cmd which need specify domain name/id/uuid, if the command get failure we will get error like this: # virsh domif-setlink 123 vnet1

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

2015-08-17 Thread lhuang
On 08/18/2015 12:53 AM, John Ferlan wrote: On 08/17/2015 01:21 AM, Luyao Huang wrote: *** 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 |

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

2015-08-10 Thread lhuang
On 08/10/2015 05:23 PM, 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 it in virDomainAddIOThread, Also we will output an

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

2015-08-05 Thread lhuang
On 08/05/2015 04:05 PM, Ján Tomko wrote: On Wed, Aug 05, 2015 at 11:17:22AM +0800, Luyao Huang wrote: 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

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

2015-08-03 Thread lhuang
On 07/31/2015 08:33 PM, Martin Kletzander wrote: On Mon, Jul 20, 2015 at 05:18:37PM +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1244664 If user disable cpuset in qemu.conf, we shouldn't try to use it, also shouldn't make some command which can work without cpuset

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

2015-08-03 Thread lhuang
On 07/30/2015 06:28 PM, Daniel P. Berrange wrote: On Thu, Jul 23, 2015 at 06:13:46PM +0800, Luyao Huang wrote: 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 ---

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

2015-08-03 Thread lhuang
On 07/30/2015 06:25 PM, Daniel P. Berrange wrote: On Thu, Jul 23, 2015 at 06:13:49PM +0800, Luyao Huang wrote: 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

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

2015-08-03 Thread lhuang
Hi Marc-André On 07/27/2015 11:52 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 --- src/qemu/qemu_conf.h| 3 + src/qemu/qemu_driver.c | 4 ++ src/qemu/qemu_process.c | 158

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

2015-08-03 Thread lhuang
On 07/30/2015 06:23 PM, Daniel P. Berrange wrote: On Thu, Jul 23, 2015 at 06:13:49PM +0800, Luyao Huang wrote: 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

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

2015-07-30 Thread lhuang
Hi Marc-André On 07/27/2015 11:42 PM, Marc-André Lureau wrote: Hi On Thu, Jul 23, 2015 at 12:13 PM, Luyao Huang lhu...@redhat.com wrote: 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

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

2015-07-30 Thread lhuang
On 07/30/2015 05:48 PM, Daniel P. Berrange wrote: On Thu, Jul 23, 2015 at 06:13:46PM +0800, Luyao Huang wrote: 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 ---

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

2015-07-30 Thread lhuang
On 07/30/2015 03:29 PM, Andrea Bolognani wrote: On Thu, 2015-07-30 at 10:57 +0800, Luyao Huang wrote: 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 +-

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

2015-07-29 Thread lhuang
On 07/28/2015 12:05 AM, Daniel P. Berrange wrote: On Mon, Jul 27, 2015 at 03:40:36PM +0100, Daniel P. Berrange wrote: On Mon, Jul 27, 2015 at 04:09:01PM +0200, Marc-André Lureau wrote: Hi Luyao On Thu, Jul 23, 2015 at 12:13 PM, Luyao Huanglhu...@redhat.com wrote: But the problem is we

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

2015-07-28 Thread lhuang
Hi Marc-André On 07/27/2015 10:09 PM, Marc-André Lureau wrote: Hi Luyao On Thu, Jul 23, 2015 at 12:13 PM, Luyao Huang lhu...@redhat.com wrote: But the problem is we cannot change the running shm-server process label, We need wait ivshmem-server to be a part of qemu progrem, then setup the

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

2015-07-27 Thread lhuang
On 07/24/2015 08:14 PM, John Ferlan wrote: On 07/17/2015 04:52 AM, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1226234#c3 After hot-plug a memory device success, the audit log show that memory update failed: type=VIRT_RESOURCE ... old-mem=1024000 new-mem=1548288 \

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

2015-07-26 Thread lhuang
On 07/24/2015 06:52 PM, John Ferlan wrote: On 07/14/2015 09:10 AM, Luyao Huang wrote: 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

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

2015-07-22 Thread lhuang
On 07/22/2015 05:06 PM, Martin Kletzander wrote: On Wed, Jul 22, 2015 at 03:35:14PM +0800, Luyao Huang wrote: 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

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

2015-07-14 Thread lhuang
On 07/15/2015 05:21 AM, John Ferlan wrote: On 07/14/2015 09:10 AM, Luyao Huang wrote: 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

Re: [libvirt] [PATCH] RFC: audit: add shmem resource type

2015-07-12 Thread lhuang
Hi Marc-André: On 07/13/2015 05:49 AM, Marc-André Lureau wrote: On Sun, Jul 12, 2015 at 12:36 PM, Martin Kletzander mklet...@redhat.com wrote: As said in previous attempt by Luyao to do this, the auditing should be handled differently, there's also lot more info to audit. Thanks for the

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

2015-07-09 Thread lhuang
On 07/09/2015 11:49 AM, Luyao Huang wrote: When we use get blockjob info to a unexist disk path, we will get a error like this: # virsh blockjob r7 vdc error: An error occurred, but the cause is unknown This is because we do not set the error when jump to endjob. As virDomainDiskByName

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

2015-07-09 Thread lhuang
On 07/09/2015 02:37 PM, Martin Kletzander wrote: On Thu, Jul 09, 2015 at 11:49:15AM +0800, Luyao Huang wrote: When we use get blockjob info to a unexist disk path, we will get a error like this: # virsh blockjob r7 vdc error: An error occurred, but the cause is unknown This is because we do

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

2015-07-09 Thread lhuang
On 07/09/2015 02:09 PM, Martin Kletzander wrote: On Thu, Jul 09, 2015 at 11:44:30AM +0800, lhuang wrote: On 07/08/2015 08:14 PM, Martin Kletzander wrote: On Wed, Jun 17, 2015 at 11:56:17AM +0800, Luyao Huang wrote: The helpers will be useful when implementing hotplug and coldplug of shared

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

2015-07-08 Thread lhuang
On 07/08/2015 04:57 PM, Michal Privoznik wrote: On 03.07.2015 08:58, Luyao Huang wrote: When use setvcpus command with --guest option to a offline vm, we will get error: # virsh setvcpus test3 1 --guest error: Guest agent is not responding: QEMU guest agent is not connected However guest

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

2015-07-08 Thread lhuang
On 07/08/2015 05:37 PM, Martin Kletzander wrote: On Fri, Jul 03, 2015 at 02:39:49PM +0200, Martin Kletzander wrote: On Wed, Jun 17, 2015 at 11:56:12AM +0800, Luyao Huang wrote: Shared memory device is base on PCI address, even we do not pass the pci address to qemu, qemu will auto assign a

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

2015-07-08 Thread lhuang
On 07/08/2015 04:27 PM, Michal Privoznik wrote: On 03.07.2015 03:57, Luyao Huang wrote: 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

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

2015-07-08 Thread lhuang
On 07/08/2015 07:56 PM, Martin Kletzander wrote: On Wed, Jun 17, 2015 at 11:56:16AM +0800, Luyao Huang wrote: 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 ++

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

2015-07-08 Thread lhuang
On 07/08/2015 10:30 PM, Martin Kletzander wrote: On Wed, Jul 08, 2015 at 02:22:36PM +0200, Martin Kletzander wrote: On Wed, Jun 17, 2015 at 11:56:21AM +0800, Luyao Huang wrote: If user pass a invalid address shared memory device to qemu, qemu won't report the error, but will auto assign a pci

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

2015-07-08 Thread lhuang
On 07/08/2015 08:14 PM, Martin Kletzander wrote: On Wed, Jun 17, 2015 at 11:56:17AM +0800, Luyao Huang wrote: 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

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

2015-07-06 Thread lhuang
On 07/06/2015 01:38 PM, Martin Kletzander wrote: On Mon, Jul 06, 2015 at 10:23:59AM +0800, lhuang wrote: On 07/03/2015 08:56 PM, Martin Kletzander wrote: On Wed, Jun 17, 2015 at 11:56:14AM +0800, Luyao Huang wrote: Rename qemuBuildShmemDevCmd to qemuBuildShmemDevStr and change the return

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

2015-07-05 Thread lhuang
On 07/03/2015 08:41 PM, Martin Kletzander wrote: On Wed, Jun 17, 2015 at 11:56:13AM +0800, Luyao Huang wrote: 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 ++--

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

2015-07-05 Thread lhuang
On 07/03/2015 08:56 PM, Martin Kletzander wrote: On Wed, Jun 17, 2015 at 11:56:14AM +0800, Luyao Huang wrote: 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

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

2015-07-05 Thread lhuang
On 07/03/2015 08:39 PM, Martin Kletzander wrote: On Wed, Jun 17, 2015 at 11:56:12AM +0800, Luyao Huang wrote: 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 ---

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

2015-07-02 Thread lhuang
On 07/02/2015 06:28 PM, John Ferlan wrote: On 07/02/2015 05:46 AM, Pavel Hrdina wrote: ... diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 27d62e9..334fd3a 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6497,6 +6497,19 @@ cmdVcpuPin(vshControl *ctl, const

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

2015-07-01 Thread lhuang
On 07/01/2015 02:15 PM, Martin Kletzander wrote: On Tue, Jun 30, 2015 at 11:35:13AM +0800, Luyao Huang wrote: 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

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

2015-07-01 Thread lhuang
On 07/02/2015 04:29 AM, John Ferlan wrote: On 06/28/2015 10:10 PM, Luyao Huang wrote: If usr pass a vcpu which exceed guest maxvcpu number, virsh client will only output an header like this: # virsh vcpupin test3 1000 VCPU: CPU Affinity -- After this

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

2015-06-29 Thread lhuang
On 06/29/2015 04:38 PM, Peter Krempa wrote: On Mon, Jun 29, 2015 at 16:22:54 +0800, Luyao Huang wrote: When we use iothreadinfo to get iothread information, we will get error like this: # virsh iothreadinfo rhel7.0 --live error: Unable to get domain IOThreads information error: Unable

Re: [libvirt] [PATCH] conf: fix not format priority when it is zero

2015-06-25 Thread lhuang
On 06/26/2015 05:26 AM, Martin Kletzander wrote: On Wed, Jun 24, 2015 at 12:00:36PM +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1235116 We do not format the priority if it is 0, but this will be a broken settings in guest. Change the condition of format priority

Re: [libvirt] [PATCH] qemu: fix wrong remove guest cfg if migrate fail

2015-06-25 Thread lhuang
On 06/25/2015 04:25 PM, Jiri Denemark wrote: On Thu, Jun 25, 2015 at 09:38:57 +0800, Luyao Huang wrote: If we get fail in qemuMigrationPrepareAny, we forget check if the vm is persistent then always call qemuDomainRemoveInactive to clean the inactive settings. Add a check to avoid this. This

Re: [libvirt] [PATCH] qemu:lxc:xml:libxl:xen: improve the error in openconsole/channel

2015-06-24 Thread lhuang
On 06/24/2015 04:12 PM, Martin Kletzander wrote: On Mon, Jun 15, 2015 at 09:58:36PM +0800, Luyao Huang wrote: We allow do not pass the dev_name to openconsole() and openchannel() function, but the error message is not good when we do not specified the console/channel name. the error message

Re: [libvirt] [PATCH] conf: improve the way we format blkiotune and cputune

2015-06-24 Thread lhuang
On 06/24/2015 05:32 PM, Martin Kletzander wrote: On Tue, Jun 23, 2015 at 09:24:25PM +0800, Luyao Huang wrote: Just refactor existing code to use a child buf instead of check all element before format blkiotune and cputune. This will avoid the more and more bigger element check during we

Re: [libvirt] [PATCH] qemu:conf: introduce a function to delete vcpu sched

2015-06-24 Thread lhuang
On 06/24/2015 08:51 PM, Peter Krempa wrote: On Wed, Jun 24, 2015 at 16:44:22 +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1235180 We have API allow vpu to be deleted, but an vcpu may be included in some domain vcpu sched, so add a new API to allow removing an iothread

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

2015-06-22 Thread lhuang
On 06/18/2015 09:29 PM, Jiri Denemark wrote: On Wed, Jun 17, 2015 at 22:22:44 +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1207095 We allow set the feature with the host-passthrough cpu, but won't save them in the migration xml, the features we specified will

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

2015-06-22 Thread lhuang
On 06/18/2015 08:12 PM, John Ferlan wrote: On 06/15/2015 08:33 AM, Luyao Huang wrote: When hot-plug a memory device, we don't check if there is a memory device have the same address with the memory device we want hot-pluged. Qemu forbid use/hot-plug 2 memory device with same slot or the same

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

2015-06-22 Thread lhuang
On 06/18/2015 08:42 PM, Jiri Denemark wrote: On Wed, Jun 17, 2015 at 22:22:45 +0800, Luyao Huang wrote: 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

Re: [libvirt] [PATCH] qemu: fix cannot attach a virtio channel

2015-06-15 Thread lhuang
On 06/15/2015 04:25 PM, Ján Tomko wrote: I'd rather be more specific in the commit summary, e.g.: fix address allocation on chardev hotplug good summary, thanks for you help On Wed, Jun 10, 2015 at 10:49:37PM +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1230039

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

2015-06-15 Thread lhuang
On 06/16/2015 08:27 AM, zhang bo wrote: On 2015/6/15 20:33, Luyao Huang wrote: When hot-plug a memory device, we don't check if there is a memory device have the same address with the memory device we want hot-pluged. Qemu forbid use/hot-plug 2 memory device with same slot or the same

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

2015-06-10 Thread lhuang
On 06/11/2015 03:12 AM, John Ferlan wrote: On 05/27/2015 05:50 AM, Luyao Huang wrote: When hot-plug a memory device, we don't check if there is a memory device have the same address with the memory device we want hot-pluged. Qemu forbid use/hot-plug 2 memory device with same slot or the same

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

2015-06-02 Thread lhuang
On 06/03/2015 02:04 AM, John Ferlan wrote: On 05/31/2015 07:29 AM, Luyao Huang wrote: 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(-) ACK -

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

2015-06-02 Thread lhuang
On 06/03/2015 02:06 AM, John Ferlan wrote: On 05/31/2015 10:07 AM, Luyao Huang wrote: Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_audit.c | 2 ++ 1 file changed, 2 insertions(+) ACK - Will adjust commit message slightly before pushing... Thanks again for your

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

2015-06-02 Thread lhuang
On 06/03/2015 02:05 AM, John Ferlan wrote: On 05/31/2015 09:27 AM, Luyao Huang wrote: 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.

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

2015-05-27 Thread lhuang
On 05/27/2015 03:03 PM, Peter Krempa wrote: On Wed, May 27, 2015 at 14:39:58 +0800, Luyao Huang wrote: When hot-plug/cold-plug a memory device, we use memcmp() function to check if there is a memory device have the same address with the memory device we want hot-pluged. But qemu forbid

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

2015-05-27 Thread lhuang
On 05/27/2015 07:59 AM, John Ferlan wrote: On 05/22/2015 05:26 AM, Luyao Huang wrote: 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

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

2015-05-27 Thread lhuang
On 05/27/2015 08:00 AM, John Ferlan wrote: On 05/22/2015 05:26 AM, Luyao Huang wrote: 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

Re: [libvirt] [PATCH] conf: fix forget restore ctxt-node when parse memory device success

2015-05-21 Thread lhuang
On 05/21/2015 03:46 PM, Peter Krempa wrote: On Thu, May 21, 2015 at 13:08:12 +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1223631 When set a memory device in the xml, sysinfo in xml will be lost. Because we forgot restore ctxt-node to the oldnode after parse memory

Re: [libvirt] [PATCH] conf: fix forget restore ctxt-node when parse memory device success

2015-05-21 Thread lhuang
On 05/21/2015 06:14 PM, Daniel P. Berrange wrote: On Thu, May 21, 2015 at 05:52:01PM +0800, lhuang wrote: On 05/21/2015 03:46 PM, Peter Krempa wrote: On Thu, May 21, 2015 at 13:08:12 +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1223631 When set a memory device

Re: [libvirt] [PATCH] virsh: fix a typos issue cause error not right

2015-05-21 Thread lhuang
On 05/21/2015 08:41 PM, John Ferlan wrote: On 05/20/2015 09:32 PM, Luyao Huang wrote: Signed-off-by: Luyao Huang lhu...@redhat.com --- tools/virsh-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) While correct, this would also be fixed by patches on list for more common virsh

Re: [libvirt] [PATCH] docs: add dimm address document in docs

2015-05-14 Thread lhuang
On 05/14/2015 07:57 PM, Peter Krempa wrote: On Thu, May 14, 2015 at 17:08:53 +0800, Luyao Huang wrote: As we have a new device address type 'dimm', add some document and an example to our docs. Signed-off-by: Luyao Huang lhu...@redhat.com --- docs/formatdomain.html.in | 8 1 file

  1   2   >