mirror of
https://github.com/lima-vm/lima.git
synced 2026-10-28 11:44:35 +08:00
Merge pull request #5544 from unsuman/fix-5511
driver(qemu): disable the TPM PPI on HVF with QEMU >= 11.0
This commit is contained in:
1 file changed
+9
-1
@@ -796,7 +796,15 @@ func Cmdline(ctx context.Context, cfg Config) (exe string, args []string, err er
|
||||
default:
|
||||
return "", nil, fmt.Errorf("TPM is not supported for architecture %#q", *y.Arch)
|
||||
}
|
||||
args = append(args, "-device", tpmDevice+",tpmdev=tpm0")
|
||||
tpmDevice += ",tpmdev=tpm0"
|
||||
// QEMU >= 11.0 aborts under HVF when the guest has a RAM region smaller than the host page
|
||||
// size, and the TPM PPI region is 0x400 bytes.
|
||||
// https://gitlab.com/qemu-project/qemu/-/issues/4587
|
||||
if accel == "hvf" && version != nil && !version.LessThan(*semver.New("11.0.0")) {
|
||||
logrus.Warnf("Disabling the TPM PPI to work around https://gitlab.com/qemu-project/qemu/-/issues/4587 (QEMU %v with HVF); QEMU 10.1.x does not need this", version)
|
||||
tpmDevice += ",ppi=off"
|
||||
}
|
||||
args = append(args, "-device", tpmDevice)
|
||||
}
|
||||
|
||||
// Network
|
||||
|
||||
Reference in new issue
Block a user