Skip to content

Conversation

Apokleos
Copy link
Contributor

@Apokleos Apokleos commented May 30, 2025

  • Support cold plug of block devices via virtio-blk for Qemu
  • Enables block device and disable virtio-fs via capabilities

Fixes #11341

Signed-off-by: alex.lyn alex.lyn@antgroup.com

@Apokleos
Copy link
Contributor Author

Hey @mythi I have splited the two commits here. PTAL, Thx in advance.

} else {
CapabilityBits::BlockDeviceSupport
| CapabilityBits::BlockDeviceHotplugSupport
| CapabilityBits::FsSharingSupport
Copy link
Member

Choose a reason for hiding this comment

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

Not related to this patch, but when shared_fs = none is set, we should also make suyre that FsSharingSupport is disabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good cache! What do you think if I move the commit it into this PR ?

Copy link
Member

Choose a reason for hiding this comment

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

No, no need. Just remember to also adjust the other commit after this one gets merged.
Sounds fair?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, sound good to me. Thx

Copy link
Member

@fidencio fidencio left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @Apokleos!

@mythi
Copy link
Contributor

mythi commented May 30, 2025

Hey @mythi I have splited the two commits here. PTAL, Thx in advance.

thanks! I'm not familiar with the capability logic so leaving that to others.

Copy link
Member

@stevenhorsman stevenhorsman left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @Apokleos!

Copy link
Contributor

@pmores pmores left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @Apokleos !

@stevenhorsman
Copy link
Member

@Apokleos - Alex - I think this will need to be rebased to pick up some CI fixes. sorry for the inconvenience.

Apokleos added 2 commits June 11, 2025 10:19
Two key important scenarios:
(1) Support `virtio-blk-pci` cold plug capability for confidential guests
instead of nvdimm device in CVM due to security constraints in CoCo cases.
(2) Push initdata payload into compressed raw block device and insert it
in CVM through `virtio-blk-pci` cold plug mechanism.

Fixes kata-containers#11341

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
Kata runtime employs a CapabilityBits mechanism for VMM capability
governance. Fundamentally, this mechanism utilizes predefined feature
flags to manage the VMM's operational boundaries.

To meet demands for storage performance and security, it's necessary
to explicitly enable capability flags such as `BlockDeviceSupport`
(basic block device support) and `BlockDeviceHotplugSupport` (block
device hotplug) which ensures the VMM provides the expected caps.

In CoCo scenarios, due to the potential risks of sensitive data leaks
or side-channel attacks introduced by virtio-fs through shared file
systems, the `FsSharingSupport` flag must be forcibly disabled. This
disables the virtio-fs feature at the capability set level, blocking
insecure data channels.

Fixes kata-containers#11341

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
@Apokleos Apokleos merged commit e99070a into kata-containers:main Jun 11, 2025
325 of 351 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

runtime-rs: Support CoCo with block driver via virtio-blk instead of nvdimm and disable sharedfs
5 participants