From 3d56edf4a961a522ffc4d422c7d7f80eaa970391 Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Fri, 21 Oct 2022 23:07:21 -0700 Subject: [PATCH] ANDROID: kleaf: Initial list of ddk_headers (2: virtual_device_x86_64) This CL includes headers used by the external modules of virtual_device_x86_64. Allowlist: This is a list of headers and a list of include directories that are known to be safe to be used by modules. - This list includes: - Everything under - arch/x86/include - include Unsafe list: This is the list of headers that are known to be used by the external modules of virtual_device_x86_64, minus allowlist. This means, with the allowlist and unsafe list, the certain Pixel device kernel build can be transitioned to DDK without any change to the source code. - Note that for cleaness of DDK modules, we may want to remove some items in the allowlist of includes and require device source code to #include from the correct directory. The command to generate this list is: bazel run //build/kernel/kleaf:gen_ddk_headers \ --gen_ddk_headers_target=//common-modules/virtual-device:virtual_device_x86_64_modules_install \ --gen_ddk_headers_input_archives=//common:kernel_x86_64_ddk_allowlist_headers \ -- -k Manual edits: - arch/arm64/include/ is added back. This is due to a limitation of the generation script that globs aren't properly handled. Bug: 248351908 Signed-off-by: Yifan Hong Change-Id: I0eae9213493d78a6899aa15c8096f3c7694328a3 --- BUILD.bazel | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BUILD.bazel b/BUILD.bazel index 7e08410d8081..6cb4aafe1e3d 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -274,6 +274,8 @@ ddk_headers( includes = [ "arch/arm64/include", "arch/arm64/include/uapi", + "arch/x86/include", + "arch/x86/include/uapi", "include", "include/uapi", ], @@ -287,6 +289,7 @@ filegroup( name = "all_headers_allowlist_globs", srcs = glob([ "arch/arm64/include/**/*.h", + "arch/x86/include/**/*.h", "include/**/*.h", ]), visibility = ["//visibility:private"], @@ -305,6 +308,7 @@ ddk_headers( "drivers/dma-buf/heaps/deferred-free-helper.h", "drivers/dma-buf/heaps/page_pool.h", "drivers/dma/dmaengine.h", + "drivers/gpu/drm/virtio/virtgpu_trace.h", "drivers/pci/controller/dwc/pcie-designware.h", "drivers/pinctrl/core.h", "drivers/pinctrl/samsung/pinctrl-samsung.h",