From 36b2b147458523adb8d287c30ce3aa7371a9f97c Mon Sep 17 00:00:00 2001 From: shaoyunl Date: Mon, 4 Apr 2016 16:35:03 -0400 Subject: [PATCH 1412/4131] drm/amdgpu: Add PDE0 vm fault as invalid address protection fault The VM generally raises two kind of invalid address protection fault: PDE0 (page directory entry not present) or VALID(page table entry not valid). Both need to be reported as invalid protection fault to user. Change-Id: I012ff65e4c9def01534897887cafdc127b7c07d1 Signed-off-by: shaoyun liu --- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c index 378f115..91f9ea4 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c @@ -773,7 +773,7 @@ static void gmc_v7_0_vm_decode_fault(struct amdgpu_device *adev, info->vmid = vmid; info->mc_id = mc_id; info->page_addr = addr; - info->prot_valid = protections & 0x4 ? true : false; + info->prot_valid = protections & 0x6 ? true : false; info->prot_read = protections & 0x8 ? true : false; info->prot_write = protections & 0x10 ? true : false; info->prot_exec = protections & 0x20 ? true : false; diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c index 737a623..e306006 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c @@ -989,7 +989,7 @@ static void gmc_v8_0_vm_decode_fault(struct amdgpu_device *adev, info->vmid = vmid; info->mc_id = mc_id; info->page_addr = addr; - info->prot_valid = protections & 0x4 ? true : false; + info->prot_valid = protections & 0x6 ? true : false; info->prot_read = protections & 0x8 ? true : false; info->prot_write = protections & 0x10 ? true : false; info->prot_exec = protections & 0x20 ? true : false; -- 2.7.4