git: faaa687646d5 - main - sgx: Add a simple cdev_pg_path method
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Mar 2025 20:48:42 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=faaa687646d50507f6e64bbedde38de167393f45 commit faaa687646d50507f6e64bbedde38de167393f45 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2025-03-27 20:44:55 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2025-03-27 20:44:55 +0000 sgx: Add a simple cdev_pg_path method This uses the constant string of "sgx" as the pathname Reviewed by: br, kib Differential Revision: https://reviews.freebsd.org/D49336 --- sys/amd64/sgx/sgx.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/amd64/sgx/sgx.c b/sys/amd64/sgx/sgx.c index 1ada2a189f3c..1cc268102b1f 100644 --- a/sys/amd64/sgx/sgx.c +++ b/sys/amd64/sgx/sgx.c @@ -593,10 +593,17 @@ sgx_pg_fault(vm_object_t object, vm_ooffset_t offset, return (VM_PAGER_FAIL); } +static void +sgx_pg_path(void *handle, char *path, size_t len) +{ + strlcpy(path, "sgx", len); +} + static struct cdev_pager_ops sgx_pg_ops = { .cdev_pg_ctor = sgx_pg_ctor, .cdev_pg_dtor = sgx_pg_dtor, .cdev_pg_fault = sgx_pg_fault, + .cdev_pg_path = sgx_pg_path, }; static void