-
Notifications
You must be signed in to change notification settings - Fork 100
qemu: Add microvm machine type support #121
Conversation
With these changes, plus some minor kata-runtime changes, I can specify 'machine_type = "microvm"' in /etc/kata-containers/configuration.toml and see a 170ms (13%) improvement in startup time and a 6% reduction in memory footprint compared with 'machine_type = "pc"'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@merwick thanks for raising this, just one comment
qemu/qemu.go
Outdated
@@ -128,6 +128,10 @@ const ( | |||
func isDimmSupported(config *Config) bool { | |||
switch runtime.GOARCH { | |||
case "amd64", "386": | |||
if config != nil && config.Machine.Type == "microvm" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you define a constant for microvm
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I added MachineTypeMicrovm (let me know if you prefer a different naming or to add other machine types (I decided not to as they'd be unused)). I pushed a revised commit.
Following on from kata-containers#111 which added support for multiple virtio transports, add code to use virtio-mmio as the transport when booting a guest with the microvm machine type and add a microvm case when checking for NUMA support. Also add a test case for machine string parsing. Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @merwick
With the addition of support to govmm for multiple transports (kata-containers/govmm#111) and microvm (kata-containers/govmm#121) we can now enable support for the 'microvm' machine type in kata-runtime. Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
@@ -153,6 +162,9 @@ const ( | |||
func (transport VirtioTransport) defaultTransport(config *Config) VirtioTransport { | |||
switch runtime.GOARCH { | |||
case "amd64", "386": | |||
if config != nil && config.Machine.Type == MachineTypeMicrovm { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this really also apply to 32-bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
microvm is supported by 32-bit QEMU - is that what would decide it?
$ i386-softmmu/qemu-system-i386 -machine help | grep microvm
microvm microvm (i386)
With the addition of support to govmm for multiple transports (kata-containers/govmm#111) and microvm (kata-containers/govmm#121) we can now enable support for the 'microvm' machine type in kata-runtime. Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
With the addition of support to govmm for multiple transports (kata-containers/govmm#111) and microvm (kata-containers/govmm#121) we can now enable support for the 'microvm' machine type in kata-runtime. Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
With the addition of support to govmm for multiple transports (kata-containers/govmm#111) and microvm (kata-containers/govmm#121) we can now enable support for the 'microvm' machine type in kata-runtime. Fixes: kata-containers#2360 Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
With the addition of support to govmm for multiple transports (kata-containers/govmm#111) and microvm (kata-containers/govmm#121) we can now enable support for the 'microvm' machine type in kata-runtime. Fixes: kata-containers#2360 Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
With the addition of support to govmm for multiple transports (kata-containers/govmm#111) and microvm (kata-containers/govmm#121) we can now enable support for the 'microvm' machine type in kata-runtime. Fixes: kata-containers#2360 Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
With the addition of support to govmm for multiple transports (kata-containers/govmm#111) and microvm (kata-containers/govmm#121) we can now enable support for the 'microvm' machine type in kata-runtime. Fixes: kata-containers#2360 Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
Bring support for 'microvm' machine type (kata-containers/govmm#121) shortlog: qemu: Add microvm machine type support Fixes: kata-containers#2360 Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
With the addition of support to govmm for multiple transports (kata-containers/govmm#111) and microvm (kata-containers/govmm#121) we can now enable support for the 'microvm' machine type in kata-runtime. Fixes: kata-containers#2360 Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
With the addition of support to govmm for multiple transports (kata-containers/govmm#111) and microvm (kata-containers/govmm#121) we can now enable support for the 'microvm' machine type in kata-runtime. Fixes: kata-containers#2360 Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
[ port from runtime commit 6aff077 ] With the addition of support to govmm for multiple transports (kata-containers/govmm#111) and microvm (kata-containers/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>
Following on from #111 which added support for multiple virtio transports,
add code to use virtio-mmio as the transport when booting a guest with
the microvm machine type and add a microvm case when checking for
NUMA support. Also add a test case for machine string parsing.
Signed-off-by: Liam Merwick liam.merwick@oracle.com