runtime-rs: add Capability of HybridVsockSupport for Hypervisor.

Add Cap of HybridVsockSupport for hypervisors CLH and Dragonball
which use hybrid-vsock, default for Qemu, which uses legacy vsock.

Fixes: #8474

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
This commit is contained in:
alex.lyn 2023-12-04 14:38:06 +08:00
parent c5178dd258
commit 60f88da5e1
3 changed files with 8 additions and 3 deletions

View File

@ -83,7 +83,8 @@ impl CloudHypervisorInner {
capabilities.set(
CapabilityBits::BlockDeviceSupport
| CapabilityBits::BlockDeviceHotplugSupport
| CapabilityBits::FsSharingSupport,
| CapabilityBits::FsSharingSupport
| CapabilityBits::HybridVsockSupport,
);
let (tx, rx) = channel(true);

View File

@ -690,11 +690,14 @@ impl CloudHypervisorInner {
let flags = if guest_protection_is_tdx(self.guest_protection_to_use.clone()) {
// TDX does not permit the use of virtio-fs.
CapabilityBits::BlockDeviceSupport | CapabilityBits::BlockDeviceHotplugSupport
CapabilityBits::BlockDeviceSupport
| CapabilityBits::BlockDeviceHotplugSupport
| CapabilityBits::HybridVsockSupport
} else {
CapabilityBits::BlockDeviceSupport
| CapabilityBits::BlockDeviceHotplugSupport
| CapabilityBits::FsSharingSupport
| CapabilityBits::HybridVsockSupport
};
caps.set(flags);

View File

@ -76,7 +76,8 @@ impl DragonballInner {
capabilities.set(
CapabilityBits::BlockDeviceSupport
| CapabilityBits::BlockDeviceHotplugSupport
| CapabilityBits::FsSharingSupport,
| CapabilityBits::FsSharingSupport
| CapabilityBits::HybridVsockSupport,
);
DragonballInner {
id: "".to_string(),