From bdf48241457bc7b69b414c913f198d58799a76d2 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 27 Oct 2021 17:14:25 +1100 Subject: [PATCH] tools/packaging: Add options for VFIO to guest kernel Pull #2795 recently added support for a closer-to-OCI behaviour for VFIO devices, in which they appear to the container as VFIO devices, rather than being interpreted by the guest kernel. However, in order to use this, the Kata guest kernel needs to include the VFIO PCI driver, along with dependencies like the Intel IOMMU driver. The kernel as built by the scripts within Kata don't currently include those, so this patch adds them. fixes #2913 Signed-off-by: David Gibson --- tools/packaging/kernel/configs/fragments/common/vfio.conf | 5 +++++ tools/packaging/kernel/configs/fragments/x86_64/vfio.conf | 3 +++ tools/packaging/kernel/kata_config_version | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tools/packaging/kernel/configs/fragments/common/vfio.conf create mode 100644 tools/packaging/kernel/configs/fragments/x86_64/vfio.conf diff --git a/tools/packaging/kernel/configs/fragments/common/vfio.conf b/tools/packaging/kernel/configs/fragments/common/vfio.conf new file mode 100644 index 0000000000..32da819e25 --- /dev/null +++ b/tools/packaging/kernel/configs/fragments/common/vfio.conf @@ -0,0 +1,5 @@ +# Options we need in order to handle vfio_mode=vfio devices + +CONFIG_IOMMU_SUPPORT=y +CONFIG_VFIO=y +CONFIG_VFIO_PCI=y diff --git a/tools/packaging/kernel/configs/fragments/x86_64/vfio.conf b/tools/packaging/kernel/configs/fragments/x86_64/vfio.conf new file mode 100644 index 0000000000..09a4bf02f1 --- /dev/null +++ b/tools/packaging/kernel/configs/fragments/x86_64/vfio.conf @@ -0,0 +1,3 @@ +# x86 specific items we need in order to handle vfio_mode=vfio devices +CONFIG_INTEL_IOMMU=y +CONFIG_IRQ_REMAP=y diff --git a/tools/packaging/kernel/kata_config_version b/tools/packaging/kernel/kata_config_version index 8cf5c1a22a..84df3526d8 100644 --- a/tools/packaging/kernel/kata_config_version +++ b/tools/packaging/kernel/kata_config_version @@ -1 +1 @@ -86 +87