[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [win-pv-devel] [PATCH] Replace uses of MmAllocatePagesForMdlEx in __AllocatePage




On Mon, 2 Jul 2018 at 11:06, Paul Durrant <Paul.Durrant@xxxxxxxxxx> wrote:

> -    ASSERT(Controller->Mdl->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA);
> +    ASSERT(Controller->Mdl->MdlFlags
> +            & (MDL_MAPPED_TO_SYSTEM_VA
> +                | MDL_SOURCE_IS_NONPAGED_POOL));

Do we need to change these assertions? The intent is only to assert that the MappedSystemVa field is valid, as we're about to use it.


I think we do.

MDL_MAPPED_TO_SYSTEM_VA is not set by the calls in the patch.

However, as memory gets allocated from the nonpaged pool we know it is in the kernel address space

And the macro MMGetSystemAddressForMdlSafe implies that this is the correct choice of flags for reading a valid address from MappedSystemVa

http://www.osronline.com/article.cfm?id=423 provides some supporting information

 
This appears to be a whitespace-only hunk so should be dropped or called out in the commit comment (so folks in future don't go looking for subtleties in it).

Mmm, I think I accidentally transformed some tabs into spaces somewhere along the line.  I'll try again (also removing the blank lines)

Ben 
_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.