mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
tests: Add TPM coverage to default-models tests
We have a non-trivial amount of architecture-specific logic dealing with TPM, so it's good to have coverage for it. Note that two architectures currently don't have support for TPM devices enabled by default in QEMU: loongarch64 and s390x. The situation might change for the former, but that's unlikely to happen for the latter. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
f8ec3f9c2f
commit
f91e53c63e
@ -38,6 +38,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
|
||||
-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.2","addr":"0x0"}' \
|
||||
-chardev pty,id=charserial0 \
|
||||
-serial chardev:charserial0 \
|
||||
-chardev socket,id=chrtpm,path=/dev/test \
|
||||
-tpmdev emulator,id=tpm-tpm0,chardev=chrtpm \
|
||||
-device '{"driver":"tpm-tis-device","tpmdev":"tpm-tpm0","id":"tpm0"}' \
|
||||
-audiodev '{"id":"audio1","driver":"none"}' \
|
||||
-device '{"driver":"virtio-gpu-pci","id":"video0","max_outputs":1,"bus":"pci.5","addr":"0x0"}' \
|
||||
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
|
||||
|
@ -69,6 +69,9 @@
|
||||
<console type='pty'>
|
||||
<target type='serial' port='0'/>
|
||||
</console>
|
||||
<tpm model='tpm-tis'>
|
||||
<backend type='emulator' version='2.0'/>
|
||||
</tpm>
|
||||
<audio id='1' type='none'/>
|
||||
<video>
|
||||
<model type='virtio' heads='1' primary='yes'/>
|
||||
|
@ -38,6 +38,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
|
||||
-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.2","addr":"0x0"}' \
|
||||
-chardev pty,id=charserial0 \
|
||||
-serial chardev:charserial0 \
|
||||
-chardev socket,id=chrtpm,path=/dev/test \
|
||||
-tpmdev emulator,id=tpm-tpm0,chardev=chrtpm \
|
||||
-device '{"driver":"tpm-tis-device","tpmdev":"tpm-tpm0","id":"tpm0"}' \
|
||||
-audiodev '{"id":"audio1","driver":"none"}' \
|
||||
-device '{"driver":"virtio-gpu-pci","id":"video0","max_outputs":1,"bus":"pci.5","addr":"0x0"}' \
|
||||
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
|
||||
|
@ -69,6 +69,9 @@
|
||||
<console type='pty'>
|
||||
<target type='serial' port='0'/>
|
||||
</console>
|
||||
<tpm model='tpm-tis'>
|
||||
<backend type='emulator' version='2.0'/>
|
||||
</tpm>
|
||||
<audio id='1' type='none'/>
|
||||
<video>
|
||||
<model type='virtio' heads='1' primary='yes'/>
|
||||
|
@ -14,6 +14,9 @@
|
||||
<mac address='52:54:00:09:a4:37'/>
|
||||
</interface>
|
||||
<serial type='pty'/>
|
||||
<tpm>
|
||||
<backend type='emulator'/>
|
||||
</tpm>
|
||||
<video/>
|
||||
<memballoon model='none'/>
|
||||
<!-- No default model for <panic/> on aarch64 -->
|
||||
|
@ -14,6 +14,9 @@
|
||||
<mac address='52:54:00:09:a4:37'/>
|
||||
</interface>
|
||||
<serial type='pty'/>
|
||||
<!-- loongarch64 could probably use TPM but the necessary devices
|
||||
are currently disabled in the default QEMU configuration for the
|
||||
architecture. If that ever changes, add coverage here -->
|
||||
<video/>
|
||||
<memballoon model='none'/>
|
||||
<!-- No default model for <panic/> on loongarch64 -->
|
||||
|
@ -32,6 +32,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
|
||||
-device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.0","addr":"0x1"}' \
|
||||
-chardev pty,id=charserial0 \
|
||||
-device '{"driver":"spapr-vty","chardev":"charserial0","id":"serial0","reg":805306368}' \
|
||||
-chardev socket,id=chrtpm,path=/dev/test \
|
||||
-tpmdev emulator,id=tpm-tpm0,chardev=chrtpm \
|
||||
-device '{"driver":"tpm-spapr","tpmdev":"tpm-tpm0","id":"tpm0","reg":16384}' \
|
||||
-audiodev '{"id":"audio1","driver":"none"}' \
|
||||
-device '{"driver":"VGA","id":"video0","vgamem_mb":16,"bus":"pci.0","addr":"0x3"}' \
|
||||
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
|
||||
|
@ -42,6 +42,10 @@
|
||||
<target type='serial' port='0'/>
|
||||
<address type='spapr-vio' reg='0x30000000'/>
|
||||
</console>
|
||||
<tpm model='tpm-spapr'>
|
||||
<backend type='emulator' version='2.0'/>
|
||||
<address type='spapr-vio' reg='0x00004000'/>
|
||||
</tpm>
|
||||
<audio id='1' type='none'/>
|
||||
<video>
|
||||
<model type='vga' vram='16384' heads='1' primary='yes'/>
|
||||
|
@ -32,6 +32,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
|
||||
-device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.0","addr":"0x1"}' \
|
||||
-chardev pty,id=charserial0 \
|
||||
-device '{"driver":"spapr-vty","chardev":"charserial0","id":"serial0","reg":805306368}' \
|
||||
-chardev socket,id=chrtpm,path=/dev/test \
|
||||
-tpmdev emulator,id=tpm-tpm0,chardev=chrtpm \
|
||||
-device '{"driver":"tpm-spapr","tpmdev":"tpm-tpm0","id":"tpm0","reg":16384}' \
|
||||
-audiodev '{"id":"audio1","driver":"none"}' \
|
||||
-device '{"driver":"VGA","id":"video0","vgamem_mb":16,"bus":"pci.0","addr":"0x3"}' \
|
||||
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
|
||||
|
@ -42,6 +42,10 @@
|
||||
<target type='serial' port='0'/>
|
||||
<address type='spapr-vio' reg='0x30000000'/>
|
||||
</console>
|
||||
<tpm model='tpm-spapr'>
|
||||
<backend type='emulator' version='2.0'/>
|
||||
<address type='spapr-vio' reg='0x00004000'/>
|
||||
</tpm>
|
||||
<audio id='1' type='none'/>
|
||||
<video>
|
||||
<model type='vga' vram='16384' heads='1' primary='yes'/>
|
||||
|
@ -14,6 +14,9 @@
|
||||
<mac address='52:54:00:09:a4:37'/>
|
||||
</interface>
|
||||
<serial type='pty'/>
|
||||
<tpm>
|
||||
<backend type='emulator'/>
|
||||
</tpm>
|
||||
<video/>
|
||||
<memballoon model='none'/>
|
||||
<panic/>
|
||||
|
@ -36,6 +36,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
|
||||
-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.2","addr":"0x0"}' \
|
||||
-chardev pty,id=charserial0 \
|
||||
-serial chardev:charserial0 \
|
||||
-chardev socket,id=chrtpm,path=/dev/test \
|
||||
-tpmdev emulator,id=tpm-tpm0,chardev=chrtpm \
|
||||
-device '{"driver":"tpm-tis-device","tpmdev":"tpm-tpm0","id":"tpm0"}' \
|
||||
-audiodev '{"id":"audio1","driver":"none"}' \
|
||||
-device '{"driver":"virtio-vga","id":"video0","max_outputs":1,"bus":"pci.4","addr":"0x0"}' \
|
||||
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
|
||||
|
@ -58,6 +58,9 @@
|
||||
<console type='pty'>
|
||||
<target type='serial' port='0'/>
|
||||
</console>
|
||||
<tpm model='tpm-tis'>
|
||||
<backend type='emulator' version='1.2'/>
|
||||
</tpm>
|
||||
<audio id='1' type='none'/>
|
||||
<video>
|
||||
<model type='virtio' heads='1' primary='yes'/>
|
||||
|
@ -36,6 +36,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
|
||||
-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.2","addr":"0x0"}' \
|
||||
-chardev pty,id=charserial0 \
|
||||
-serial chardev:charserial0 \
|
||||
-chardev socket,id=chrtpm,path=/dev/test \
|
||||
-tpmdev emulator,id=tpm-tpm0,chardev=chrtpm \
|
||||
-device '{"driver":"tpm-tis-device","tpmdev":"tpm-tpm0","id":"tpm0"}' \
|
||||
-audiodev '{"id":"audio1","driver":"none"}' \
|
||||
-device '{"driver":"virtio-vga","id":"video0","max_outputs":1,"bus":"pci.4","addr":"0x0"}' \
|
||||
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
|
||||
|
@ -58,6 +58,9 @@
|
||||
<console type='pty'>
|
||||
<target type='serial' port='0'/>
|
||||
</console>
|
||||
<tpm model='tpm-tis'>
|
||||
<backend type='emulator' version='1.2'/>
|
||||
</tpm>
|
||||
<audio id='1' type='none'/>
|
||||
<video>
|
||||
<model type='virtio' heads='1' primary='yes'/>
|
||||
|
@ -14,6 +14,9 @@
|
||||
<mac address='52:54:00:09:a4:37'/>
|
||||
</interface>
|
||||
<serial type='pty'/>
|
||||
<tpm>
|
||||
<backend type='emulator'/>
|
||||
</tpm>
|
||||
<video/>
|
||||
<memballoon model='none'/>
|
||||
<!-- No default model for <panic/> on riscv64 -->
|
||||
|
@ -14,6 +14,8 @@
|
||||
<mac address='52:54:00:09:a4:37'/>
|
||||
</interface>
|
||||
<serial type='pty'/>
|
||||
<!-- QEMU doesn't currently support TPM devices on s390x and there
|
||||
are no plans for that to change in the future -->
|
||||
<video/>
|
||||
<memballoon model='none'/>
|
||||
<panic/>
|
||||
|
@ -32,6 +32,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
|
||||
-device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.0","addr":"0x3"}' \
|
||||
-chardev pty,id=charserial0 \
|
||||
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
|
||||
-chardev socket,id=chrtpm,path=/dev/test \
|
||||
-tpmdev emulator,id=tpm-tpm0,chardev=chrtpm \
|
||||
-device '{"driver":"tpm-tis","tpmdev":"tpm-tpm0","id":"tpm0"}' \
|
||||
-audiodev '{"id":"audio1","driver":"none"}' \
|
||||
-device '{"driver":"cirrus-vga","id":"video0","bus":"pci.0","addr":"0x2"}' \
|
||||
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
|
||||
|
@ -39,6 +39,9 @@
|
||||
</console>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<input type='keyboard' bus='ps2'/>
|
||||
<tpm model='tpm-tis'>
|
||||
<backend type='emulator' version='1.2'/>
|
||||
</tpm>
|
||||
<audio id='1' type='none'/>
|
||||
<video>
|
||||
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
|
||||
|
@ -32,6 +32,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
|
||||
-device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.0","addr":"0x3"}' \
|
||||
-chardev pty,id=charserial0 \
|
||||
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
|
||||
-chardev socket,id=chrtpm,path=/dev/test \
|
||||
-tpmdev emulator,id=tpm-tpm0,chardev=chrtpm \
|
||||
-device '{"driver":"tpm-tis","tpmdev":"tpm-tpm0","id":"tpm0"}' \
|
||||
-audiodev '{"id":"audio1","driver":"none"}' \
|
||||
-device '{"driver":"cirrus-vga","id":"video0","bus":"pci.0","addr":"0x2"}' \
|
||||
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
|
||||
|
@ -39,6 +39,9 @@
|
||||
</console>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<input type='keyboard' bus='ps2'/>
|
||||
<tpm model='tpm-tis'>
|
||||
<backend type='emulator' version='1.2'/>
|
||||
</tpm>
|
||||
<audio id='1' type='none'/>
|
||||
<video>
|
||||
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
|
||||
|
@ -14,6 +14,9 @@
|
||||
<mac address='52:54:00:09:a4:37'/>
|
||||
</interface>
|
||||
<serial type='pty'/>
|
||||
<tpm>
|
||||
<backend type='emulator'/>
|
||||
</tpm>
|
||||
<video/>
|
||||
<memballoon model='none'/>
|
||||
<panic/>
|
||||
|
@ -35,6 +35,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
|
||||
-device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.2","addr":"0x1"}' \
|
||||
-chardev pty,id=charserial0 \
|
||||
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
|
||||
-chardev socket,id=chrtpm,path=/dev/test \
|
||||
-tpmdev emulator,id=tpm-tpm0,chardev=chrtpm \
|
||||
-device '{"driver":"tpm-tis","tpmdev":"tpm-tpm0","id":"tpm0"}' \
|
||||
-audiodev '{"id":"audio1","driver":"none"}' \
|
||||
-device '{"driver":"cirrus-vga","id":"video0","bus":"pcie.0","addr":"0x1"}' \
|
||||
-global ICH9-LPC.noreboot=off \
|
||||
|
@ -56,6 +56,9 @@
|
||||
</console>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<input type='keyboard' bus='ps2'/>
|
||||
<tpm model='tpm-tis'>
|
||||
<backend type='emulator' version='1.2'/>
|
||||
</tpm>
|
||||
<audio id='1' type='none'/>
|
||||
<video>
|
||||
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
|
||||
|
@ -35,6 +35,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
|
||||
-device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.2","addr":"0x1"}' \
|
||||
-chardev pty,id=charserial0 \
|
||||
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
|
||||
-chardev socket,id=chrtpm,path=/dev/test \
|
||||
-tpmdev emulator,id=tpm-tpm0,chardev=chrtpm \
|
||||
-device '{"driver":"tpm-tis","tpmdev":"tpm-tpm0","id":"tpm0"}' \
|
||||
-audiodev '{"id":"audio1","driver":"none"}' \
|
||||
-device '{"driver":"cirrus-vga","id":"video0","bus":"pcie.0","addr":"0x1"}' \
|
||||
-global ICH9-LPC.noreboot=off \
|
||||
|
@ -56,6 +56,9 @@
|
||||
</console>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<input type='keyboard' bus='ps2'/>
|
||||
<tpm model='tpm-tis'>
|
||||
<backend type='emulator' version='1.2'/>
|
||||
</tpm>
|
||||
<audio id='1' type='none'/>
|
||||
<video>
|
||||
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
|
||||
|
@ -14,6 +14,9 @@
|
||||
<mac address='52:54:00:09:a4:37'/>
|
||||
</interface>
|
||||
<serial type='pty'/>
|
||||
<tpm>
|
||||
<backend type='emulator'/>
|
||||
</tpm>
|
||||
<video/>
|
||||
<memballoon model='none'/>
|
||||
<panic/>
|
||||
|
Loading…
Reference in New Issue
Block a user