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
vfio_mode="guest-kernel" causes StartContainer failure #9614
Comments
Who owns the VFIO device, the DPU or the Host? |
VFIO device is owned by the Host. In the Host, VFIO devices are:
corresponding IOMMU groups for these VFIO devices are:
I worked around bunch of issues, then the VFIO device can be plugged into guest VM, it can be claimed by NIC driver(mlx5_core):
In the guest VM, the VFIO device is like:
For this issue, because VFIO device in guest VM is claimed by expected driver, and according to existing code, looks like |
Hi @l8huang Thanks for this report. I think we can fix this issue by dealing with "pci_fixups.push((host, guestdev));" even for vfio-pci-gk driver device, thus the following update_env_pci can do successfully. Could you submit a path to address this issue? Thanks. |
Will do. |
…device The `update_env_pci()` function need the PCI address mapping to translate the host PCI address to guest PCI address in below environment variables: - PCIDEVICE_<prefix>_<resource-name>_INFO - PCIDEVICE_<prefix>_<resource-name> So collect PCI address mapping for both vfio-pci-gk and vfio-pci devices. Fixes kata-containers#9614 Signed-off-by: Lei Huang <leih@nvidia.com>
In NVIDIA DPU VIFO passthrough case, the VFIO device should be claimed by mlx5_core driver in guest VM as a network interface(eth0), so
vfio_mode
is set toguest-kernel
:the VFIO device type will be
vfio-pci-gk
, below code will not be executed to override its driver tovfio-pci
and add it to pcimap:https://github.com/kata-containers/kata-containers/blob/main/src/agent/src/device.rs#L856-L872
Later when update_env_pci() is called, the
sandbox.pcimap
doesn't have the device mapping for thevfio-pci-gk
device, which causes error:Should
update_env_pci()
ignore devices which have typevfio-pci-gk
?The text was updated successfully, but these errors were encountered: