[PATCH v2 0/5] Support crypto device

zhenwei pi pizhenwei at bytedance.com
Tue Jan 17 01:46:49 UTC 2023


v1 -> v2:
- Rebase code against the latest commit:
  46aee2a9255adf842ab44a9292acb46189a726f7
- Merge previous 1/7 and 2/7 into a single patch:
  conf: introduce crypto device
- Add missing qemuxml2xmltest.
- Merge previous 3/7 and 4/7 into a single patch:
  capabilities: introduce crypto
- Add missing formatdomaincaps.rst.
- Several fixes from Michal Prívozník' crypto_review branch.
- Add caps and test for qemu-8.0.

Thanks to Michal for lots of suggestions!

v1:
This series supports crypto device, also add support for QEMU.
The basic xml schema looks like:
      <crypto model='virtio' type='qemu'>
        <backend model='builtin' queues='1'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
      </crypto>

      <crypto model='virtio' type='qemu'>
        <backend model='lkcf'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
      </crypto>

Each patch has been tested by 'ninja -C build test', and launch a QEMU
with crypto devices, it works fine.

zhenwei pi (5):
  conf: introduce crypto device
  capabilities: introduce crypto
  qemu: alias: support crypto device
  qemu: command: support crypto device
  NEWS: Document 'crypto' device

 NEWS.rst                                      |   3 +
 docs/formatdomain.rst                         |  21 +++
 docs/formatdomaincaps.rst                     |  33 ++++
 src/ch/ch_domain.c                            |   1 +
 src/conf/domain_capabilities.c                |  15 ++
 src/conf/domain_capabilities.h                |  12 ++
 src/conf/domain_conf.c                        | 158 ++++++++++++++++++
 src/conf/domain_conf.h                        |  39 +++++
 src/conf/domain_postparse.c                   |   1 +
 src/conf/domain_validate.c                    |  18 ++
 src/conf/schemas/domaincaps.rng               |  10 ++
 src/conf/schemas/domaincommon.rng             |  58 +++++++
 src/conf/virconftypes.h                       |   2 +
 src/libvirt_private.syms                      |   1 +
 src/qemu/qemu_alias.c                         |  23 +++
 src/qemu/qemu_capabilities.c                  |  30 ++++
 src/qemu/qemu_capabilities.h                  |   6 +
 src/qemu/qemu_command.c                       | 109 ++++++++++++
 src/qemu/qemu_domain.c                        |   3 +
 src/qemu/qemu_domain_address.c                |  26 +++
 src/qemu/qemu_driver.c                        |   5 +
 src/qemu/qemu_hotplug.c                       |   3 +
 src/qemu/qemu_validate.c                      |  22 +++
 .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml  |  11 ++
 .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml  |  11 ++
 .../qemu_4.2.0-virt.aarch64.xml               |  11 ++
 tests/domaincapsdata/qemu_4.2.0.aarch64.xml   |  11 ++
 tests/domaincapsdata/qemu_4.2.0.ppc64.xml     |  11 ++
 tests/domaincapsdata/qemu_4.2.0.s390x.xml     |  11 ++
 tests/domaincapsdata/qemu_4.2.0.x86_64.xml    |  11 ++
 .../domaincapsdata/qemu_5.0.0-q35.x86_64.xml  |  11 ++
 .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml  |  11 ++
 .../qemu_5.0.0-virt.aarch64.xml               |  11 ++
 tests/domaincapsdata/qemu_5.0.0.aarch64.xml   |  11 ++
 tests/domaincapsdata/qemu_5.0.0.ppc64.xml     |  11 ++
 tests/domaincapsdata/qemu_5.0.0.x86_64.xml    |  11 ++
 .../domaincapsdata/qemu_5.1.0-q35.x86_64.xml  |  11 ++
 .../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml  |  11 ++
 tests/domaincapsdata/qemu_5.1.0.sparc.xml     |   9 +
 tests/domaincapsdata/qemu_5.1.0.x86_64.xml    |  11 ++
 .../domaincapsdata/qemu_5.2.0-q35.x86_64.xml  |  11 ++
 .../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml  |  11 ++
 .../qemu_5.2.0-virt.aarch64.xml               |  11 ++
 tests/domaincapsdata/qemu_5.2.0.aarch64.xml   |  11 ++
 tests/domaincapsdata/qemu_5.2.0.ppc64.xml     |  11 ++
 tests/domaincapsdata/qemu_5.2.0.s390x.xml     |  11 ++
 tests/domaincapsdata/qemu_5.2.0.x86_64.xml    |  11 ++
 .../domaincapsdata/qemu_6.0.0-q35.x86_64.xml  |  11 ++
 .../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml  |  11 ++
 .../qemu_6.0.0-virt.aarch64.xml               |  11 ++
 tests/domaincapsdata/qemu_6.0.0.aarch64.xml   |  11 ++
 tests/domaincapsdata/qemu_6.0.0.s390x.xml     |  11 ++
 tests/domaincapsdata/qemu_6.0.0.x86_64.xml    |  11 ++
 .../domaincapsdata/qemu_6.1.0-q35.x86_64.xml  |  11 ++
 .../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml  |  11 ++
 tests/domaincapsdata/qemu_6.1.0.x86_64.xml    |  11 ++
 .../domaincapsdata/qemu_6.2.0-q35.x86_64.xml  |  11 ++
 .../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml  |  11 ++
 .../qemu_6.2.0-virt.aarch64.xml               |  11 ++
 tests/domaincapsdata/qemu_6.2.0.aarch64.xml   |  11 ++
 tests/domaincapsdata/qemu_6.2.0.ppc64.xml     |  11 ++
 tests/domaincapsdata/qemu_6.2.0.x86_64.xml    |  11 ++
 .../domaincapsdata/qemu_7.0.0-q35.x86_64.xml  |  11 ++
 .../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml  |  11 ++
 .../qemu_7.0.0-virt.aarch64.xml               |  11 ++
 tests/domaincapsdata/qemu_7.0.0.aarch64.xml   |  11 ++
 tests/domaincapsdata/qemu_7.0.0.ppc64.xml     |  11 ++
 tests/domaincapsdata/qemu_7.0.0.x86_64.xml    |  11 ++
 .../domaincapsdata/qemu_7.1.0-q35.x86_64.xml  |  11 ++
 .../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml  |  11 ++
 tests/domaincapsdata/qemu_7.1.0.ppc64.xml     |  11 ++
 tests/domaincapsdata/qemu_7.1.0.x86_64.xml    |  11 ++
 .../domaincapsdata/qemu_7.2.0-q35.x86_64.xml  |  12 ++
 .../domaincapsdata/qemu_7.2.0-tcg.x86_64.xml  |  12 ++
 tests/domaincapsdata/qemu_7.2.0.x86_64.xml    |  12 ++
 .../domaincapsdata/qemu_8.0.0-q35.x86_64.xml  |  12 ++
 .../domaincapsdata/qemu_8.0.0-tcg.x86_64.xml  |  12 ++
 tests/domaincapsdata/qemu_8.0.0.x86_64.xml    |  12 ++
 .../caps_4.2.0.aarch64.xml                    |   2 +
 .../qemucapabilitiesdata/caps_4.2.0.ppc64.xml |   2 +
 .../qemucapabilitiesdata/caps_4.2.0.s390x.xml |   2 +
 .../caps_4.2.0.x86_64.xml                     |   2 +
 .../caps_5.0.0.aarch64.xml                    |   2 +
 .../qemucapabilitiesdata/caps_5.0.0.ppc64.xml |   2 +
 .../caps_5.0.0.riscv64.xml                    |   2 +
 .../caps_5.0.0.x86_64.xml                     |   2 +
 .../qemucapabilitiesdata/caps_5.1.0.sparc.xml |   1 +
 .../caps_5.1.0.x86_64.xml                     |   2 +
 .../caps_5.2.0.aarch64.xml                    |   2 +
 .../qemucapabilitiesdata/caps_5.2.0.ppc64.xml |   2 +
 .../caps_5.2.0.riscv64.xml                    |   2 +
 .../qemucapabilitiesdata/caps_5.2.0.s390x.xml |   2 +
 .../caps_5.2.0.x86_64.xml                     |   2 +
 .../caps_6.0.0.aarch64.xml                    |   2 +
 .../qemucapabilitiesdata/caps_6.0.0.s390x.xml |   2 +
 .../caps_6.0.0.x86_64.xml                     |   2 +
 .../caps_6.1.0.x86_64.xml                     |   2 +
 .../caps_6.2.0.aarch64.xml                    |   2 +
 .../qemucapabilitiesdata/caps_6.2.0.ppc64.xml |   2 +
 .../caps_6.2.0.x86_64.xml                     |   2 +
 .../caps_7.0.0.aarch64.xml                    |   2 +
 .../qemucapabilitiesdata/caps_7.0.0.ppc64.xml |   2 +
 .../caps_7.0.0.x86_64.xml                     |   2 +
 .../qemucapabilitiesdata/caps_7.1.0.ppc64.xml |   2 +
 .../caps_7.1.0.x86_64.xml                     |   2 +
 .../caps_7.2.0.x86_64.xml                     |   3 +
 .../caps_8.0.0.x86_64.xml                     |   3 +
 tests/qemuxml2argvdata/crypto-builtin.xml     |  51 ++++++
 .../crypto-builtin.x86_64-latest.xml          |   1 +
 tests/qemuxml2xmltest.c                       |   2 +
 110 files changed, 1321 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/crypto-builtin.xml
 create mode 120000 tests/qemuxml2xmloutdata/crypto-builtin.x86_64-latest.xml

-- 
2.34.1



More information about the libvir-list mailing list