mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-23 09:14:27 +01:00
virtcontainers: x86: Support microvm machine type
[ port from runtime commit 6aff077901021d9a0075c446dfe281b2487e1487 ] With the addition of support to govmm for multiple transports (intel/govmm#111) and microvm (intel/govmm#121) we can now enable support for the 'microvm' machine type in kata-runtime. Signed-off-by: Liam Merwick <liam.merwick@oracle.com> Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
@@ -47,6 +47,10 @@ func TestQemuAmd64Capabilities(t *testing.T) {
|
||||
amd64 = newTestQemu(assert, QemuQ35)
|
||||
caps = amd64.capabilities()
|
||||
assert.True(caps.IsBlockDeviceHotplugSupported())
|
||||
|
||||
amd64 = newTestQemu(assert, QemuMicrovm)
|
||||
caps = amd64.capabilities()
|
||||
assert.False(caps.IsBlockDeviceHotplugSupported())
|
||||
}
|
||||
|
||||
func TestQemuAmd64Bridges(t *testing.T) {
|
||||
@@ -65,6 +69,11 @@ func TestQemuAmd64Bridges(t *testing.T) {
|
||||
assert.NotNil(b.Devices)
|
||||
}
|
||||
|
||||
amd64 = newTestQemu(assert, QemuMicrovm)
|
||||
amd64.bridges(uint32(len))
|
||||
bridges = amd64.getBridges()
|
||||
assert.Nil(bridges)
|
||||
|
||||
amd64 = newTestQemu(assert, QemuQ35)
|
||||
amd64.bridges(uint32(len))
|
||||
bridges = amd64.getBridges()
|
||||
@@ -256,3 +265,18 @@ func TestQemuAmd64Iommu(t *testing.T) {
|
||||
m := qemu.machine()
|
||||
assert.Contains(m.Options, "kernel_irqchip=split")
|
||||
}
|
||||
|
||||
func TestQemuAmd64Microvm(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
cfg := qemuConfig(QemuMicrovm)
|
||||
amd64, err := newQemuArch(cfg)
|
||||
assert.NoError(err)
|
||||
assert.False(cfg.DisableImageNvdimm)
|
||||
|
||||
for _, m := range supportedQemuMachines {
|
||||
assert.NotContains(m.Options, qemuNvdimmOption)
|
||||
}
|
||||
|
||||
assert.False(amd64.supportGuestMemoryHotplug())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user