Re: [libvirt] [RFC v1 4/6] migration: Migration support for ephemeral hostdevs

2015-05-13 Thread Chen Fan
On 05/13/2015 04:36 PM, Peter Krempa wrote: On Wed, May 13, 2015 at 11:36:30 +0800, Chen Fan wrote: add migration support for ephemeral host devices, introduce two 'detach' and 'restore' functions to unplug/plug host devices during migration. Signed-off-by: Chen

Re: [libvirt] [RFC v1 4/6] migration: Migration support for ephemeral hostdevs

2015-05-13 Thread Chen Fan
On 05/13/2015 10:30 PM, Laine Stump wrote: On 05/13/2015 05:57 AM, Daniel P. Berrange wrote: On Wed, May 13, 2015 at 11:36:30AM +0800, Chen Fan wrote: add migration support for ephemeral host devices, introduce two 'detach' and 'restore' functions to unplug/plug host devi

Re: [libvirt] [RFC v1 3/6] qemu: add check ephemeral devices only for PCI host devices

2015-05-13 Thread Chen Fan
On 05/13/2015 04:17 PM, Peter Krempa wrote: On Wed, May 13, 2015 at 11:36:29 +0800, Chen Fan wrote: currently, we only support PCI host devices with ephemeral flag. and USB already supports migration. so maybe in the near future we can support SCSI. Signed-off-by: Chen Fan --- src/qemu

[libvirt] [RFC v1 0/6] Live Migration with ephemeral host NIC devices

2015-05-12 Thread Chen Fan
. 1) unplug the ephemeral devices before migration 2) do native migration 3) when migration finished, hotplug the ephemeral devices TODO: keep network connectivity on guest level by bonding device. Chen Fan (6): conf: add ephemeral element for hostdev supporting migration qemu: Save ephe

[libvirt] [RFC v1 1/6] conf: add ephemeral element for hostdev supporting migration

2015-05-12 Thread Chen Fan
the ephemeral flag helps support migration with PCI-passthrough. An ephemeral hostdev is automatically unplugged before migration and replugged (if one is available on the destination) after migration. Signed-off-by: Chen Fan --- docs/schemas/domaincommon.rng | 10

[libvirt] [RFC v1 5/6] managedsave: move the domain xml handling forward to stop CPU

2015-05-12 Thread Chen Fan
we should save the XML information to image head before we hotunplug the ephemeral devices. so here we handle XML ahead. Signed-off-by: Chen Fan --- src/qemu/qemu_driver.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/qemu

[libvirt] [RFC v1 4/6] migration: Migration support for ephemeral hostdevs

2015-05-12 Thread Chen Fan
add migration support for ephemeral host devices, introduce two 'detach' and 'restore' functions to unplug/plug host devices during migration. Signed-off-by: Chen Fan --- src/qemu/qemu_migration.c | 171 -- src/qemu/qemu_migrat

[libvirt] [RFC v1 3/6] qemu: add check ephemeral devices only for PCI host devices

2015-05-12 Thread Chen Fan
currently, we only support PCI host devices with ephemeral flag. and USB already supports migration. so maybe in the near future we can support SCSI. Signed-off-by: Chen Fan --- src/qemu/qemu_command.c | 10 ++ src/qemu/qemu_migration.c | 11 +++ 2 files changed, 17 insertions

[libvirt] [RFC v1 6/6] managedsave: add managedsave support for ephemeral host devices

2015-05-12 Thread Chen Fan
Signed-off-by: Chen Fan --- src/qemu/qemu_driver.c | 8 src/qemu/qemu_process.c | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 86d93d2..112acb1 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu

[libvirt] [RFC v1 2/6] qemu: Save ephemeral devices into qemuDomainObjPrivate

2015-05-12 Thread Chen Fan
after migration we should restore the ephemeral devices. so we save them to qemuDomainObjPrivate. Signed-off-by: Chen Fan --- src/qemu/qemu_domain.c | 5 + src/qemu/qemu_domain.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

Re: [libvirt] [RFC 0/7] Live Migration with Pass-through Devices proposal

2015-04-23 Thread Chen Fan
On 04/20/2015 06:29 AM, Laine Stump wrote: On 04/17/2015 04:53 AM, Chen Fan wrote: backgrond: Live migration is one of the most important features of virtualization technology. With regard to recent virtualization techniques, performance of network I/O is critical. Current network I/O

Re: [libvirt] [RFC 0/7] Live Migration with Pass-through Devices proposal

