Hi,

This adds 'scalable_mode' and 'first_stage' attributes to intel IOMMU so
that emulated device can run with first stage translation.

This is based on Nathan Chen's iommufd series v2[1], so for passthrough
device, nested tranlation is enabled automatically with below config:

    <iommu model='intel'>
      <driver caching_mode='on' iotlb='on' scalable_mode='on' first_stage='on'/>
    </iommu>

Tests:
Basic net card passthrough
libvirt selftest

Thanks
Zhenzhong

[1] 
https://lists.libvirt.org/archives/list/[email protected]/thread/KFYUQGMXWV64QPI245H66GKRNAYL7LGB/

Zhenzhong Duan (3):
  qemu: Introduce scalable_mode and first_stage capabilities
  conf: add support for 'scalable_mode' and 'first_stage' attributes to
    intel IOMMU
  qemu: Add command line support for scalable mode and first stage of
    virtual vtd

 docs/formatdomain.rst                         |  8 +++++
 src/conf/domain_conf.c                        | 35 ++++++++++++++++++-
 src/conf/domain_conf.h                        |  2 ++
 src/conf/domain_validate.c                    |  6 ++++
 src/conf/schemas/domaincommon.rng             | 10 ++++++
 src/qemu/qemu_capabilities.c                  |  4 +++
 src/qemu/qemu_capabilities.h                  |  2 ++
 src/qemu/qemu_command.c                       |  2 ++
 src/qemu/qemu_validate.c                      | 12 +++++++
 .../caps_10.0.0_x86_64+amdsev.xml             |  2 ++
 .../caps_10.0.0_x86_64.xml                    |  2 ++
 .../caps_10.1.0_x86_64+inteltdx.xml           |  2 ++
 .../caps_10.1.0_x86_64.xml                    |  2 ++
 .../caps_10.2.0_x86_64.xml                    |  2 ++
 .../caps_6.2.0_x86_64.xml                     |  1 +
 .../caps_7.0.0_x86_64.xml                     |  1 +
 .../caps_7.1.0_x86_64.xml                     |  1 +
 .../caps_7.2.0_x86_64+hvf.xml                 |  1 +
 .../caps_7.2.0_x86_64.xml                     |  1 +
 .../caps_8.0.0_x86_64.xml                     |  1 +
 .../caps_8.1.0_x86_64.xml                     |  1 +
 .../caps_8.2.0_x86_64.xml                     |  1 +
 .../caps_9.0.0_x86_64.xml                     |  1 +
 .../caps_9.1.0_x86_64.xml                     |  1 +
 .../caps_9.2.0_x86_64+amdsev.xml              |  1 +
 .../caps_9.2.0_x86_64.xml                     |  1 +
 26 files changed, 102 insertions(+), 1 deletion(-)

-- 
2.47.3

Reply via email to