Skip to content

Commit

Permalink
Add the iommu specification for hardware
Browse files Browse the repository at this point in the history
Signed-off-by: Han Han <hhan@redhat.com>
  • Loading branch information
qiankehan committed Jul 21, 2024
1 parent af80827 commit 5890c84
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ can now be used in the :ref:`plugins/report/junit` and
failures or the full standard output should be included in the
generated report.

Add the specification key :ref:`/spec/hardware/iommu` to select or
provision a guest with `Input–output memory management unit`


tmt-1.34
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
26 changes: 26 additions & 0 deletions spec/hardware/iommu.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
summary: |
Select or provision a guest with the `Input–output memory management unit`.

description: |
.. code-block::

iommu:
# Boolean, whether the guest supports IOMMU
is-supported: "x"
# String, the model name for virtualizated IOMMU
model: "virtio"|"intel"|"smmuv3"

.. versionadded:: 1.35

example:
- |
# Require a guest that supports IOMMU
iommu:
is-supported: true|false

- |
# Require a guest with the IOMMU of virtio model
iommu:
is-supported: true|false
model: virtio

17 changes: 17 additions & 0 deletions tmt/schemas/provision/hardware.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,20 @@ definitions:
# empty `boot`.
minProperties: 1

# Hw requirements `iommu` block
iommu:
type: object

properties:
is-supported:
type: boolean

model:
type: string

additionalProperties: false
minProperties: 1

# HW requirements: basic block
block:
type: object
Expand Down Expand Up @@ -383,6 +397,9 @@ definitions:
virtualization:
"$ref": "#/definitions/virtualization"

iommu:
"$ref": "#/definitions/iommu"

additionalProperties: false

# enforce at least one property - we don't care which one, but we don't want
Expand Down

0 comments on commit 5890c84

Please sign in to comment.