gpu-compute: Implement per-request MTYPEs

GPU MTYPE is currently set using a global config passed to the
PACoalescer.  This patch enables MTYPE to be set by the shader on a
per-request bases.  In real hardware, the MTYPE is extracted from a
GPUVM PTE during address translation.  However, our current simulator
only models x86 page tables which do not have the appropriate bits for
GPU MTYPES.  Rather than hacking non-x86 bits into our x86 page table
models, this patch instead keeps an interval tree of all pages that
request custom MTYPES in the driver itself.  This is currently
only used to map host pages to the GPU as uncacheable, but is easily
extensible to other MTYPES.

Change-Id: I7daab0ffae42084b9131a67c85cd0aa4bbbfc8d6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42216
Maintainer: Matthew Poremba <matthew.poremba@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Michael LeBeane
2018-10-31 16:25:12 -04:00
committed by Matthew Poremba
parent dfa712f041
commit ad43083bb3
9 changed files with 274 additions and 23 deletions

View File

@@ -66,6 +66,7 @@ class GPUCommandProcessor : public HSADevice
void setShader(Shader *shader);
Shader* shader();
GPUComputeDriver* driver();
enum AgentCmd
{
@@ -112,7 +113,7 @@ class GPUCommandProcessor : public HSADevice
private:
Shader *_shader;
GPUDispatcher &dispatcher;
HSADriver *driver;
GPUComputeDriver *_driver;
void initABI(HSAQueueEntry *task);