Skip to content

Commit

Permalink
vTPM : fix arm issue by selecting correct dev name based on arch
Browse files Browse the repository at this point in the history
The vTPM device name is different on ARM and x86. This patch fixes the
the issue by selecting the correct device name based on the architecture.

Signed-off-by: Shahriyar Jalayeri <[email protected]>
  • Loading branch information
shjala authored and OhmSpectator committed Sep 13, 2024
1 parent af37037 commit f1d311e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/pillar/hypervisor/kvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,14 @@ const qemuSwtpmTemplate = `
chardev = "swtpm"
[device "tpm-tis"]
# 'virt' refers to aarch64
# 'tpm-tis-device' for aarch64 versus 'tpm-tis' for x86
# Reference: https://listman.redhat.com/archives/libvir-list/2021-February/msg00647.html
{{- if eq .Machine "virt"}}
driver = "tpm-tis-device"
{{- else}}
driver = "tpm-tis"
{{- end}}
tpmdev = "tpm0"
`

Expand Down

0 comments on commit f1d311e

Please sign in to comment.