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 committed Sep 13, 2024
1 parent af37037 commit be35031
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion 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"]
driver = "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 be35031

Please sign in to comment.