[libvirt] [PATCH v3 0/4] Virtio-crypto device support

Longpeng(Mike) posted 4 patches 6 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1499253435-94068-1-git-send-email-longpeng2@huawei.com
There is a newer version of this series
docs/formatdomain.html.in                          |  61 ++++++
docs/schemas/domaincommon.rng                      |  30 +++
src/conf/domain_conf.c                             | 213 ++++++++++++++++++++-
src/conf/domain_conf.h                             |  32 ++++
src/libvirt_private.syms                           |   4 +
src/qemu/qemu_alias.c                              |  20 ++
src/qemu/qemu_alias.h                              |   3 +
src/qemu/qemu_capabilities.c                       |   6 +
src/qemu/qemu_capabilities.h                       |   4 +
src/qemu/qemu_command.c                            | 126 ++++++++++++
src/qemu/qemu_command.h                            |   3 +
src/qemu/qemu_domain_address.c                     |  25 +++
src/qemu/qemu_driver.c                             |   6 +
src/qemu/qemu_hotplug.c                            |   1 +
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml    |   2 +
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml   |   2 +
.../qemuxml2argv-virtio-crypto-builtin.xml         |  26 +++
.../qemuxml2argv-virtio-crypto.args                |  22 +++
.../qemuxml2xmlout-virtio-crypto-builtin.xml       |  31 +++
tests/qemuxml2xmltest.c                            |   2 +
20 files changed, 618 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-builtin.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto.args
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-virtio-crypto-builtin.xml
[libvirt] [PATCH v3 0/4] Virtio-crypto device support
Posted by Longpeng(Mike) 6 years, 8 months ago
As virtio-crypto has been supported in QEMU 2.8 and the frontend
driver has been merged in linux 4.10, so it's necessary to support
virtio-crypto in libvirt.

---
Hi guys,
Sorry for the long delay...

Changes since v2:
  - PATCH 1: modify docs as Martin & Boris's suggestion. [Martin & Boris]
  - PATCH 2: add the missing 'ToString'. [Martin]
  - PATCH 3: use virAsprintf instead of virBufferAsprintf. [Martin]
             remove pointless virBufferCheckError. [Martin]
  - rebase on master. [Longpeng]

Changes since v1:
  - split patch [Martin]
  - rebase on master [Martin]
  - add docs/tests/schema [Martin]
  - fix typos [Gonglei]

---
Longpeng(Mike) (4):
  docs: schema: Add basic documentation for the virtual
  conf: Parse virtio-crypto in the domain XML
  qemu: Implement support for 'builtin' backend for virtio-crypto
  tests: Add testcase for virtio-crypto XML parsing

 docs/formatdomain.html.in                          |  61 ++++++
 docs/schemas/domaincommon.rng                      |  30 +++
 src/conf/domain_conf.c                             | 213 ++++++++++++++++++++-
 src/conf/domain_conf.h                             |  32 ++++
 src/libvirt_private.syms                           |   4 +
 src/qemu/qemu_alias.c                              |  20 ++
 src/qemu/qemu_alias.h                              |   3 +
 src/qemu/qemu_capabilities.c                       |   6 +
 src/qemu/qemu_capabilities.h                       |   4 +
 src/qemu/qemu_command.c                            | 126 ++++++++++++
 src/qemu/qemu_command.h                            |   3 +
 src/qemu/qemu_domain_address.c                     |  25 +++
 src/qemu/qemu_driver.c                             |   6 +
 src/qemu/qemu_hotplug.c                            |   1 +
 tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml    |   2 +
 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml   |   2 +
 .../qemuxml2argv-virtio-crypto-builtin.xml         |  26 +++
 .../qemuxml2argv-virtio-crypto.args                |  22 +++
 .../qemuxml2xmlout-virtio-crypto-builtin.xml       |  31 +++
 tests/qemuxml2xmltest.c                            |   2 +
 20 files changed, 618 insertions(+), 1 deletion(-)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-builtin.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto.args
 create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-virtio-crypto-builtin.xml

-- 
1.8.3.1


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 0/4] Virtio-crypto device support
Posted by Boris Fiuczynski 6 years, 8 months ago
Hi Mike,
I am going to send a set of patches based on your series adding ccw 
support since your patch series contains only pci support.
Feel free to include or append my patches (in)to your series.

libvirt contributor guidelines now require to update docs/news.xml and 
note that the change has to be in a separate patch. virtio-crypto should 
be listed in the "New features" section.

I also noticed build errors after applying patch 3 due to missing 
capabilities in the test xmls
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml  (located in patch 4)
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml  (missing)
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml   (located in patch 4)

I suggest to put the introduction of the capabilities "cryptodev-
backend-builtin" and "virtio-crypto" including the changes in tests in a 
separate patch.

