gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/sentry/devices/accel/BUILD (about) 1 load("//tools:defs.bzl", "go_library") 2 load("//tools/go_generics:defs.bzl", "go_template_instance") 3 4 licenses(["notice"]) 5 6 go_library( 7 name = "accel", 8 srcs = [ 9 "devaddr_range.go", 10 "devaddr_set.go", 11 "device.go", 12 "gasket.go", 13 "seccomp_filters.go", 14 "tpu_v4.go", 15 "tpu_v4_mmap.go", 16 ], 17 visibility = ["//pkg/sentry:internal"], 18 deps = [ 19 "//pkg/abi/gasket", 20 "//pkg/abi/linux", 21 "//pkg/abi/tpu", 22 "//pkg/cleanup", 23 "//pkg/context", 24 "//pkg/devutil", 25 "//pkg/errors/linuxerr", 26 "//pkg/fdnotifier", 27 "//pkg/hostarch", 28 "//pkg/log", 29 "//pkg/safemem", 30 "//pkg/seccomp", 31 "//pkg/sentry/arch", 32 "//pkg/sentry/devices/tpuproxy", 33 "//pkg/sentry/fsimpl/eventfd", 34 "//pkg/sentry/kernel", 35 "//pkg/sentry/memmap", 36 "//pkg/sentry/mm", 37 "//pkg/sentry/vfs", 38 "//pkg/sync", 39 "//pkg/usermem", 40 "//pkg/waiter", 41 "@org_golang_x_exp//constraints:go_default_library", 42 "@org_golang_x_sys//unix:go_default_library", 43 ], 44 ) 45 46 go_template_instance( 47 name = "devaddr_range", 48 out = "devaddr_range.go", 49 package = "accel", 50 prefix = "DevAddr", 51 template = "//pkg/segment:generic_range", 52 types = { 53 "T": "uint64", 54 }, 55 ) 56 57 go_template_instance( 58 name = "devaddr_set", 59 out = "devaddr_set.go", 60 imports = { 61 "mm": "gvisor.dev/gvisor/pkg/sentry/mm", 62 }, 63 package = "accel", 64 prefix = "DevAddr", 65 template = "//pkg/segment:generic_set", 66 types = { 67 "Key": "uint64", 68 "Range": "DevAddrRange", 69 "Value": "pinnedAccelMem", 70 "Functions": "devAddrSetFuncs", 71 }, 72 )