Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KVM: always define KVM_CAP_SYNC_MMU

KVM_CAP_SYNC_MMU is provided by KVM's MMU notifiers, which are now always
available. Move the definition from individual architectures to common
code.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

+5 -17
+4 -6
Documentation/virt/kvm/api.rst
··· 1396 1396 Memory for the region is taken starting at the address denoted by the 1397 1397 field userspace_addr, which must point at user addressable memory for 1398 1398 the entire memory slot size. Any object may back this memory, including 1399 - anonymous memory, ordinary files, and hugetlbfs. 1399 + anonymous memory, ordinary files, and hugetlbfs. Changes in the backing 1400 + of the memory region are automatically reflected into the guest. 1401 + For example, an mmap() that affects the region will be made visible 1402 + immediately. Another example is madvise(MADV_DROP). 1400 1403 1401 1404 On architectures that support a form of address tagging, userspace_addr must 1402 1405 be an untagged address. ··· 1414 1411 use it. The latter can be set, if KVM_CAP_READONLY_MEM capability allows it, 1415 1412 to make a new slot read-only. In this case, writes to this memory will be 1416 1413 posted to userspace as KVM_EXIT_MMIO exits. 1417 - 1418 - When the KVM_CAP_SYNC_MMU capability is available, changes in the backing of 1419 - the memory region are automatically reflected into the guest. For example, an 1420 - mmap() that affects the region will be made visible immediately. Another 1421 - example is madvise(MADV_DROP). 1422 1414 1423 1415 For TDX guest, deleting/moving memory region loses guest memory contents. 1424 1416 Read only region isn't supported. Only as-id 0 is supported.
-1
arch/arm64/kvm/arm.c
··· 358 358 break; 359 359 case KVM_CAP_IOEVENTFD: 360 360 case KVM_CAP_USER_MEMORY: 361 - case KVM_CAP_SYNC_MMU: 362 361 case KVM_CAP_DESTROY_MEMORY_REGION_WORKS: 363 362 case KVM_CAP_ONE_REG: 364 363 case KVM_CAP_ARM_PSCI:
-1
arch/loongarch/kvm/vm.c
··· 118 118 case KVM_CAP_ONE_REG: 119 119 case KVM_CAP_ENABLE_CAP: 120 120 case KVM_CAP_READONLY_MEM: 121 - case KVM_CAP_SYNC_MMU: 122 121 case KVM_CAP_IMMEDIATE_EXIT: 123 122 case KVM_CAP_IOEVENTFD: 124 123 case KVM_CAP_MP_STATE:
-1
arch/mips/kvm/mips.c
··· 1035 1035 case KVM_CAP_ONE_REG: 1036 1036 case KVM_CAP_ENABLE_CAP: 1037 1037 case KVM_CAP_READONLY_MEM: 1038 - case KVM_CAP_SYNC_MMU: 1039 1038 case KVM_CAP_IMMEDIATE_EXIT: 1040 1039 r = 1; 1041 1040 break;
-5
arch/powerpc/kvm/powerpc.c
··· 623 623 r = !!(hv_enabled && kvmppc_hv_ops->enable_nested && 624 624 !kvmppc_hv_ops->enable_nested(NULL)); 625 625 break; 626 - #endif 627 - case KVM_CAP_SYNC_MMU: 628 - r = 1; 629 - break; 630 - #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE 631 626 case KVM_CAP_PPC_HTAB_FD: 632 627 r = hv_enabled; 633 628 break;
-1
arch/riscv/kvm/vm.c
··· 181 181 break; 182 182 case KVM_CAP_IOEVENTFD: 183 183 case KVM_CAP_USER_MEMORY: 184 - case KVM_CAP_SYNC_MMU: 185 184 case KVM_CAP_DESTROY_MEMORY_REGION_WORKS: 186 185 case KVM_CAP_ONE_REG: 187 186 case KVM_CAP_READONLY_MEM:
-1
arch/s390/kvm/kvm-s390.c
··· 601 601 switch (ext) { 602 602 case KVM_CAP_S390_PSW: 603 603 case KVM_CAP_S390_GMAP: 604 - case KVM_CAP_SYNC_MMU: 605 604 #ifdef CONFIG_KVM_S390_UCONTROL 606 605 case KVM_CAP_S390_UCONTROL: 607 606 #endif
-1
arch/x86/kvm/x86.c
··· 4805 4805 #endif 4806 4806 case KVM_CAP_NOP_IO_DELAY: 4807 4807 case KVM_CAP_MP_STATE: 4808 - case KVM_CAP_SYNC_MMU: 4809 4808 case KVM_CAP_USER_NMI: 4810 4809 case KVM_CAP_IRQ_INJECT_STATUS: 4811 4810 case KVM_CAP_IOEVENTFD:
+1
virt/kvm/kvm_main.c
··· 4870 4870 static int kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg) 4871 4871 { 4872 4872 switch (arg) { 4873 + case KVM_CAP_SYNC_MMU: 4873 4874 case KVM_CAP_USER_MEMORY: 4874 4875 case KVM_CAP_USER_MEMORY2: 4875 4876 case KVM_CAP_DESTROY_MEMORY_REGION_WORKS: