Lines Matching refs:memfd

465 static void test_invalid_guest_memfd(struct kvm_vm *vm, int memfd,  in test_invalid_guest_memfd()  argument
470 0, memfd, offset); in test_invalid_guest_memfd()
477 int memfd, i; in test_add_private_memory_region() local
486 memfd = kvm_memfd_alloc(MEM_REGION_SIZE, false); in test_add_private_memory_region()
487 test_invalid_guest_memfd(vm, memfd, 0, "Regular memfd() should fail"); in test_add_private_memory_region()
488 close(memfd); in test_add_private_memory_region()
491 memfd = vm_create_guest_memfd(vm2, MEM_REGION_SIZE, 0); in test_add_private_memory_region()
492 test_invalid_guest_memfd(vm, memfd, 0, "Other VM's guest_memfd() should fail"); in test_add_private_memory_region()
495 MEM_REGION_GPA, MEM_REGION_SIZE, 0, memfd, 0); in test_add_private_memory_region()
496 close(memfd); in test_add_private_memory_region()
499 memfd = vm_create_guest_memfd(vm, MEM_REGION_SIZE, 0); in test_add_private_memory_region()
501 test_invalid_guest_memfd(vm, memfd, i, "Unaligned offset should fail"); in test_add_private_memory_region()
504 MEM_REGION_GPA, MEM_REGION_SIZE, 0, memfd, 0); in test_add_private_memory_region()
505 close(memfd); in test_add_private_memory_region()
513 int memfd; in test_add_overlapping_private_memory_regions() local
520 memfd = vm_create_guest_memfd(vm, MEM_REGION_SIZE * 4, 0); in test_add_overlapping_private_memory_regions()
523 MEM_REGION_GPA, MEM_REGION_SIZE * 2, 0, memfd, 0); in test_add_overlapping_private_memory_regions()
527 0, memfd, MEM_REGION_SIZE * 2); in test_add_overlapping_private_memory_regions()
540 0, memfd, 0); in test_add_overlapping_private_memory_regions()
548 0, memfd, 0); in test_add_overlapping_private_memory_regions()
552 close(memfd); in test_add_overlapping_private_memory_regions()