Re: [RFC v3 2/4] nvdimm: add nvdimm-related qemucapabilities check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 12/12/18 7:52 AM, Luyao Zhong wrote:
> -object memory-backend-file[,align=][,pmem=]
> 
> Signed-off-by: Luyao Zhong <luyao.zhong@xxxxxxxxx>
> ---
>  src/qemu/qemu_capabilities.c                       | 8 +++++++-
>  src/qemu/qemu_capabilities.h                       | 4 ++++
>  tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
>  tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml   | 1 +
>  tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml   | 1 +
>  tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml  | 1 +
>  tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml    | 1 +
>  tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml  | 1 +
>  tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml  | 1 +
>  tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml    | 1 +
>  tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml   | 1 +
>  tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml    | 2 ++
>  tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml   | 2 ++
>  13 files changed, 24 insertions(+), 1 deletion(-)
> 

Again split into 3 different commits for each attribute added. You will
need to do the device changes.

Think "nvdimm.unarmed"....

John

> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 9258bf6..8b518b1 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -516,7 +516,11 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
>                "memory-backend-memfd.hugetlb",
>                "iothread.poll-max-ns",
>                "machine.pseries.cap-nested-hv",
> -              "egl-headless.rendernode"
> +              "egl-headless.rendernode",
> +              "memory-backend-file.align",
> +
> +              /* 325 */
> +              "memory-backend-file.pmem",
>      );
>  
>  
> @@ -1366,6 +1370,8 @@ static virQEMUCapsObjectTypeProps virQEMUCapsDeviceProps[] = {
>  
>  static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendFile[] = {
>      { "discard-data", QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD },
> +    { "align", QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN },
> +    { "pmem", QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM },
>  };
>  
>  static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendMemfd[] = {
> diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
> index c109887..f10b9a9 100644
> --- a/src/qemu/qemu_capabilities.h
> +++ b/src/qemu/qemu_capabilities.h
> @@ -501,6 +501,10 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
>      QEMU_CAPS_IOTHREAD_POLLING, /* -object iothread.poll-max-ns */
>      QEMU_CAPS_MACHINE_PSERIES_CAP_NESTED_HV, /* -machine pseries.cap-nested-hv */
>      QEMU_CAPS_EGL_HEADLESS_RENDERNODE, /* -display egl-headless,rendernode= */
> +    QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN, /* -object memory-backend-file,align= */
> +
> +    /* 325 */
> +    QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM, /* -object memory-backend-file,pmem= */
>  
>      QEMU_CAPS_LAST /* this must always be the last item */
>  } virQEMUCapsFlags;
> diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
> index 8dd90f5..186a6cc 100644
> --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
> +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
> @@ -165,6 +165,7 @@
>    <flag name='memory-backend-memfd'/>
>    <flag name='memory-backend-memfd.hugetlb'/>
>    <flag name='iothread.poll-max-ns'/>
> +  <flag name='memory-backend-file.align'/>
>    <version>2011090</version>
>    <kvmVersion>0</kvmVersion>
>    <microcodeVersion>345725</microcodeVersion>
> diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
> index e646103..c47ebd7 100644
> --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
> +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
> @@ -163,6 +163,7 @@
>    <flag name='memory-backend-memfd'/>
>    <flag name='memory-backend-memfd.hugetlb'/>
>    <flag name='iothread.poll-max-ns'/>
> +  <flag name='memory-backend-file.align'/>
>    <version>2011090</version>
>    <kvmVersion>0</kvmVersion>
>    <microcodeVersion>426509</microcodeVersion>
> diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
> index b18bd74..49249f5 100644
> --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
> +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
> @@ -132,6 +132,7 @@
>    <flag name='memory-backend-memfd'/>
>    <flag name='memory-backend-memfd.hugetlb'/>
>    <flag name='iothread.poll-max-ns'/>
> +  <flag name='memory-backend-file.align'/>
>    <version>2012000</version>
>    <kvmVersion>0</kvmVersion>
>    <microcodeVersion>375102</microcodeVersion>
> diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
> index ac97e16..54c4a65 100644
> --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
> +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
> @@ -206,6 +206,7 @@
>    <flag name='memory-backend-memfd'/>
>    <flag name='memory-backend-memfd.hugetlb'/>
>    <flag name='iothread.poll-max-ns'/>
> +  <flag name='memory-backend-file.align'/>
>    <version>2011090</version>
>    <kvmVersion>0</kvmVersion>
>    <microcodeVersion>414371</microcodeVersion>
> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
> index f11d860..24a3c2b 100644
> --- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
> +++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
> @@ -163,6 +163,7 @@
>    <flag name='memory-backend-memfd'/>
>    <flag name='memory-backend-memfd.hugetlb'/>
>    <flag name='iothread.poll-max-ns'/>
> +  <flag name='memory-backend-file.align'/>
>    <version>2012050</version>
>    <kvmVersion>0</kvmVersion>
>    <microcodeVersion>444946</microcodeVersion>
> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
> index 552b319..1b5d8e6 100644
> --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
> +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
> @@ -103,6 +103,7 @@
>    <flag name='memory-backend-memfd'/>
>    <flag name='memory-backend-memfd.hugetlb'/>
>    <flag name='iothread.poll-max-ns'/>
> +  <flag name='memory-backend-file.align'/>
>    <version>3000000</version>
>    <kvmVersion>0</kvmVersion>
>    <microcodeVersion>0</microcodeVersion>
> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
> index 4f9832d..3c76f63 100644
> --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
> +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
> @@ -103,6 +103,7 @@
>    <flag name='memory-backend-memfd'/>
>    <flag name='memory-backend-memfd.hugetlb'/>
>    <flag name='iothread.poll-max-ns'/>
> +  <flag name='memory-backend-file.align'/>
>    <version>3000000</version>
>    <kvmVersion>0</kvmVersion>
>    <microcodeVersion>0</microcodeVersion>
> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
> index 1c4177c..8569de6 100644
> --- a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
> +++ b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
> @@ -134,6 +134,7 @@
>    <flag name='memory-backend-memfd'/>
>    <flag name='memory-backend-memfd.hugetlb'/>
>    <flag name='iothread.poll-max-ns'/>
> +  <flag name='memory-backend-file.align'/>
>    <version>3000000</version>
>    <kvmVersion>0</kvmVersion>
>    <microcodeVersion>388416</microcodeVersion>
> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
> index b2d98a6..15df8a5 100644
> --- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
> +++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
> @@ -208,6 +208,7 @@
>    <flag name='memory-backend-memfd'/>
>    <flag name='memory-backend-memfd.hugetlb'/>
>    <flag name='iothread.poll-max-ns'/>
> +  <flag name='memory-backend-file.align'/>
>    <version>3000000</version>
>    <kvmVersion>0</kvmVersion>
>    <microcodeVersion>425972</microcodeVersion>
> diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
> index b06b173..175233a 100644
> --- a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
> +++ b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
> @@ -166,6 +166,8 @@
>    <flag name='memory-backend-memfd.hugetlb'/>
>    <flag name='iothread.poll-max-ns'/>
>    <flag name='machine.pseries.cap-nested-hv'/>
> +  <flag name='memory-backend-file.align'/>
> +  <flag name='memory-backend-file.pmem'/>
>    <version>3000091</version>
>    <kvmVersion>0</kvmVersion>
>    <microcodeVersion>437731</microcodeVersion>
> diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
> index 6c9c0c6..faafbcd 100644
> --- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
> +++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml
> @@ -209,6 +209,8 @@
>    <flag name='memory-backend-memfd.hugetlb'/>
>    <flag name='iothread.poll-max-ns'/>
>    <flag name='egl-headless.rendernode'/>
> +  <flag name='memory-backend-file.align'/>
> +  <flag name='memory-backend-file.pmem'/>
>    <version>3000092</version>
>    <kvmVersion>0</kvmVersion>
>    <microcodeVersion>440395</microcodeVersion>
> 

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux