ANDROID: virtio-dxgkrnl: ESM allocation via size query

A new path to create ESM allocations by figuring out the allocation size
before sending the CreateAllocation call. We think this will play nicer
with drivers as they can see the pages on creation.

We do this by adding GetAllocationSize as a new command, implemented by
the host driver. Then, we can send the pages inside CreateAllocation.

To make needing additional messages unlikely, the page sequence is RLE
encoded in the unused 12 bits at the end of the page number. Since many
guest page sequences have contiguous chunks this saves a lot of space.

Test: Able to get to homescreen with ESM
Bug: 305059072

Change-Id: I1f6c9e3684226eecbb444a8c82a72ba09d380fa4
Signed-off-by: Idan Raiter <idanr@google.com>
1 file changed