Lines Matching full:4096

28 #define MEM_SIZE		((512U << 20) + 4096)
29 #define MEM_SIZE_PAGES (MEM_SIZE / 4096)
33 #define MEM_TEST_GPA (MEM_AUX_GPA + 4096)
34 #define MEM_TEST_SIZE (MEM_SIZE - 4096)
35 static_assert(MEM_SIZE % 4096 == 0, "invalid mem size");
36 static_assert(MEM_TEST_SIZE % 4096 == 0, "invalid mem test size");
44 #define MEM_SIZE_MAP ((32U << 20) + 4096)
45 #define MEM_SIZE_MAP_PAGES (MEM_SIZE_MAP / 4096)
46 #define MEM_TEST_MAP_SIZE (MEM_SIZE_MAP - 4096)
47 #define MEM_TEST_MAP_SIZE_PAGES (MEM_TEST_MAP_SIZE / 4096)
48 static_assert(MEM_SIZE_MAP % 4096 == 0, "invalid map test region size");
49 static_assert(MEM_TEST_MAP_SIZE % 4096 == 0, "invalid map test region size");
58 #define MEM_TEST_UNMAP_SIZE_PAGES (MEM_TEST_UNMAP_SIZE / 4096)
63 static_assert(MEM_TEST_UNMAP_SIZE % 4096 == 0,
81 #define MEM_TEST_MOVE_SIZE (MEM_TEST_MOVE_SIZE_PAGES * 4096)
197 TEST_ASSERT(gpa < MEM_GPA + data->npages * 4096, in vm_gpa2hva()
201 gpage = gpa / 4096; in vm_gpa2hva()
202 pgoffs = gpa % 4096; in vm_gpa2hva()
220 return (uint8_t *)base + slotoffs * 4096 + pgoffs; in vm_gpa2hva()
227 return MEM_GPA + slot * data->pages_per_slot * 4096; in vm_slot2gpa()
296 guest_addr += npages * 4096; in prepare_vm()
314 memset(data->hva_slots[slot], 0, npages * 4096); in prepare_vm()
316 guest_addr += npages * 4096; in prepare_vm()
428 ptr += 4096) in guest_code_test_memslot_move()
455 ptr < MEM_TEST_GPA + MEM_TEST_MAP_SIZE / 2; ptr += 4096) in guest_code_test_memslot_map()
462 ptr < MEM_TEST_GPA + MEM_TEST_MAP_SIZE; ptr += 4096) in guest_code_test_memslot_map()
517 ptr < MEM_TEST_GPA + MEM_TEST_SIZE; ptr += 4096) in guest_code_test_memslot_rw()
523 for (ptr = MEM_TEST_GPA + 4096 / 2; in guest_code_test_memslot_rw()
524 ptr < MEM_TEST_GPA + MEM_TEST_SIZE; ptr += 4096) { in guest_code_test_memslot_rw()
597 for (gpa = MEM_TEST_GPA + offsp * 4096, ctr = 0; ctr < count; ) { in test_memslot_do_unmap()
605 ret = madvise(hva, npages * 4096, MADV_DONTNEED); in test_memslot_do_unmap()
610 gpa += npages * 4096; in test_memslot_do_unmap()
625 gpa = MEM_TEST_GPA + offsp * 4096; in test_memslot_map_unmap_check()
716 for (gptr = MEM_TEST_GPA + 4096 / 2; in test_memslot_rw_loop()
717 gptr < MEM_TEST_GPA + MEM_TEST_SIZE; gptr += 4096) in test_memslot_rw_loop()
723 gptr < MEM_TEST_GPA + MEM_TEST_SIZE; gptr += 4096) { in test_memslot_rw_loop()