Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

qemu: Add microvm machine type support #121

Merged
merged 1 commit into from
Apr 24, 2020

Conversation

merwick
Copy link
Contributor

@merwick merwick commented Apr 23, 2020

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

@merwick
Copy link
Contributor Author

merwick commented Apr 23, 2020

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"'.

Copy link

@devimc devimc left a 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" {
Copy link

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?

Copy link
Contributor Author

@merwick merwick Apr 24, 2020

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>
@coveralls
Copy link

coveralls commented Apr 24, 2020

Coverage Status

Coverage decreased (-0.2%) to 81.039% when pulling 787c86b on merwick:microvm into e969afb on intel:master.

Copy link

@devimc devimc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @merwick

merwick added a commit to merwick/runtime that referenced this pull request Apr 24, 2020
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>
@devimc devimc merged commit f6f627a into kata-containers:master Apr 24, 2020
@@ -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 {
Copy link
Collaborator

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?

Copy link
Contributor Author

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)

@merwick merwick deleted the microvm branch April 24, 2020 14:40
merwick added a commit to merwick/runtime that referenced this pull request Apr 27, 2020
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>
merwick added a commit to merwick/runtime that referenced this pull request Apr 27, 2020
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>
merwick added a commit to merwick/runtime that referenced this pull request Apr 27, 2020
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>
merwick added a commit to merwick/runtime that referenced this pull request Apr 27, 2020
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>
merwick added a commit to merwick/runtime that referenced this pull request Apr 28, 2020
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>
merwick added a commit to merwick/runtime that referenced this pull request Apr 28, 2020
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>
merwick added a commit to merwick/runtime that referenced this pull request Apr 28, 2020
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>
merwick added a commit to merwick/runtime that referenced this pull request Apr 28, 2020
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>
merwick added a commit to merwick/runtime that referenced this pull request Apr 29, 2020
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>
bergwolf pushed a commit to bergwolf/kata-containers that referenced this pull request Jun 29, 2020
[ 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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants