Setup a dax device. Use the shm capability to find the cache entry and map it. The DAX window is accessed by the fs/dax.c infrastructure and must have struct pages (at least on x86). Use devm_memremap_pages() to map the DAX window PCI BAR and allocate struct page.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -16,4 +16,7 @@ struct virtio_fs_config { · 15 unmodified lines | ||
| 16 | 16 | __le32 num_request_queues; |
| 17 | 17 | } __attribute__((packed)); |
| 18 | 18 | |
| 19 | +/* For the id field in virtio_pci_shm_cap */ | |
| 20 | +#define VIRTIO_FS_SHMCAP_ID_CACHE 0 | |
| 21 | + | |
| 19 | 22 | #endif /* _UAPI_LINUX_VIRTIO_FS_H */ |