aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-11-07 13:24:10 -0300
committerGitHub <noreply@github.com>2023-11-07 13:24:10 -0300
commit815819767c5794624e3e7bc2bebcabe8ea4de0f6 (patch)
treea57b27ee8d43f243e7085dfbba16a388d13f9432 /src/Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs
parent623604c39186901fd64c8e04e9aa959d5c825529 (diff)
Force all exclusive memory accesses to be ordered on AppleHv (#5898)
* Implement reprotect method on virtual memory manager (currently stubbed) * Force all exclusive memory accesses to be ordered on AppleHv * Format whitespace * Fix test build * Fix comment copy/paste * Fix wrong bit for isLoad * Update src/Ryujinx.Cpu/AppleHv/HvMemoryManager.cs Co-authored-by: riperiperi <rhy3756547@hotmail.com> --------- Co-authored-by: riperiperi <rhy3756547@hotmail.com>
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs')
-rw-r--r--src/Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs b/src/Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs
index 2b00f802..2b6d4e4e 100644
--- a/src/Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs
+++ b/src/Ryujinx.HLE/HOS/Kernel/Memory/KPageTableBase.cs
@@ -1255,7 +1255,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
if ((oldPermission & KMemoryPermission.Execute) != 0)
{
- result = ReprotectWithAttributes(address, pagesCount, permission);
+ result = ReprotectAndFlush(address, pagesCount, permission);
}
else
{
@@ -3036,13 +3036,13 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
protected abstract Result Reprotect(ulong address, ulong pagesCount, KMemoryPermission permission);
/// <summary>
- /// Changes the permissions of a given virtual memory region.
+ /// Changes the permissions of a given virtual memory region, while also flushing the cache.
/// </summary>
/// <param name="address">Virtual address of the region to have the permission changes</param>
/// <param name="pagesCount">Number of pages to have their permissions changed</param>
/// <param name="permission">New permission</param>
/// <returns>Result of the permission change operation</returns>
- protected abstract Result ReprotectWithAttributes(ulong address, ulong pagesCount, KMemoryPermission permission);
+ protected abstract Result ReprotectAndFlush(ulong address, ulong pagesCount, KMemoryPermission permission);
/// <summary>
/// Alerts the memory tracking that a given region has been read from or written to.