Hmmmm… There’s a lot to not like in your problem description.
The biggest thing is this:
then locked by using MmProbeAndLockPages, the physical addresses for these memory pages are provided to the peripheral card as DMA descriptors to perform DMA writes to memory
Hmmm… You can’t use the “physical address” of those pages to do DMA. Doing so is not only a violation of the Windows OS architecture, it also won’t work on (the increasing number of) systems that implement DMA Remapping (I/O MMU).
Also… CreateFileMappingNumaA (or any “create file mapping”) is absolutely the wrong way to implement a block of memory that’s shared between kernel-mode and user-mode in Windows. I have a scoop for you, in case you didn’t notice: Windows is not Linux. In Windows devices are not files, and you can’t mmap them.
Finally, as Mr. Roberts correctly noted, Windows will not arbitrarily change user-mode virtual addresses of mapped buffers. I mean… THINK about it for a minute: HOW could that work? Let’s say you VirtualAlloc a block of memory, and you read some data into it asynchronously. And when the read is complete, the data is in the buffer… but the user virtual address of the buffer has changed. How would an app ever know this?
So… like many folks… you are searching for an answer to a very specific question… but you’re asking the wrong question.
I know, that’s probably not the answer you want to hear. But, that’s the story.
Peter