virtcontainers: Move non QEMU specific constants to hypervisor.go

Hotplugging errors and 9pfs size are not particularily QEMU specific.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
This commit is contained in:
Samuel Ortiz 2021-11-24 19:16:17 +01:00
parent 10ae05914c
commit c91035d0e1
3 changed files with 6 additions and 4 deletions

View File

@ -14,6 +14,8 @@ import (
"strconv"
"strings"
"github.com/pkg/errors"
"github.com/kata-containers/kata-containers/src/runtime/pkg/govmm"
hv "github.com/kata-containers/kata-containers/src/runtime/pkg/hypervisors"
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/device/config"
@ -70,10 +72,13 @@ const (
// MinHypervisorMemory is the minimum memory required for a VM.
MinHypervisorMemory = 256
defaultMsize9p = 8192
)
var (
hvLogger = logrus.WithField("source", "virtcontainers/hypervisor")
hvLogger = logrus.WithField("source", "virtcontainers/hypervisor")
noGuestMemHotplugErr error = errors.New("guest memory hotplug not supported")
)
// In some architectures the maximum number of vCPUs depends on the number of physical cores.

View File

@ -128,8 +128,6 @@ const (
qemuStopSandboxTimeoutSecs = 15
)
var noGuestMemHotplugErr error = errors.New("guest memory hotplug not supported")
// agnostic list of kernel parameters
var defaultKernelParameters = []Param{
{"panic", "1"},

View File

@ -175,7 +175,6 @@ const (
defaultBridgeBus = "pcie.0"
defaultPCBridgeBus = "pci.0"
maxDevIDSize = 31
defaultMsize9p = 8192
pcieRootPortPrefix = "rp"
)