[libvirt] question: about iothreads count restrict in virDomainDefCheckABIStabilityFlags

2019-01-29 Thread WangJie (Pluto)
Hi,

Migrate feature have a restrict: target domain iothreads count must match source

The relevant code as follows:



if (src->niothreadids != dst->niothreadids) { 
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Target domain iothreads count %zu 
does not " "match source %zu"), dst->niothreadids, src->niothreadids); goto 
error; }




I tried to remove the restrict, and perform migrate in that case: "target 
domain iothreads count does not match source" , Anything is normal!

So, can we remove the restrict to support this case?

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] Ping? Re: [PATCH] qemu: stop qemu progress when restore failed

2018-07-09 Thread WangJie (Pluto)
I feel so sorry for my impolite behavior, and waitting for your review opinions 
:)

On 2018/7/9 17:06, Peter Krempa wrote:
> On Mon, Jul 09, 2018 at 16:39:53 +0800, WangJie (Pluto) wrote:
>> ping...
> 
> Please don't be impatient. Pinging patches after one day is kind of rude
> to the reviewers. Not getting a review after 1 day does not mean we
> ignored that patch. The same applies for the weekend. People don't
> usually work over the weekend. Too eager pinging may actually lead to
> ignoring your patches.
> 
>>
>> On 2018/7/5 10:05, Jie Wang wrote:
>>> >From 29482622218f525f0133be0b7db74835174035d9 Mon Sep 17 00:00:00 2001
>>> From: Jie Wang 
>>> Date: Thu, 5 Jul 2018 09:52:03 +0800
>>> Subject: [PATCH] qemu: stop qemu progress when restore failed
>>>
>>> if qemuProcessStartCPUs perform failed in qemuDomainSaveImageStartVM,
>>> we need to stop qemu progress, otherwise will remains a wild VM
>>> which can't be managed by libvirt.
>>>
>>> Signed-off-by: Jie Wang 
>>> ---
>>>  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 9a35e04a85..639b57316d 100644
>>> --- a/src/qemu/qemu_driver.c
>>> +++ b/src/qemu/qemu_driver.c
>>> @@ -6621,6 +6621,8 @@ qemuDomainSaveImageStartVM(virConnectPtr conn,
>>>  if (virGetLastErrorCode() == VIR_ERR_OK)
>>>  virReportError(VIR_ERR_OPERATION_FAILED,
>>> "%s", _("failed to resume domain"));
>>> +
>>> +qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED, 
>>> asyncJob, 0);
>>>  goto cleanup;
>>>  }
>>>  if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, 
>>> driver->caps) < 0) {
>>>
>>
>> --
>> libvir-list mailing list
>> libvir-list@redhat.com
>> https://www.redhat.com/mailman/listinfo/libvir-list

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] Ping? Re: [PATCH] qemu: stop qemu progress when restore failed

2018-07-09 Thread WangJie (Pluto)
ping...

On 2018/7/5 10:05, Jie Wang wrote:
>>From 29482622218f525f0133be0b7db74835174035d9 Mon Sep 17 00:00:00 2001
> From: Jie Wang 
> Date: Thu, 5 Jul 2018 09:52:03 +0800
> Subject: [PATCH] qemu: stop qemu progress when restore failed
> 
> if qemuProcessStartCPUs perform failed in qemuDomainSaveImageStartVM,
> we need to stop qemu progress, otherwise will remains a wild VM
> which can't be managed by libvirt.
> 
> Signed-off-by: Jie Wang 
> ---
>  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 9a35e04a85..639b57316d 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -6621,6 +6621,8 @@ qemuDomainSaveImageStartVM(virConnectPtr conn,
>  if (virGetLastErrorCode() == VIR_ERR_OK)
>  virReportError(VIR_ERR_OPERATION_FAILED,
> "%s", _("failed to resume domain"));
> +
> +qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED, asyncJob, 
> 0);
>  goto cleanup;
>  }
>  if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, 
> driver->caps) < 0) {
> 

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] Ping Re: [PATCH] qemu: stop qemu progress when restore failed

2018-07-05 Thread WangJie (Pluto)



On 2018/7/5 10:05, Jie Wang wrote:
>>From 29482622218f525f0133be0b7db74835174035d9 Mon Sep 17 00:00:00 2001
> From: Jie Wang 
> Date: Thu, 5 Jul 2018 09:52:03 +0800
> Subject: [PATCH] qemu: stop qemu progress when restore failed
> 
> if qemuProcessStartCPUs perform failed in qemuDomainSaveImageStartVM,
> we need to stop qemu progress, otherwise will remains a wild VM
> which can't be managed by libvirt.
> 
> Signed-off-by: Jie Wang 
> ---
>  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 9a35e04a85..639b57316d 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -6621,6 +6621,8 @@ qemuDomainSaveImageStartVM(virConnectPtr conn,
>  if (virGetLastErrorCode() == VIR_ERR_OK)
>  virReportError(VIR_ERR_OPERATION_FAILED,
> "%s", _("failed to resume domain"));
> +
> +qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED, asyncJob, 
> 0);
>  goto cleanup;
>  }
>  if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, 
> driver->caps) < 0) {
> 

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] Ping Re: [PATCH] conf: Introduce align for hostmem-file

