WinFsp on ARM64
This document summarizes the changes made to WinFsp to support Windows on ARM64. With these changes WinFsp runs natively in the ARM64 environment, while maintaining backwards compatibility.
Visual Studio 2019 or later is required to build WinFsp. Visual Studio 2015 builds are no longer possible because of lack of ARM64 support.
tools\gensrc\remove-build-arm64.batcan be used to remove the ARM64 configuration from the project files. This allows WinFsp to be built with Visual Studio 2015, but without ARM64 support. This is a hack to support AppVeyor builds on Server 2012 images that have only Visual Studio 2015 installed.
Build configuration is now done by the file
Product configuration (
MyProductName, etc.) is done by the file
build\VStudio. This file was previously named
Project files under
build\VStudiohave been updated to support ARM64 builds.
FSP_FSCTL_PRODUCT_FILE_ARCHhave been added to header file
FSP_FSCTL_PRODUCT_FULL_REGKEY: The full registry path for WinFsp.
FSP_FSCTL_PRODUCT_FILE_ARCH: The expected computer architecture suffix to use for file names (
File System Driver
IoStopTimerDDI’s are missing from Windows on ARM64 (link). The same functionality is now implemented within WinFsp in file
The FSD (and other WinFsp components) used a number of memory barriers primarily for the purpose of lock-free access of certain variables. Most of these memory barriers have been removed and replaced with "interlocked" loads/stores so that any such accesses would continue to be correct under ARM64, which has weaker consistency guarantees than x86/x64. The new
FspInterlocked*calls are implemented in
inc/winfsp/fsctl.hand are used by both kernel and user mode code.
The sample project files have been updated to support ARM64 builds.
The installer has been retrofitted to support native installation on ARM64, x64 and x86 environments.
The installer remains a single MSI file that supports all architectures.
NOTE: The current technique for detecting OS architecture relies on reading the registry value
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment. This may be fragile and a better technique may be required.
Files are installed in
\Program Files (x86)\WinFspon ARM64 and x64 Windows and
\Program Fileson x86 Windows.
Registry settings are placed in
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WinFspon ARM64 and x64 Windows and
HKEY_LOCAL_MACHINE\SOFTWARE\WinFspon x86 Windows.
Files for all architectures are always installed regardless of OS architecture. For example, all of
winfsp-x86.dllare found in the
binsubdirectory on ARM64, x64 and x86 Windows.
WinFsp supports x86 file systems on x86 Windows, x86 and x64 file systems on x64 Windows and x86, x64 and ARM64 file systems on ARM64 Windows.
The special exception for FLOSS to GPLv3 has been updated to mention that linking to
winfsp-a64.dllis also allowed.