Here is the missing part:
diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml 
b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
index 58dd9f6..af141cc 100644
--- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
@@ -218,6 +218,8 @@
    <flag name='intel-iommu.device-iotlb'/>
    <flag name='virtio.iommu_platform'/>
    <flag name='virtio.ats'/>
+  <flag name='cryptodev-backend-builtin'/>
+  <flag name='virtio-crypto'/>
    <version>2009000</version>
    <kvmVersion>0</kvmVersion>
    <package> (v2.9.0)</package>



On 07/05/2017 01:17 PM, Longpeng(Mike) wrote:
> As virtio-crypto has been supported in QEMU 2.8 and the frontend
> driver has been merged in linux 4.10, so it's necessary to support
> virtio-crypto in libvirt.
> 
> ---
> Hi guys,
> Sorry for the long delay...
> 
> Changes since v2:
>    - PATCH 1: modify docs as Martin & Boris's suggestion. [Martin & Boris]
>    - PATCH 2: add the missing 'ToString'. [Martin]
>    - PATCH 3: use virAsprintf instead of virBufferAsprintf. [Martin]
>               remove pointless virBufferCheckError. [Martin]
>    - rebase on master. [Longpeng]
> 
> Changes since v1:
>    - split patch [Martin]
>    - rebase on master [Martin]
>    - add docs/tests/schema [Martin]
>    - fix typos [Gonglei]
> 
> ---
> Longpeng(Mike) (4):
>    docs: schema: Add basic documentation for the virtual
>    conf: Parse virtio-crypto in the domain XML
>    qemu: Implement support for 'builtin' backend for virtio-crypto
>    tests: Add testcase for virtio-crypto XML parsing
> 
>   docs/formatdomain.html.in                          |  61 ++++++
>   docs/schemas/domaincommon.rng                      |  30 +++
>   src/conf/domain_conf.c                             | 213 ++++++++++++++++++++-
>   src/conf/domain_conf.h                             |  32 ++++
>   src/libvirt_private.syms                           |   4 +
>   src/qemu/qemu_alias.c                              |  20 ++
>   src/qemu/qemu_alias.h                              |   3 +
>   src/qemu/qemu_capabilities.c                       |   6 +
>   src/qemu/qemu_capabilities.h                       |   4 +
>   src/qemu/qemu_command.c                            | 126 ++++++++++++
>   src/qemu/qemu_command.h                            |   3 +
>   src/qemu/qemu_domain_address.c                     |  25 +++
>   src/qemu/qemu_driver.c                             |   6 +
>   src/qemu/qemu_hotplug.c                            |   1 +
>   tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml    |   2 +
>   tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml   |   2 +
>   .../qemuxml2argv-virtio-crypto-builtin.xml         |  26 +++
>   .../qemuxml2argv-virtio-crypto.args                |  22 +++
>   .../qemuxml2xmlout-virtio-crypto-builtin.xml       |  31 +++
>   tests/qemuxml2xmltest.c                            |   2 +
>   20 files changed, 618 insertions(+), 1 deletion(-)
>   create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-builtin.xml
>   create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto.args
>   create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-virtio-crypto-builtin.xml
> 


-- 
Mit freundlichen Grüßen/Kind regards
    Boris Fiuczynski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 0/4] Virtio-crypto device support
Posted by Longpeng (Mike) 6 years, 8 months ago
Hi Boris,

On 2017/7/6 20:28, Boris Fiuczynski wrote:

> Hi Mike,
> I am going to send a set of patches based on your series adding ccw support
> since your patch series contains only pci support.
> Feel free to include or append my patches (in)to your series.
> 

Okay :)  you can send your patches to me or to mail-list, and I'll including
your patches in v4.

> libvirt contributor guidelines now require to update docs/news.xml and note that
> the change has to be in a separate patch. virtio-crypto should be listed in the
> "New features" section.
> 

I see, thanks.

> I also noticed build errors after applying patch 3 due to missing capabilities
> in the test xmls
> tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml  (located in patch 4)
> tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml  (missing)
> tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml   (located in patch 4)
> 

I'll add the missing part :)

> I suggest to put the introduction of the capabilities "cryptodev-
> backend-builtin" and "virtio-crypto" including the changes in tests in a
> separate patch.
> 

Sorry, I don't quite understand this, could you explain it in detail?


-- 
Regards,
Longpeng(Mike)

