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 <shahriyar@zededa.com>
  • Loading branch information
shjala committed Sep 13, 2024
1 parent af37037 commit 9fe5015
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 9fe5015

Please sign in to comment.