From 0419ab6f39b1e797c42a1fe38b1c7da41efc4db6 Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Fri, 24 Apr 2026 19:58:18 +0000 Subject: [PATCH] vmm: OpenAPI: Make DeviceConfig `path` optional `path` is no longer required in the DeviceConfig, since a VFIO device may also be supplied via a pre-opened cdev FD passed via SCM_RIGHTS alongside the /vm.add-device request. Signed-off-by: Bo Chen Assisted-by: Claude:Opus-4.7 --- vmm/src/api/openapi/cloud-hypervisor.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vmm/src/api/openapi/cloud-hypervisor.yaml b/vmm/src/api/openapi/cloud-hypervisor.yaml index e27117528..29476bcd5 100644 --- a/vmm/src/api/openapi/cloud-hypervisor.yaml +++ b/vmm/src/api/openapi/cloud-hypervisor.yaml @@ -1285,12 +1285,15 @@ components: type: integer DeviceConfig: - required: - - path type: object properties: path: type: string + description: | + Sysfs path of the VFIO device. Exactly one of `path` or an + externally-opened cdev FD must be supplied; an FD is passed + out of band via SCM_RIGHTS on the UNIX domain socket, never + in this body. iommu: type: boolean default: false