> Here is the missing part:
> diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
> b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
> index 58dd9f6..af141cc 100644
> --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
> +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
> @@ -218,6 +218,8 @@
>    <flag name='intel-iommu.device-iotlb'/>
>    <flag name='virtio.iommu_platform'/>
>    <flag name='virtio.ats'/>
> +  <flag name='cryptodev-backend-builtin'/>
> +  <flag name='virtio-crypto'/>
>    <version>2009000</version>
>    <kvmVersion>0</kvmVersion>
>    <package> (v2.9.0)</package>
> 
> 
> 
> On 07/05/2017 01:17 PM, Longpeng(Mike) wrote:
>> As virtio-crypto has been supported in QEMU 2.8 and the frontend
>> driver has been merged in linux 4.10, so it's necessary to support
>> virtio-crypto in libvirt.
>>
>> ---
>> Hi guys,
>> Sorry for the long delay...
>>
>> Changes since v2:
>>    - PATCH 1: modify docs as Martin & Boris's suggestion. [Martin & Boris]
>>    - PATCH 2: add the missing 'ToString'. [Martin]
>>    - PATCH 3: use virAsprintf instead of virBufferAsprintf. [Martin]
>>               remove pointless virBufferCheckError. [Martin]
>>    - rebase on master. [Longpeng]
>>
>> Changes since v1:
>>    - split patch [Martin]
>>    - rebase on master [Martin]
>>    - add docs/tests/schema [Martin]
>>    - fix typos [Gonglei]
>>
>> ---
>> Longpeng(Mike) (4):
>>    docs: schema: Add basic documentation for the virtual
>>    conf: Parse virtio-crypto in the domain XML
>>    qemu: Implement support for 'builtin' backend for virtio-crypto
>>    tests: Add testcase for virtio-crypto XML parsing
>>
>>   docs/formatdomain.html.in                          |  61 ++++++
>>   docs/schemas/domaincommon.rng                      |  30 +++
>>   src/conf/domain_conf.c                             | 213 ++++++++++++++++++++-
>>   src/conf/domain_conf.h                             |  32 ++++
>>   src/libvirt_private.syms                           |   4 +
>>   src/qemu/qemu_alias.c                              |  20 ++
>>   src/qemu/qemu_alias.h                              |   3 +
>>   src/qemu/qemu_capabilities.c                       |   6 +
>>   src/qemu/qemu_capabilities.h                       |   4 +
>>   src/qemu/qemu_command.c                            | 126 ++++++++++++
>>   src/qemu/qemu_command.h                            |   3 +
>>   src/qemu/qemu_domain_address.c                     |  25 +++
>>   src/qemu/qemu_driver.c                             |   6 +
>>   src/qemu/qemu_hotplug.c                            |   1 +
>>   tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml    |   2 +
>>   tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml   |   2 +
>>   .../qemuxml2argv-virtio-crypto-builtin.xml         |  26 +++
>>   .../qemuxml2argv-virtio-crypto.args                |  22 +++
>>   .../qemuxml2xmlout-virtio-crypto-builtin.xml       |  31 +++
>>   tests/qemuxml2xmltest.c                            |   2 +
>>   20 files changed, 618 insertions(+), 1 deletion(-)
>>   create mode 100644
>> tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-builtin.xml
>>   create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto.args
>>   create mode 100644
>> tests/qemuxml2xmloutdata/qemuxml2xmlout-virtio-crypto-builtin.xml
>>
> 
> 


-- 
Regards,
Longpeng(Mike)

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 0/4] Virtio-crypto device support
Posted by Boris Fiuczynski 6 years, 8 months ago
On 07/06/2017 03:47 PM, Longpeng (Mike) wrote:
> Hi Boris,
> 
> On 2017/7/6 20:28, Boris Fiuczynski wrote:
> 
>> Hi Mike,
>> I am going to send a set of patches based on your series adding ccw support
>> since your patch series contains only pci support.
>> Feel free to include or append my patches (in)to your series.
>>
> 
> Okay :)  you can send your patches to me or to mail-list, and I'll including
> your patches in v4.
> 
>> libvirt contributor guidelines now require to update docs/news.xml and note that
>> the change has to be in a separate patch. virtio-crypto should be listed in the
>> "New features" section.
>>
> 
> I see, thanks.
> 
>> I also noticed build errors after applying patch 3 due to missing capabilities
>> in the test xmls
>> tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml  (located in patch 4)
>> tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml  (missing)
>> tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml   (located in patch 4)
>>
> 
> I'll add the missing part :)
> 
>> I suggest to put the introduction of the capabilities "cryptodev-
>> backend-builtin" and "virtio-crypto" including the changes in tests in a
>> separate patch.
>>
> 
> Sorry, I don't quite understand this, could you explain it in detail?
Put the required changes for the capabilities in files

tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h

into one separate patch. Does that explain it better?

-- 
Mit freundlichen Grüßen/Kind regards
    Boris Fiuczynski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 0/4] Virtio-crypto device support
