mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 12:01:52 +01:00
Fixup nvdrv channel private memory allocation
This was incorrectly allocated in words, rather than bytes, meaning that guest allocations could overwrite the private memory and break inline syncpt operations
This commit is contained in:
parent
8b523fa1f0
commit
e7bab27d85
@ -186,7 +186,7 @@ namespace skyline::service::nvdrv::device::nvhost {
|
||||
pushBufferMemory.resize(pushBufferWords);
|
||||
|
||||
// Allocate pages in the GPU AS
|
||||
pushBufferAddr = static_cast<u64>(asAllocator->Allocate((static_cast<u32>(pushBufferWords) >> AsGpu::VM::PageSizeBits) + 1)) << AsGpu::VM::PageSizeBits;
|
||||
pushBufferAddr = static_cast<u64>(asAllocator->Allocate((static_cast<u32>(pushBufferSize) >> AsGpu::VM::PageSizeBits) + 1)) << AsGpu::VM::PageSizeBits;
|
||||
if (!pushBufferAddr)
|
||||
throw exception("Failed to allocate channel pushbuffer!");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user