diff options
| author | Alex Williamson <alex.williamson@redhat.com> | 2024-03-05 02:08:46 +0300 |
|---|---|---|
| committer | Alex Williamson <alex.williamson@redhat.com> | 2024-03-05 02:08:46 +0300 |
| commit | c71f08cfb3c621acd537a591e2230eb17562ac7e (patch) | |
| tree | 3a81e0f412ddd1ab2091450ee13798a9b49fadd7 /include/linux | |
| parent | ec29d22caea85d9b391f9df780a0e61597f18778 (diff) | |
| parent | a39d3a966a090989b89c0287a67cd98c85ae2f52 (diff) | |
| download | linux-c71f08cfb3c621acd537a591e2230eb17562ac7e.tar.xz | |
Merge branch 'kvm-arm64/vfio-normal-nc' of https://git.kernel.org/pub/scm/linux/kernel/git/oupton/linux into v6.9/vfio/next
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mm.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index f5a97dec5169..59576e56c58b 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -391,6 +391,20 @@ extern unsigned int kobjsize(const void *objp); # define VM_UFFD_MINOR VM_NONE #endif /* CONFIG_HAVE_ARCH_USERFAULTFD_MINOR */ +/* + * This flag is used to connect VFIO to arch specific KVM code. It + * indicates that the memory under this VMA is safe for use with any + * non-cachable memory type inside KVM. Some VFIO devices, on some + * platforms, are thought to be unsafe and can cause machine crashes + * if KVM does not lock down the memory type. + */ +#ifdef CONFIG_64BIT +#define VM_ALLOW_ANY_UNCACHED_BIT 39 +#define VM_ALLOW_ANY_UNCACHED BIT(VM_ALLOW_ANY_UNCACHED_BIT) +#else +#define VM_ALLOW_ANY_UNCACHED VM_NONE +#endif + /* Bits set in the VMA until the stack is in its final location */ #define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ | VM_STACK_EARLY) |