2018-06-03 Thread WangJie (Pluto)
Ping?

On 2018/5/29 20:38, Jie Wang wrote:
> QEMU has add the 'align' option to 'memory-backend-file'. Expose
> this option to users by new element align.
> 
> Signed-off-by: Jie Wang 
> ---
>  docs/formatdomain.html.in  | 18 +++
>  docs/schemas/domaincommon.rng  |  7 +++
>  src/conf/domain_conf.c | 14 +
>  src/conf/domain_conf.h |  1 +
>  src/qemu/qemu_command.c|  4 ++
>  .../memory-hotplug-nvdimm-align.args   | 31 +++
>  .../memory-hotplug-nvdimm-align.xml| 63 
> ++
>  tests/qemuxml2argvtest.c   |  3 ++
>  .../memory-hotplug-nvdimm-align.xml|  1 +
>  tests/qemuxml2xmltest.c|  1 +
>  10 files changed, 143 insertions(+)
>  create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.args
>  create mode 100644 tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.xml
>  create mode 100644 tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-align.xml
> 
> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> index 0d0fd3b..29fe145 100644
> --- a/docs/formatdomain.html.in
> +++ b/docs/formatdomain.html.in
> @@ -7932,6 +7932,9 @@ qemu-kvm -net nic,model=? /dev/null
>  
>
>
> +
> +  2048
> +
>  
>/tmp/nvdimm
>  
> @@ -7983,6 +7986,21 @@ qemu-kvm -net nic,model=? /dev/null
>  
>
>  
> +  align
> +  
> +
> +  For NVDIMM type devices one can optionally use
> +  align and its subelement size
> +  to configure the size of alignment within the NVDIMM module.
> +  The size element has usual meaning described
> +  here.
> +  For QEMU domains the following restrictions apply:
> +
> +
> +  the alignment must be multiples of page size 4KiB,
> +
> +  
> +
>source
>
>  
> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
> index 71ac3d0..9e994b1 100644
> --- a/docs/schemas/domaincommon.rng
> +++ b/docs/schemas/domaincommon.rng
> @@ -5145,6 +5145,13 @@
>
>  
>
> +  
> +
> +  
> +
> +  
> +
> +  
>
>  
>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 3689ac0..bf91167 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -15739,6 +15739,12 @@ virDomainMemoryDefParseXML(virDomainXMLOptionPtr 
> xmlopt,
>  }
>  VIR_FREE(tmp);
>  
> +if ((node = virXPathNode("./align", ctxt))) {
> +if (virDomainParseMemory("./align/size", "./align/size/@unit", ctxt,
> + &def->align, true, false) < 0)
> +goto error;
> +}
> +
>  /* source */
>  if ((node = virXPathNode("./source", ctxt)) &&
>  virDomainMemorySourceDefParseXML(node, ctxt, def) < 0)
> @@ -25334,6 +25340,14 @@ virDomainMemoryDefFormat(virBufferPtr buf,
>  virBufferAddLit(buf, ">\n");
>  virBufferAdjustIndent(buf, 2);
>  
> +if (def->align) {
> +virBufferAddLit(buf, "\n");
> +virBufferAdjustIndent(buf, 2);
> +virBufferAsprintf(buf, "%llu\n", def->align);
> +virBufferAdjustIndent(buf, -2);
> +virBufferAddLit(buf, "\n");
> +}
> +
>  if (virDomainMemorySourceDefFormat(buf, def) < 0)
>  return -1;
>  
> diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
> index a78fdee..1155c84 100644
> --- a/src/conf/domain_conf.h
> +++ b/src/conf/domain_conf.h
> @@ -2107,6 +2107,7 @@ typedef enum {
>  struct _virDomainMemoryDef {
>  virDomainMemoryAccess access;
>  virTristateBool discard;
> +unsigned long long align;
>  
>  /* source */
>  virBitmapPtr sourceNodes;
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index c423733..5862457 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -3186,6 +3186,10 @@ qemuBuildMemoryBackendStr(virJSONValuePtr 
> *backendProps,
>  if (virJSONValueObjectAdd(props, "U:size", mem->size * 1024, NULL) < 0)
>  goto cleanup;
>  
> +if (mem->align &&
> +virJSONValueObjectAdd(props, "u:align", mem->align * 1024, NULL) < 0)
> +goto cleanup;
> +
>  if (mem->sourceNodes) {
>  nodemask = mem->sourceNodes;
>  } else {
> diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.args 
> b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.args
> new file mode 100644
> index 000..e6fcf58
> --- /dev/null
> +++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.args
> @@ -0,0 +1,31 @@
> +LC_ALL=C \
> +PATH=/bin \
> +HOME=/home/test \
> +USER=test \
> +LOGNAME=test \
> +QEMU_AU