Searched refs:phys_contig_mem_regions (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/drivers/virt/nitro_enclaves/ |
H A D | ne_misc_dev_test.c | 113 struct ne_phys_contig_mem_regions phys_contig_mem_regions = {}; in ne_misc_dev_test_merge_phys_contig_memory_regions() local 117 phys_contig_mem_regions.regions = kunit_kcalloc(test, MAX_PHYS_REGIONS, in ne_misc_dev_test_merge_phys_contig_memory_regions() 118 sizeof(*phys_contig_mem_regions.regions), in ne_misc_dev_test_merge_phys_contig_memory_regions() 120 KUNIT_ASSERT_TRUE(test, phys_contig_mem_regions.regions); in ne_misc_dev_test_merge_phys_contig_memory_regions() 126 rc = ne_merge_phys_contig_memory_regions(&phys_contig_mem_regions, in ne_misc_dev_test_merge_phys_contig_memory_regions() 129 KUNIT_EXPECT_EQ(test, phys_contig_mem_regions.num, test_case->expect_num); in ne_misc_dev_test_merge_phys_contig_memory_regions() 134 num = phys_contig_mem_regions.num; in ne_misc_dev_test_merge_phys_contig_memory_regions() 135 KUNIT_EXPECT_EQ(test, phys_contig_mem_regions.regions[num - 1].start, in ne_misc_dev_test_merge_phys_contig_memory_regions() 137 KUNIT_EXPECT_EQ(test, range_len(&phys_contig_mem_regions.regions[num - 1]), in ne_misc_dev_test_merge_phys_contig_memory_regions() 141 kunit_kfree(test, phys_contig_mem_regions.regions); in ne_misc_dev_test_merge_phys_contig_memory_regions()
|
H A D | ne_misc_dev.c | 924 struct ne_phys_contig_mem_regions phys_contig_mem_regions = {}; in ne_set_user_memory_region_ioctl() local 945 phys_contig_mem_regions.regions = kcalloc(max_nr_pages, in ne_set_user_memory_region_ioctl() 946 sizeof(*phys_contig_mem_regions.regions), in ne_set_user_memory_region_ioctl() 948 if (!phys_contig_mem_regions.regions) { in ne_set_user_memory_region_ioctl() 993 if ((ne_enclave->nr_mem_regions + phys_contig_mem_regions.num) > in ne_set_user_memory_region_ioctl() 1004 for (i = 0; i < phys_contig_mem_regions.num; i++) { in ne_set_user_memory_region_ioctl() 1005 u64 phys_region_addr = phys_contig_mem_regions.regions[i].start; in ne_set_user_memory_region_ioctl() 1018 for (i = 0; i < phys_contig_mem_regions.num; i++) { in ne_set_user_memory_region_ioctl() 1033 kfree(phys_contig_mem_regions.regions); in ne_set_user_memory_region_ioctl() 1046 kfree(phys_contig_mem_regions.regions); in ne_set_user_memory_region_ioctl() [all …]
|