2015-04-21 Thread Chen Fan
29 AM, Laine Stump wrote: On 04/17/2015 04:53 AM, Chen Fan wrote: backgrond: Live migration is one of the most important features of virtualization technology. With regard to recent virtualization techniques, performance of network I/O is critical. Current network I/O virtualization (e.g.

[libvirt] [RFC 4/7] qemu-agent: add qemuAgentCreateBond interface

2015-04-17 Thread Chen Fan
via initialize callback to create bond device. Signed-off-by: Chen Fan --- src/qemu/qemu_agent.c | 118 src/qemu/qemu_agent.h | 10 src/qemu/qemu_domain.c | 70 src/qemu/qemu_domain.h | 7 +++ src/qemu

[libvirt] [RFC 1/7] qemu-agent: add agent init callback when detecting guest setup

2015-04-17 Thread Chen Fan
sometimes, we want to do some initialize work in guest when guest startup, but currently, qemu-agent doesn't support that. so here we add an init callback, when guest startup, notify libvirt it has been up, then libvirt can do some work for guest. Signed-off-by: Chen Fan --- src

[libvirt] [RFC 0/3] add support migration with passthrough device

2015-04-17 Thread Chen Fan
the patches is for libvirt to support migration with passthrough device using existing feacture. Chen Fan (3): qemu-agent: add guest-network-set-interface command qemu-agent: add guest-network-delete-interface command qemu-agent: add notify for qemu-ga boot configure| 16

[libvirt] [RFC 5/7] hostdev: add parse ip and route for bond configure

2015-04-17 Thread Chen Fan
bond device always need to configure the ip address and route way address. so here we add the interface. xml like: Signed-off-by: Chen Fan --- docs/schemas/domaincommon.rng | 21 +++ src/conf/domain_conf.c| 87

[libvirt] [RFC 2/3] qemu-agent: add guest-network-delete-interface command

2015-04-17 Thread Chen Fan
Add a corresponding command to guest-network-set-interface. Signed-off-by: Chen Fan --- qga/commands-posix.c | 51 +++ qga/commands-win32.c | 6 ++ qga/qapi-schema.json | 11 +++ 3 files changed, 68 insertions(+) diff --git a/qga

[libvirt] [RFC 0/7] Live Migration with Pass-through Devices proposal

2015-04-17 Thread Chen Fan
we should consider bonding driver to support add interfaces dynamically. This is an example on how this might work, so I want to hear some voices about this scenario. Thanks, Chen Chen Fan (7): qemu-agent: add agent init callback when detecting guest setup qemu: add guest init event cal

[libvirt] [RFC 1/3] qemu-agent: add guest-network-set-interface command

2015-04-17 Thread Chen Fan
"bond" interface. the active-backup mode can be used for an automatic switch. so this patch is adding a guest-network-set-interface command for creating bond device. so the management can easy to create a bond device dynamically when guest running. Signed-off-by: Chen Fan --- configure

[libvirt] [RFC 6/7] migrate: hot remove hostdev at perform phase for bond device

2015-04-17 Thread Chen Fan
For bond device, we can support the migrate, we can simple to hot remove the device from source side, and after migration end, we hot add the new device at destination side. Signed-off-by: Chen Fan --- src/qemu/qemu_driver.c| 57 +++ src/qemu

[libvirt] [RFC 3/3] qemu-agent: add notify for qemu-ga boot

2015-04-17 Thread Chen Fan
Signed-off-by: Chen Fan --- qga/main.c | 13 + 1 file changed, 13 insertions(+) diff --git a/qga/main.c b/qga/main.c index 9939a2b..f011ce0 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1170,6 +1170,19 @@ int main(int argc, char **argv) g_critical("failed to initialize

[libvirt] [RFC 2/7] qemu: add guest init event callback to do the initialize work for guest

2015-04-17 Thread Chen Fan
Signed-off-by: Chen Fan --- src/qemu/qemu_domain.h | 7 +++ src/qemu/qemu_driver.c | 32 src/qemu/qemu_process.c | 22 ++ 3 files changed, 61 insertions(+) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 3225abb

[libvirt] [RFC 7/7] migrate: add hostdev migrate status to support hostdev migration

2015-04-17 Thread Chen Fan
we add a migrate status for hostdev to specify the device don't need to initialze when VM startup, after migration end, we add the migrate status hostdev, so can support hostdev migration. Signed-off-by: Chen Fan --- src/conf/domain_conf.c| 3 ++ src/conf/domain_conf.h| 7

[libvirt] [RFC 3/7] hostdev: add a 'bond' type element in element

2015-04-17 Thread Chen Fan
this 'bond' element is to create bond device when guest startup, the xml like: Signed-off-by: Chen Fan --- docs/schemas/basictypes.rng | 6 ++ docs/schemas/domaincommon.rng | 16 ++ src/conf/domain_conf.c

[libvirt] [PATCH 0/2] fix domain documentation error

2015-03-24 Thread Chen Fan
Chen Fan (2): docs: no 'via' attribute in route element docs: route element must specify network address docs/formatdomain.html.in | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- 1.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.c

[libvirt] [PATCH 1/2] docs: no 'via' attribute in route element

2015-03-24 Thread Chen Fan
via -> gateway Signed-off-by: Chen Fan --- docs/formatdomain.html.in | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 82aa14f..3b3d2d9 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html

[libvirt] [PATCH 2/2] docs: route element must specify network address

2015-03-24 Thread Chen Fan
because network address is required by route, so here we should add one avoid user misunderstand. Signed-off-by: Chen Fan --- docs/formatdomain.html.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 3b3d2d9

Re: [libvirt] [PATCH] qemu: fix memory leak in qemuAgentGetFSInfo

2015-03-10 Thread Chen Fan
On 03/10/2015 05:32 PM, Ján Tomko wrote: On Tue, Mar 10, 2015 at 01:56:11PM +0800, Chen Fan wrote: in virDomainFSInfoFree(), don't free the virDomainFSInfo data. ==10670== 80 bytes in 2 blocks are definitely lost in loss record 576 of 793 ==10670==at 0x4A06BC3: calloc (vg_replace_mal

[libvirt] [PATCH] qemu: fix memory leak in qemuAgentGetFSInfo

2015-03-09 Thread Chen Fan
BD558: qemuAgentGetFSInfo (qemu_agent.c:1837) ==10670==by 0x1A03CF91: qemuDomainGetFSInfo (qemu_driver.c:19238) Signed-off-by: Chen Fan --- src/libvirt-domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 04545fd..7f8a7ce 100644 --- a/src/libvirt-dom

[libvirt] [PATCH] docs: network: fix some trivial typos in docs/formatnetwork.html

2014-12-05 Thread Chen Fan
this patch fix some weird typos: 1. < hostdev> => 2. < type>=> 3. => 4. redundant comma 5. missing right-half bracket Signed-off-by: Chen Fan --- docs/formatnetwork.html.in | 10 +- 1 file changed, 5 insertions(+), 5 deletions(

[libvirt] [PATCH] docs: fix a typo in formatdomain.html

2014-11-20 Thread Chen Fan
Signed-off-by: Chen Fan --- docs/formatdomain.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 9364eb5..6a15074 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -3413,7 +3413,7

[libvirt] [PATCH] virnuma: add notset NULL check in virNumaSetupMemoryPolicy

2014-11-07 Thread Chen Fan
introduce by commit c63ef0452b, when nodeset is NULL, validation will pass in virNumaSetupMemoryPolicy, but virBitmapNextSetBit must ensure bitmap is not Null. there will cause a segmentation fault. this patch fixed it. Signed-off-by: Chen Fan --- src/util/virnuma.c | 3 +++ 1 file changed, 3

[libvirt] [PATCH v5 3/3] virnuma: use virNumaNodesetIsAvailable checking nodeset in virNumaSetupMemoryPolicy

2014-11-03 Thread Chen Fan
Signed-off-by: Chen Fan --- src/util/virnuma.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/util/virnuma.c b/src/util/virnuma.c index 2540bd2..89435de 100644 --- a/src/util/virnuma.c +++ b/src/util/virnuma.c @@ -98,16 +98,13 @@ virNumaSetupMemoryPolicy

[libvirt] [PATCH v5 1/3] bitmap: add virBitmapLastSetBit for finding the last bit position of bitmap

2014-11-03 Thread Chen Fan
Signed-off-by: Chen Fan --- src/libvirt_private.syms | 1 + src/util/virbitmap.c | 45 + src/util/virbitmap.h | 3 +++ tests/virbitmaptest.c| 13 - 4 files changed, 61 insertions(+), 1 deletion(-) diff --git a/src

[libvirt] [PATCH v5 0/3] add nodeset check in numatune

2014-11-03 Thread Chen Fan
when setting elements memnode and nodeset in attribute numatune more than the host nodes in XML file, VM boot should fail. so add check for that. Chen Fan (3): bitmap: add virBitmapLastSetBit for finding the last bit position of bitmap numatune: add check for numatune nodeset range

[libvirt] [PATCH v5 2/3] numatune: add check for numatune nodeset range

2014-11-03 Thread Chen Fan
There was no check for 'nodeset' attribute in numatune-related elements. This patch adds validation that any nodeset specified does not exceed maximum host node. Signed-off-by: Chen Fan --- src/conf/numatune_conf.c | 28 src/conf/numat

Re: [libvirt] [PATCH v4 0/3] add nodeset check in numatune

2014-11-03 Thread Chen, Fan
On Mon, 2014-11-03 at 14:18 +0100, Martin Kletzander wrote: > On Thu, Oct 30, 2014 at 01:44:16PM +0800, Chen Fan wrote: > >when setting elements memnode and nodeset in attribute numatune more > >than the host nodes in XML file, VM boot should fail. so add check for > >that

Re: [libvirt] [PATCH v4 3/3] virnuma: use virNumaNodesetIsAvailable checking nodeset in virNumaSetupMemoryPolicy

2014-11-03 Thread Chen, Fan
On Mon, 2014-11-03 at 14:18 +0100, Martin Kletzander wrote: > On Thu, Oct 30, 2014 at 01:44:19PM +0800, Chen Fan wrote: > >Signed-off-by: Chen Fan > >--- > > src/util/virnuma.c | 23 --- > > 1 file changed, 4 insertions(+), 19 deletions(-) &

Re: [libvirt] [PATCH v4 2/3] numatune: add check for numatune nodeset range

2014-11-03 Thread Chen, Fan
On Mon, 2014-11-03 at 14:18 +0100, Martin Kletzander wrote: > On Thu, Oct 30, 2014 at 01:44:18PM +0800, Chen Fan wrote: > >There was no check for 'nodeset' attribute in numatune-related > >elements. This patch adds validation that any nodeset specified does > &

Re: [libvirt] [PATCH v4 1/3] bitmap: add virBitmapLastSetBit for finding the last bit position of bitmap

2014-11-03 Thread Chen, Fan
On Mon, 2014-11-03 at 14:18 +0100, Martin Kletzander wrote: > On Thu, Oct 30, 2014 at 01:44:17PM +0800, Chen Fan wrote: > >Signed-off-by: Chen Fan > >--- > > src/libvirt_private.syms | 1 + > > src/util/virbitmap.c | 45 +++

Re: [libvirt] [PATCH v3 1/3] numatune: add check for numatune nodeset range

2014-10-30 Thread Chen, Fan
On Thu, 2014-10-30 at 07:55 +0100, Martin Kletzander wrote: > On Thu, Oct 30, 2014 at 02:23:00AM +0000, Chen, Fan wrote: > >On Wed, 2014-10-29 at 14:20 +0100, Martin Kletzander wrote: > >> On Wed, Oct 29, 2014 at 08:33:32PM +0800, Chen Fan wrote: > >> >diff --git a

[libvirt] [PATCH v4 3/3] virnuma: use virNumaNodesetIsAvailable checking nodeset in virNumaSetupMemoryPolicy

2014-10-29 Thread Chen Fan
Signed-off-by: Chen Fan --- src/util/virnuma.c | 23 --- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/src/util/virnuma.c b/src/util/virnuma.c index 4188ef5..613a43c 100644 --- a/src/util/virnuma.c +++ b/src/util/virnuma.c @@ -95,31 +95,19

[libvirt] [PATCH v4 2/3] numatune: add check for numatune nodeset range

2014-10-29 Thread Chen Fan
There was no check for 'nodeset' attribute in numatune-related elements. This patch adds validation that any nodeset specified does not exceed maximum host node. Signed-off-by: Chen Fan --- src/conf/numatune_conf.c | 28 src/conf/numat

[libvirt] [PATCH v4 1/3] bitmap: add virBitmapLastSetBit for finding the last bit position of bitmap

2014-10-29 Thread Chen Fan
Signed-off-by: Chen Fan --- src/libvirt_private.syms | 1 + src/util/virbitmap.c | 45 + src/util/virbitmap.h | 3 +++ tests/virbitmaptest.c| 13 - 4 files changed, 61 insertions(+), 1 deletion(-) diff --git a/src

[libvirt] [PATCH v4 0/3] add nodeset check in numatune

2014-10-29 Thread Chen Fan
when setting elements memnode and nodeset in attribute numatune more than the host nodes in XML file, VM boot should fail. so add check for that. Chen Fan (3): bitmap: add virBitmapLastSetBit for finding the last bit position of bitmap numatune: add check for numatune nodeset range

Re: [libvirt] [PATCH v3 1/3] numatune: add check for numatune nodeset range

2014-10-29 Thread Chen, Fan
On Wed, 2014-10-29 at 14:20 +0100, Martin Kletzander wrote: > On Wed, Oct 29, 2014 at 08:33:32PM +0800, Chen Fan wrote: > >For memnode in numatune element, the range of attribute 'nodeset' > >was not validated. on my host maxnodes was 1, but when setting nodeset > &

Re: [libvirt] [PATCH v3 3/3] virnuma: remove redundant check for numanode

2014-10-29 Thread Chen, Fan
On Wed, 2014-10-29 at 14:23 +0100, Martin Kletzander wrote: > On Wed, Oct 29, 2014 at 08:33:34PM +0800, Chen Fan wrote: > >Signed-off-by: Chen Fan > >--- > > src/util/virnuma.c | 15 --- > > 1 file changed, 15 deletions(-) > > > > I think

[libvirt] [PATCH v3 3/3] virnuma: remove redundant check for numanode

2014-10-29 Thread Chen Fan
Signed-off-by: Chen Fan --- src/util/virnuma.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/src/util/virnuma.c b/src/util/virnuma.c index fbe8fd1..5a08049 100644 --- a/src/util/virnuma.c +++ b/src/util/virnuma.c @@ -95,31 +95,16 @@ virNumaSetupMemoryPolicy

[libvirt] [PATCH v3 1/3] numatune: add check for numatune nodeset range

2014-10-29 Thread Chen Fan
For memnode in numatune element, the range of attribute 'nodeset' was not validated. on my host maxnodes was 1, but when setting nodeset to '0-2' or more, guest also started succuss. there probably was qemu's bug too. Signed-off-by: Chen Fan ---

[libvirt] [PATCH v3 0/3] add nodeset check in numatune

2014-10-29 Thread Chen Fan
when setting elements memnode and nodeset in attribute numatune more than the host nodes in XML file, VM boot should fail. so add check for that. Chen Fan (3): numatune: add check for numatune nodeset range lxc controller: add check for numatune virnuma: remove redundant check for numanode

[libvirt] [PATCH v3 2/3] lxc controller: add check for numatune

2014-10-29 Thread Chen Fan
Signed-off-by: Chen Fan --- src/lxc/lxc_controller.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 1861dd6..a23dff7 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -689,6 +689,7 @@ static int

Re: [libvirt] [PATCH v2 1/3] numatune: add check for numatune nodeset range

2014-10-29 Thread Chen, Fan
On Wed, 2014-10-29 at 07:58 +0100, Martin Kletzander wrote: > On Tue, Oct 28, 2014 at 04:22:21PM +0800, Chen Fan wrote: > >For memnode in numatune element, the range of attribute 'nodeset' > >was not validated. on my host maxnodes was 1, but when setting nodeset > &

Re: [libvirt] [PATCH v2 2/3] lxc controller: add check for numatune

2014-10-29 Thread Chen, Fan
On Wed, 2014-10-29 at 08:00 +0100, Martin Kletzander wrote: > On Tue, Oct 28, 2014 at 04:22:22PM +0800, Chen Fan wrote: > >Signed-off-by: Chen Fan > >--- > > src/lxc/lxc_controller.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > >diff --g

[libvirt] [PATCH v2 2/3] lxc controller: add check for numatune

2014-10-28 Thread Chen Fan
Signed-off-by: Chen Fan --- src/lxc/lxc_controller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 1861dd6..1ee89ab 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -689,7 +689,8 @@ static

[libvirt] [PATCH v2 0/3] add nodeset check in numatune

2014-10-28 Thread Chen Fan
when setting elements memnode and nodeset in attribute numatune more than the host nodes in XML file, VM boot should fail. so add check for that. Chen Fan (3): numatune: add check for numatune nodeset range lxc controller: add check for numatune virnuma: remove redundant check for numanode

[libvirt] [PATCH v2 1/3] numatune: add check for numatune nodeset range

2014-10-28 Thread Chen Fan
For memnode in numatune element, the range of attribute 'nodeset' was not validated. on my host maxnodes was 1, but when setting nodeset to '0-2' or more, guest also started succuss. there probably was qemu's bug too. Signed-off-by: Chen Fan ---

[libvirt] [PATCH v2 3/3] virnuma: remove redundant check for numanode

2014-10-28 Thread Chen Fan
Signed-off-by: Chen Fan --- src/util/virnuma.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/src/util/virnuma.c b/src/util/virnuma.c index 411719d..8431b3c 100644 --- a/src/util/virnuma.c +++ b/src/util/virnuma.c @@ -95,31 +95,16 @@ virNumaSetupMemoryPolicy

[libvirt] [PATCH] conf: fix an memory leak in virSocketAddrIsNumericLocalhost()

2014-10-15 Thread Chen Fan
Signed-off-by: Chen Fan --- src/util/virsocketaddr.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c index 8c9f05f..5f54e68 100644 --- a/src/util/virsocketaddr.c +++ b/src/util/virsocketaddr.c @@ -894,19

Re: [libvirt] [PATCH v3 2/3] conf: add check if migration_host is a localhost address

2014-10-15 Thread Chen, Fan
On Wed, 2014-10-15 at 04:46 -0400, John Ferlan wrote: > This patch has triggered a Coverity RESOURCE_LEAK (3 actually) Right, I will make a patch to fix it. Thank you for catching that. > > On 10/08/2014 09:54 PM, Chen, Fan wrote: > > On Wed, 2014-10-08 at 12:33 +0200,

[libvirt] [PATCH] conf: fix a wrong comment in virSocketAddrNumericFamily()

2014-10-15 Thread Chen Fan
Signed-off-by: Chen Fan --- src/util/virsocketaddr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c index a19e3af..8c9f05f 100644 --- a/src/util/virsocketaddr.c +++ b/src/util/virsocketaddr.c @@ -859,8 +859,7

[libvirt] [PATCH] conf: fix a wrong comment in virSocketAddrNumericFamily()

2014-10-15 Thread Chen Fan
Signed-off-by: Chen Fan --- src/util/virsocketaddr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c index a19e3af..8c9f05f 100644 --- a/src/util/virsocketaddr.c +++ b/src/util/virsocketaddr.c @@ -859,8 +859,7

Re: [libvirt] [PATCH 0/3] lxc: Implement emulator pin APIs to set/get cpuset

2014-10-09 Thread Chen, Fan
On Fri, 2014-10-10 at 13:58 +0800, Wang Rui wrote: > Ping? I found some wrong indentation in the 3 patches. like following in patch 1/3: +static int virLXCCgroupSetupCpusetTuneForEmulator(virDomainDefPtr def, + virCgroupPtr cgroup, +

Re: [libvirt] [PATCH v3 0/3] Check migration configuration

2014-10-09 Thread Chen, Fan
On Thu, 2014-10-09 at 14:54 +0200, Ján Tomko wrote: > On 10/07/2014 06:07 AM, Chen Fan wrote: > > add some check in migration configuration. > > > > Chen Fan (3): > > migration: add migration_host support for Ipv6 address without > > brackets > >

Re: [libvirt] [PATCH v3 2/3] conf: add check if migration_host is a localhost address

2014-10-08 Thread Chen, Fan
On Wed, 2014-10-08 at 12:33 +0200, Ján Tomko wrote: > On 10/07/2014 06:07 AM, Chen Fan wrote: > > Signed-off-by: Chen Fan > > --- > > src/libvirt_private.syms | 1 + > > src/qemu/qemu_conf.c | 50 > > &

Re: [libvirt] [PATCH v3 1/3] migration: add migration_host support for Ipv6 address without brackets

2014-10-07 Thread Chen, Fan
On Tue, 2014-10-07 at 11:08 +0200, Ján Tomko wrote: > On 10/07/2014 06:07 AM, Chen Fan wrote: > > if specifying migration_host to an Ipv6 address without brackets, > > it was resolved to an incorrect address, such as: > > tcp:2001:0DB8::1428:, > > but th

Re: [libvirt] [PATCH v2 3/4] conf: add virSocketAddrIsLocalhost to Check migration_host

2014-10-06 Thread Chen, Fan
On Fri, 2014-10-03 at 15:58 +0200, Ján Tomko wrote: > On 09/23/2014 06:04 AM, Chen Fan wrote: > > Signed-off-by: Chen Fan > > --- > > src/libvirt_private.syms | 1 + > > src/qemu/qemu_conf.c | 8 > > src/util/virsocketaddr.c | 35

[libvirt] [PATCH v3 0/3] Check migration configuration

2014-10-06 Thread Chen Fan
add some check in migration configuration. Chen Fan (3): migration: add migration_host support for Ipv6 address without brackets conf: add check if migration_host is a localhost address conf: Check migration_address whether is localhost src/libvirt_private.syms | 3 +- src

[libvirt] [PATCH v3 3/3] conf: Check migration_address whether is localhost

2014-10-06 Thread Chen Fan
When enabling the migration_address option, by default it is set to "127.0.0.1", but it's not a valid address for migration. so we should add verification and set the default migration_address to "0.0.0.0". Signed-off-by: Chen Fan --- src/qemu/qemu.conf

[libvirt] [PATCH v3 1/3] migration: add migration_host support for Ipv6 address without brackets

2014-10-06 Thread Chen Fan
if specifying migration_host to an Ipv6 address without brackets, it was resolved to an incorrect address, such as: tcp:2001:0DB8::1428:, but the correct address should be: tcp:[2001:0DB8::1428]: so we should add brackets when parsing it. Signed-off-by: Chen Fan --- src

[libvirt] [PATCH v3 2/3] conf: add check if migration_host is a localhost address

2014-10-06 Thread Chen Fan
Signed-off-by: Chen Fan --- src/libvirt_private.syms | 1 + src/qemu/qemu_conf.c | 50 src/qemu/qemu_conf.h | 2 ++ src/util/virsocketaddr.c | 24 +++ src/util/virsocketaddr.h | 2 ++ 5 files changed, 79 insertions

Re: [libvirt] [PATCH v2 2/4] migration: add migration_host support for Ipv6 address without brackets

2014-10-05 Thread Chen, Fan
On Fri, 2014-10-03 at 15:58 +0200, Ján Tomko wrote: > On 09/23/2014 06:04 AM, Chen Fan wrote: > > if specifying migration_host to an Ipv6 address without brackets, > > it was resolved to an incorrect address, such as: > > tcp:2001:0DB8::1428:, > > but th

Re: [libvirt] [PATCH v2 0/4] Check migration configuration

2014-09-30 Thread Chen, Fan
any feedback? Thanks, Chen On Thu, 2014-09-25 at 01:10 +, Chen, Fan wrote: > ping? > > > On Tue, 2014-09-23 at 12:04 +0800, Chen Fan wrote: > > add some check in migration configuration. > > > > Chen Fan (4): > > virsocketaddr: return addr

Re: [libvirt] [PATCH v2 0/4] Check migration configuration

2014-09-24 Thread Chen, Fan
ping? On Tue, 2014-09-23 at 12:04 +0800, Chen Fan wrote: > add some check in migration configuration. > > Chen Fan (4): > virsocketaddr: return address family in virSocketAddrIsNumeric > migration: add migration_host support for Ipv6 address without > brac

Re: [libvirt] [PATCH 2/2] numatune: move up verification codes in virNumaSetupMemoryPolicy

2014-09-23 Thread Chen, Fan
On Tue, 2014-09-23 at 14:42 +0200, Michal Privoznik wrote: > On 23.09.2014 11:34, Chen Fan wrote: > > use virDomainNumatuneNodeSetIsAvailable() to verify momory.nodeset > > whether is out of range. and move up the verification. > > > > Signed-off-by: Chen

Re: [libvirt] [PATCH 1/2] numatune: add check for memnode.nodeset range

2014-09-23 Thread Chen, Fan
On Tue, 2014-09-23 at 14:41 +0200, Michal Privoznik wrote: > On 23.09.2014 11:34, Chen Fan wrote: > > For memnode in numatune element, the range of attribute 'nodeset' > > was not validated. on my host maxnodes was 1, but when setting nodeset > > to '0-2&

[libvirt] [PATCH 0/2] add nodeset check in numatune

2014-09-23 Thread Chen Fan
for memnode.nodeset in numatune, when setting it more than the host nodes, it should fail. Chen Fan (2): numatune: add check for memnode.nodeset range numatune: move up verification codes in virNumaSetupMemoryPolicy src/conf/numatune_conf.c | 32 src/conf

[libvirt] [PATCH 2/2] numatune: move up verification codes in virNumaSetupMemoryPolicy

2014-09-23 Thread Chen Fan
use virDomainNumatuneNodeSetIsAvailable() to verify momory.nodeset whether is out of range. and move up the verification. Signed-off-by: Chen Fan --- src/conf/numatune_conf.c | 3 +++ src/util/virnuma.c | 15 --- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a

[libvirt] [PATCH 1/2] numatune: add check for memnode.nodeset range

2014-09-23 Thread Chen Fan
For memnode in numatune element, the range of attribute 'nodeset' was not validated. on my host maxnodes was 1, but when setting nodeset to '0-2' or more, guest also started succuss. there probably was qemu's bug too. Signed-off-by: Chen Fan --- src/

[libvirt] [PATCH v2 3/4] conf: add virSocketAddrIsLocalhost to Check migration_host

2014-09-22 Thread Chen Fan
Signed-off-by: Chen Fan --- src/libvirt_private.syms | 1 + src/qemu/qemu_conf.c | 8 src/util/virsocketaddr.c | 35 +++ src/util/virsocketaddr.h | 3 +++ 4 files changed, 47 insertions(+) diff --git a/src/libvirt_private.syms b/src

[libvirt] [PATCH v2 0/4] Check migration configuration

2014-09-22 Thread Chen Fan
add some check in migration configuration. Chen Fan (4): virsocketaddr: return address family in virSocketAddrIsNumeric migration: add migration_host support for Ipv6 address without brackets conf: add virSocketAddrIsLocalhost to Check migration_host conf: Check migration_address

[libvirt] [PATCH v2 2/4] migration: add migration_host support for Ipv6 address without brackets

2014-09-22 Thread Chen Fan
if specifying migration_host to an Ipv6 address without brackets, it was resolved to an incorrect address, such as: tcp:2001:0DB8::1428:, but the correct address should be: tcp:[2001:0DB8::1428]: so we should add brackets when parsing it. Signed-off-by: Chen Fan --- src/qemu

[libvirt] [PATCH v2 1/4] virsocketaddr: return address family in virSocketAddrIsNumeric

2014-09-22 Thread Chen Fan
nowadays, virSocketAddrIsNumeric only validated the income address if numeric, but sometimes we need to know whether the address is an IPv4 or an IPv6 address. Signed-off-by: Chen Fan --- src/qemu/qemu_migration.c | 4 ++-- src/util/virsocketaddr.c | 13 + src/util/virsocketaddr.h

[libvirt] [PATCH v2 4/4] conf: Check migration_address whether is localhost

2014-09-22 Thread Chen Fan
When enabling the migration_address option, by default it is set to "127.0.0.1", but it's not a valid address for migration. so we should add verification and set the default migration_address to "0.0.0.0". Signed-off-by: Chen Fan --- src/qemu/qemu.conf

Re: [libvirt] [PATCH v1 1/3] migration: add migration_host support for Ipv6 address without brackets

2014-09-22 Thread Chen, Fan
On Mon, 2014-09-22 at 15:34 +0200, Ján Tomko wrote: > On 09/12/2014 06:31 AM, Chen Fan wrote: > > when specifying migration_host to an Ipv6 address without brackets, > > it was resolved to an incorrect address, such as: > >tcp:2001:0DB8::1428:, > > but th

[libvirt] [PATCH] cpu: fix wrong single quote mark

2014-09-22 Thread Chen Fan
Signed-off-by: Chen Fan --- src/conf/cpu_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 6c454ee..116aa58 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -413,7 +413,7 @@ virCPUDefParseXML(xmlNodePtr

Re: [libvirt] [PATCH v1 2/3] conf: Check migration_host is localhost or not during restart

2014-09-22 Thread Chen, Fan
On Mon, 2014-09-22 at 15:34 +0200, Ján Tomko wrote: > On 09/12/2014 06:33 AM, Chen Fan wrote: > > Signed-off-by: Chen Fan > > --- > > src/qemu/qemu_conf.c | 11 +++ > > 1 file changed, 11 insertions(+) > > > > diff --git a/src/qemu/qemu_conf.c b

Re: [libvirt] [PATCH v1 0/3] Check migration configuration

2014-09-15 Thread Chen, Fan
Hi jiri, Please help to review this patches. Thanks, Chen On Fri, 2014-09-12 at 12:32 +0800, Chen Fan wrote: > This version differs from the patch set > "conf: Check migration_host is valid or not during libvirt restarts" > I posted 2 weeks ago, I droped checking th

[libvirt] [PATCH v1 3/3] conf: Check migration_address is valid or not during restart

2014-09-11 Thread Chen Fan
When enabling the migration_address option, by default it is set to "127.0.0.1", but it's not a valid address for migration. so we should add verification and set the default migration_address to "0.0.0.0". Signed-off-by: Chen Fan --- src/qemu/qemu.conf

[libvirt] [PATCH v1 2/3] conf: Check migration_host is localhost or not during restart

2014-09-11 Thread Chen Fan
Signed-off-by: Chen Fan --- src/qemu/qemu_conf.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index ac10b64..013f3de 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -707,6 +707,17 @@ int virQEMUDriverConfigLoadFile

[libvirt] [PATCH v1 0/3] Check migration configuration

2014-09-11 Thread Chen Fan
This version differs from the patch set "conf: Check migration_host is valid or not during libvirt restarts" I posted 2 weeks ago, I droped checking the migration_host on target host. and find an issue when setting migration_host. Chen Fan (3): migration: add migration_host suppor

[libvirt] [PATCH v1 1/3] migration: add migration_host support for Ipv6 address without brackets

2014-09-11 Thread Chen Fan
when specifying migration_host to an Ipv6 address without brackets, it was resolved to an incorrect address, such as: tcp:2001:0DB8::1428:, but the correct address should be: tcp:[2001:0DB8::1428]: so we should add brackets when parsing it. Signed-off-by: Chen Fan --- src/qemu

[libvirt] [PATCH] conf: Check migration_host is valid or not during libvirt restarts

2014-08-29 Thread Chen Fan
if user specified an invalid strings as migration hostname, like setting: migration_host = "XXX", libvirt should check it and return error during lbivirt restart. Signed-off-by: Chen Fan --- src/qemu/qemu_conf.c | 40 1 file changed, 40

[libvirt] [PATCH] storage: remove unused 'canonPath' in virStorageFileGetMetadata

2014-08-25 Thread Chen Fan
Signed-off-by: Chen Fan --- src/storage/storage_driver.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 3604613..5ddc23a 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -2892,7 +2892,6

[libvirt] [PATCH] domain conf: Fix whitespace around judgement operation when parsing 'managed' attribute.

2014-06-25 Thread Chen Fan
Signed-off-by: Chen Fan --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 02c394f..b7aa4f5 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -4261,7 +4261,7

[libvirt] [PATCH 2/3] conf: add memdev device in XML

2014-06-24 Thread Chen Fan
or binding guest numa nodes to host numa nodes. Signed-off-by: Chen Fan --- src/conf/domain_conf.c | 203 ++- src/conf/domain_conf.h | 42 + src/libvirt_private.syms | 4 + src/qemu/qemu_capabilities.c | 4 + src/qemu/qemu_capa

[libvirt] [PATCH 3/3] tests: add numa -memdev testing and docs support

2014-06-24 Thread Chen Fan
Signed-off-by: Chen Fan --- docs/formatdomain.html.in | 71 +++- docs/schemas/domaincommon.rng | 76 +- tests/qemuxml2argvdata/qemuxml2argv-cpu-numa3.args | 9 +++ tests/qemuxml2argvdata/qemuxml2argv-cpu-numa3.xml

[libvirt] [PATCH 0/3] add binding guest numa nodes to host numa nodes support

2014-06-24 Thread Chen Fan
domain XML like: ... ... ram0 1000 Chen Fan (3): numa: add '-numa memdev=' support conf: add memdev device in XML tests: add numa -memdev testing and docs support docs/formatdomain.html.in | 71 +++

[libvirt] [PATCH 1/3] numa: add '-numa memdev=' support

2014-06-24 Thread Chen Fan
Since qemu has supported '-numa memdev=ram0' command option, so libvirt should add numa element to support specified memdev attrubute in XML. Signed-off-by: Chen Fan --- src/conf/cpu_conf.c | 73 +++-- src/conf/cpu_conf.h | 13

[libvirt] [patch v2 1/1] manual: Add virsh manual about specified migration host

2014-06-09 Thread Chen Fan
the 'migration_host' description maybe have a bit of difficulty to understand for user, so add this manual for them. Signed-off-by: Chen Fan --- tools/virsh.pod | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/virsh.pod b/tools/virsh.pod ind

[libvirt] [PATCH] manual: Add virsh manual about specified migration host

2014-05-29 Thread Chen Fan
the 'migration_host' description maybe have a bit of difficulty to understand for user, so add this manual for them. Signed-off-by: Chen Fan --- tools/virsh.pod | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index de9a4f

  1   2   >