Posted by Longpeng (Mike) 6 years, 8 months ago
Hi Boris,

On 2017/7/6 23:01, Boris Fiuczynski wrote:

> On 07/06/2017 03:47 PM, Longpeng (Mike) wrote:
>> Hi Boris,
>>
>> On 2017/7/6 20:28, Boris Fiuczynski wrote:
>>
>>> Hi Mike,
>>> I am going to send a set of patches based on your series adding ccw support
>>> since your patch series contains only pci support.
>>> Feel free to include or append my patches (in)to your series.
>>>
>>
>> Okay :)  you can send your patches to me or to mail-list, and I'll including
>> your patches in v4.
>>
>>> libvirt contributor guidelines now require to update docs/news.xml and note that
>>> the change has to be in a separate patch. virtio-crypto should be listed in the
>>> "New features" section.
>>>
>>
>> I see, thanks.
>>
>>> I also noticed build errors after applying patch 3 due to missing capabilities
>>> in the test xmls
>>> tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml  (located in patch 4)
>>> tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml  (missing)
>>> tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml   (located in patch 4)
>>>
>>
>> I'll add the missing part :)
>>
>>> I suggest to put the introduction of the capabilities "cryptodev-
>>> backend-builtin" and "virtio-crypto" including the changes in tests in a
>>> separate patch.
>>>
>>
>> Sorry, I don't quite understand this, could you explain it in detail?
> Put the required changes for the capabilities in files
> 
> tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
> tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
> tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
> src/qemu/qemu_capabilities.c
> src/qemu/qemu_capabilities.h
> 
> into one separate patch. Does that explain it better?
> 


I see, thanks :)

-- 
Regards,
Longpeng(Mike)

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 0/4] Virtio-crypto device support
Posted by Marc Hartmayer 6 years, 8 months ago
On Wed, Jul 05, 2017 at 01:17 PM +0200, "Longpeng(Mike)" <longpeng2@huawei.com> wrote:
> As virtio-crypto has been supported in QEMU 2.8 and the frontend
> driver has been merged in linux 4.10, so it's necessary to support
> virtio-crypto in libvirt.
>
> ---
> Hi guys,
> Sorry for the long delay...
>
> Changes since v2:
>   - PATCH 1: modify docs as Martin & Boris's suggestion. [Martin & Boris]
>   - PATCH 2: add the missing 'ToString'. [Martin]
>   - PATCH 3: use virAsprintf instead of virBufferAsprintf. [Martin]
>              remove pointless virBufferCheckError. [Martin]
>   - rebase on master. [Longpeng]
>
> Changes since v1:
>   - split patch [Martin]
>   - rebase on master [Martin]
>   - add docs/tests/schema [Martin]
>   - fix typos [Gonglei]
>
> ---
> Longpeng(Mike) (4):
>   docs: schema: Add basic documentation for the virtual
>   conf: Parse virtio-crypto in the domain XML
>   qemu: Implement support for 'builtin' backend for virtio-crypto
>   tests: Add testcase for virtio-crypto XML parsing
>
>  docs/formatdomain.html.in                          |  61 ++++++
>  docs/schemas/domaincommon.rng                      |  30 +++
>  src/conf/domain_conf.c                             | 213 ++++++++++++++++++++-
>  src/conf/domain_conf.h                             |  32 ++++
>  src/libvirt_private.syms                           |   4 +
>  src/qemu/qemu_alias.c                              |  20 ++
>  src/qemu/qemu_alias.h                              |   3 +
>  src/qemu/qemu_capabilities.c                       |   6 +
>  src/qemu/qemu_capabilities.h                       |   4 +
>  src/qemu/qemu_command.c                            | 126 ++++++++++++
>  src/qemu/qemu_command.h                            |   3 +
>  src/qemu/qemu_domain_address.c                     |  25 +++
>  src/qemu/qemu_driver.c                             |   6 +
>  src/qemu/qemu_hotplug.c                            |   1 +
>  tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml    |   2 +
>  tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml   |   2 +
>  .../qemuxml2argv-virtio-crypto-builtin.xml         |  26 +++
>  .../qemuxml2argv-virtio-crypto.args                |  22 +++
>  .../qemuxml2xmlout-virtio-crypto-builtin.xml       |  31 +++
>  tests/qemuxml2xmltest.c                            |   2 +
>  20 files changed, 618 insertions(+), 1 deletion(-)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-builtin.xml
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto.args
>  create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-virtio-crypto-builtin.xml
>
> --
> 1.8.3.1
>
>
> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

Everything for 'qemuParseCommandLine' is missing (frankly, I'm not sure
if this is important).

Beste Grüße / Kind regards
   Marc Hartmayer

IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


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