Re: [RFC] Add KFD available memory ioctl thunk support (rev 1)

2022-03-23 Thread Daniel Phillips
On 2022-03-22 11:20, Yat Sin, David wrote: > I think this should check for minor version 9 to match #define > KFD_IOCTL_MINOR_VERSION 9 in kfd_ioctl.h Fixed. include/hsakmt.h | 11 +++ include/linux/kfd_ioctl.h | 18 -- src/memory.c | 23

Re: [RFC] Add KFD available memory ioctl thunk support

2022-03-23 Thread Daniel Phillips
On 2022-03-22 11:20, Yat Sin, you wrote: >> +CHECK_KFD_MINOR_VERSION(7); > > I think this should check for minor version 9 to match #define > KFD_IOCTL_MINOR_VERSION 9 in kfd_ioctl.h Right you are. Regards, Daniel

RE: [RFC] Add KFD available memory ioctl thunk support

2022-03-22 Thread Yat Sin, David
> -Original Message- > From: amd-gfx On Behalf Of Daniel > Phillips > Sent: Tuesday, March 22, 2022 1:29 PM > To: amd-gfx@lists.freedesktop.org > Cc: Kuehling, Felix > Subject: [RFC] Add KFD available memory ioctl thunk support > > Hi all, > > This

[RFC] Add KFD available memory ioctl thunk test

2022-03-22 Thread Daniel Phillips
Hi all, This patch adds at unit test to thunk for the new KFD memory availability ioctl. KFDMemoryTest.cpp | 25 + 1 file changed, 25 insertions(+) Regards, Daniel diff --git a/tests/kfdtest/src/KFDMemoryTest.cpp b/tests/kfdtest/src/KFDMemoryTest.cpp index f7ac73f..b

[RFC] Add KFD available memory ioctl thunk support

2022-03-22 Thread Daniel Phillips
Hi all, This patch adds thunk support for the new KFD memory availability ioctl. I am posting this patch inline with Thunderbird just for now, to establish the principle that I can post patches/code old school style without mangling whitespace. Please bear with me while I get that sorted out. I w

[RFC] Add KFD available memory ioctl

2022-03-21 Thread Daniel Phillips
Hi all, This patch adds a new KFD ioctl to return the largest possible memory size that can be allocated as a buffer object by the existing kfd_ioctl_alloc_memory_of_gpu. It attempts to use exactly the same accept/reject criteria as kfd_ioctl_alloc_memory_of_gpu, so that allocating a new buffer