From 44a2c0cc2bf48e828b49886fb75be0a5bac0cbfb Mon Sep 17 00:00:00 2001 From: Jiandi An Date: Wed, 12 Aug 2026 19:03:32 -0500 Subject: [PATCH] NVIDIA: VR: SAUCE: vfio/cxl: include for FIELD_GET vfio_cxl_core.c uses FIELD_GET() to decode the CXL DVSEC capability register but does not include . It has only compiled because on arm64 the macro is pulled in transitively: linux/slab.h -> linux/cache.h -> arch/arm64/include/asm/cache.h -> asm/cputype.h -> asm/sysreg.h, and arm64's asm/sysreg.h includes . The nvidia-bos kernel is also built for amd64, where that arm64-only header chain does not exist. There FIELD_GET is undefined and the build fails with "implicit declaration of function 'FIELD_GET'". Include directly so the file no longer relies on any architecture's transitive include graph. This fix is only needed for commit 3570209d539a ("NVIDIA: VR: SAUCE: vfio/cxl: Virtualize CXL DVSEC config writes"), which is derived from the v2 posting of the CXL VFIO Type-2 passthrough series. Version 3 and later of that upstream series already include in this file directly, so once the tree moves to v3+ this change becomes redundant and drops out naturally. Fixes: 3570209d539a ("NVIDIA: VR: SAUCE: vfio/cxl: Virtualize CXL DVSEC config writes") Signed-off-by: Jiandi An --- drivers/vfio/pci/cxl/vfio_cxl_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vfio/pci/cxl/vfio_cxl_core.c b/drivers/vfio/pci/cxl/vfio_cxl_core.c index 813c72a658ea..b1a148c946f1 100644 --- a/drivers/vfio/pci/cxl/vfio_cxl_core.c +++ b/drivers/vfio/pci/cxl/vfio_cxl_core.c @@ -13,6 +13,7 @@ * CXL subsystem and require direct DPA region access from the guest. */ +#include #include #include #include