New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clh: Support VFIO device unplug #861
clh: Support VFIO device unplug #861
Conversation
The cloud-hypervisor commit `6d30fe05` introduced a fix on its API for VFIO device hotplug (`VmAddDevice`), which is required for supporting VFIO unplug through openAPI calls in kata. Signed-off-by: Bo Chen <chen.bo@intel.com>
We can rely on the error handling of the actual HTTP API calls to catch errors, and don't need to call VmmPing explicitly in advance. Signed-off-by: Bo Chen <chen.bo@intel.com>
/test-clh |
This patch adds the support of VFIO device unplug when using cloud-hypervisor. Fixes: kata-containers#860 Signed-off-by: Bo Chen <chen.bo@intel.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.
/test-ubuntu |
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 @likebreath.
lgtm
_, err := cl.VmRemoveDevicePut(ctx, chclient.VmRemoveDevice{Id: device.ID}) | ||
|
||
if err != nil { | ||
err = fmt.Errorf("failed to hotplug remove vfio device %+v %s", device, openAPIClientError(err)) |
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.
Nit: I'd consider adding a colon just before the original error:
err = fmt.Errorf("failed to hotplug remove vfio device %+v %s", device, openAPIClientError(err)) | |
err = fmt.Errorf("failed to hotplug remove vfio device %+v: %s", device, openAPIClientError(err)) |
Forward port PR kata-containers/runtime#2996 for issue kata-containers/runtime#2569.
This patch adds the support of VFIO device unplug when using
cloud-hypervisor.
Fixes: #860
Signed-off-by: Bo Chen chen.bo@intel.com