gpu/intel: let guard page handling up to client

For mesa-21 the client takes care and manages
the virtual address space of the vGPU by itself and the intel/gpu driver
can't add silently a guard page anymore. Move the patch to the drm/ioctl
of the former mesa version.

Issue #4148 #4233
This commit is contained in:
Alexander Boettcher 2021-06-16 13:35:47 +02:00 committed by Christian Helmuth
parent 067b7d7c67
commit ffc89f3edf
2 changed files with 4 additions and 3 deletions

View File

@ -380,7 +380,8 @@ class Drm_call
{ {
drm_i915_gem_create * const p = reinterpret_cast<drm_i915_gem_create*>(arg); drm_i915_gem_create * const p = reinterpret_cast<drm_i915_gem_create*>(arg);
uint64_t const size = (p->size + 0xfff) & ~0xfff; /* roundup to next page size and add guarding page */
uint64_t const size = ((p->size + 0xfff) & ~0xfff) + 0x1000;
Handle handle = _alloc_buffer(size); Handle handle = _alloc_buffer(size);
if (handle == INVALID_HANDLE) { return -1; } if (handle == INVALID_HANDLE) { return -1; }

View File

@ -1443,8 +1443,8 @@ class Gpu::Session_component : public Genode::Session_object<Gpu::Session>
* => better construct Buffer object as whole * => better construct Buffer object as whole
*/ */
/* roundup to next page size and add guarding page */ /* roundup to next page size */
size = ((size + 0xffful) & ~0xffful) + 0x1000; size = ((size + 0xffful) & ~0xffful);
try { try {
Genode::Dataspace_capability cap = _device.alloc_buffer(_heap, size); Genode::Dataspace_capability cap = _device.alloc_buffer(_heap, size);