mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 20:54:26 +00:00
qemu/arm64: disable image nvdimm if no firmware offered
For now, image nvdimm on qemu/arm64 depends on UEFI/ACPI, so if there is no firmware offered, it should be disabled. Fixes: #6468 Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
This commit is contained in:
parent
dc42f0a33b
commit
ece5edc641
@ -768,6 +768,16 @@ func newQemuHypervisorConfig(h hypervisor) (vc.HypervisorConfig, error) {
|
|||||||
kataUtilsLogger.Info("Setting 'disable_image_nvdimm = true' as microvm does not support NVDIMM")
|
kataUtilsLogger.Info("Setting 'disable_image_nvdimm = true' as microvm does not support NVDIMM")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Nvdimm can only be support when UEFI/ACPI is enabled on arm64, otherwise disable it.
|
||||||
|
if goruntime.GOARCH == "arm64" && firmware == "" {
|
||||||
|
if p, err := h.PFlash(); err == nil {
|
||||||
|
if len(p) == 0 {
|
||||||
|
h.DisableImageNvdimm = true
|
||||||
|
kataUtilsLogger.Info("Setting 'disable_image_nvdimm = true' if there is no firmware specified")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
blockDriver, err := h.blockDeviceDriver()
|
blockDriver, err := h.blockDeviceDriver()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return vc.HypervisorConfig{}, err
|
return vc.HypervisorConfig{}, err
|
||||||
|
@ -13,6 +13,7 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
goruntime "runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
"testing"
|
"testing"
|
||||||
@ -181,6 +182,10 @@ func createAllRuntimeConfigFiles(dir, hypervisor string) (config testRuntimeConf
|
|||||||
SGXEPCSize: epcSize,
|
SGXEPCSize: epcSize,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if goruntime.GOARCH == "arm64" && len(hypervisorConfig.PFlash) == 0 && hypervisorConfig.FirmwarePath == "" {
|
||||||
|
hypervisorConfig.DisableImageNvdimm = true
|
||||||
|
}
|
||||||
|
|
||||||
agentConfig := vc.KataAgentConfig{
|
agentConfig := vc.KataAgentConfig{
|
||||||
LongLiveConn: true,
|
LongLiveConn: true,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user