Re: [PATCH v18 3/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper
From: Ankit Agrawal <ankita@nvidia.com>
Date: 2024-02-19 09:36:29
Also in:
kvm, lkml
From: Ankit Agrawal <ankita@nvidia.com>
Date: 2024-02-19 09:36:29
Also in:
kvm, lkml
quoted
diff --git a/drivers/vfio/pci/nvgrace-gpu/main.cb/drivers/vfio/pci/nvgrace-gpu/main.c new file mode 100644 index 000000000000..5a251a6a782e--- /dev/null +++ b/drivers/vfio/pci/nvgrace-gpu/main.c@@ -0,0 +1,888 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rightsreserved + */ + +#include <linux/vfio_pci_core.h> +#include <linux/sizes.h> +Let's keep the header inclusion in an alphabet order. With that addressed, Reviewed-by: Zhi Wang <zhi.wang.linux@gmail.com>
Yes, will adjust that. Thanks!
quoted
+/* + * The device memory usable to the workloads running in the VM is cached + * and showcased as a 64b device BAR (comprising of BAR4 and BAR5 region) + * to the VM and is represented as usemem. + * Moreover, the VM GPU device driver needs a non-cacheable region to + * support the MIG feature. This region is also exposed as a 64b BAR + * (comprising of BAR2 and BAR3 region) and represented as resmem. + */ +#define RESMEM_REGION_INDEX VFIO_PCI_BAR2_REGION_INDEX +#define USEMEM_REGION_INDEX VFIO_PCI_BAR4_REGION_INDEX