-
-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch fixes ZFS support on aarch64. As the issue #1131 explains, the ZFS page scanner logic clears the access flag of PTEs of relevant memory-mapped chunks of the files. On Intel, the cpu automatically sets the flags on first access (read or write) to those pages of memory. But on ARM it may need to be done by software if CPU does not have this capability (it does not on RPI 4 and Odroid I have been using possibly due to QEMU limitation). So to set the access flags in software, this patch enhances the page fault handler to detect if relevant fault is access flag related and does the manual page walk to navigate all the way down to the leaf PTE based on the virtual memory address retrieved from far_el1. Then it sets the access flag of the PTE and the dirty flag if the fault was triggered by a write. Eventually it writes the PTE back to memory and issues necessary `dsb ishst` to force completion of writes to page table entries and flush cpu pipeline. Finally, this patch adjusts `scripts/build` to support building ZFS images on arm and makes ZFS a default filesystem as on x64_64. Besides running all unit tests on ZFS image I have also verified that more involved tests like misc-zfs-io.cc work as well. Fixes #1131 Signed-off-by: Waldemar Kozaczuk <jwkozaczuk@gmail.com>
- Loading branch information
Showing
3 changed files
with
74 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters