Lines Matching +full:0 +full:x200000
22 #define GICR_TYPER 0x8
56 TEST_ASSERT(val == want, "%s; want '0x%x', got '0x%x'", msg, want, val); in v3_redist_reg_get()
62 GUEST_SYNC(0); in guest_code()
71 return __vcpu_run(vcpu) ? -errno : 0; in run_vcpu()
101 .size = 0x10000,
102 .alignment = 0x10000,
107 .size = NR_VCPUS * 0x20000,
108 .alignment = 0x10000,
113 .size = 0x1000,
114 .alignment = 0x1000,
119 .size = 0x2000,
120 .alignment = 0x1000,
127 * used hence the overlap. In the case of GICv3, A RDIST region is set at @0x0
128 * and a DIST region is set @0x70000. The GICv2 case sets a CPUIF @0x0 and a
129 * DIST region @0x1000.
153 addr = dist.alignment / 0x10; in subtest_dist_rdist()
158 addr = rdist.alignment / 0x10; in subtest_dist_rdist()
180 /* set REDIST base address @0x0*/ in subtest_dist_rdist()
181 addr = 0x00000; in subtest_dist_rdist()
186 addr = 0xE0000; in subtest_dist_rdist()
195 addr = REDIST_REGION_ATTR_ADDR(NR_VCPUS, 0x100000, 0, 0); in subtest_dist_rdist()
221 addr = REDIST_REGION_ATTR_ADDR(NR_VCPUS, 0x100000, 2, 0); in subtest_v3_redist_regions()
224 TEST_ASSERT(ret && errno == EINVAL, "redist region attr value with flags != 0"); in subtest_v3_redist_regions()
226 addr = REDIST_REGION_ATTR_ADDR(0, 0x100000, 0, 0); in subtest_v3_redist_regions()
229 TEST_ASSERT(ret && errno == EINVAL, "redist region attr value with count== 0"); in subtest_v3_redist_regions()
231 addr = REDIST_REGION_ATTR_ADDR(2, 0x200000, 0, 1); in subtest_v3_redist_regions()
235 "attempt to register the first rdist region with index != 0"); in subtest_v3_redist_regions()
237 addr = REDIST_REGION_ATTR_ADDR(2, 0x201000, 0, 1); in subtest_v3_redist_regions()
242 addr = REDIST_REGION_ATTR_ADDR(2, 0x200000, 0, 0); in subtest_v3_redist_regions()
246 addr = REDIST_REGION_ATTR_ADDR(2, 0x200000, 0, 1); in subtest_v3_redist_regions()
251 addr = REDIST_REGION_ATTR_ADDR(1, 0x210000, 0, 2); in subtest_v3_redist_regions()
257 addr = REDIST_REGION_ATTR_ADDR(1, 0x240000, 0, 2); in subtest_v3_redist_regions()
262 addr = REDIST_REGION_ATTR_ADDR(1, 0x240000, 0, 1); in subtest_v3_redist_regions()
266 addr = REDIST_REGION_ATTR_ADDR(1, max_phys_size, 0, 2); in subtest_v3_redist_regions()
273 addr = REDIST_REGION_ATTR_ADDR(2, max_phys_size - 0x30000, 0, 2); in subtest_v3_redist_regions()
279 addr = 0x260000; in subtest_v3_redist_regions()
287 * region 0 @ 0x200000 2 redists in subtest_v3_redist_regions()
288 * region 1 @ 0x240000 1 redist in subtest_v3_redist_regions()
292 addr = REDIST_REGION_ATTR_ADDR(0, 0, 0, 0); in subtest_v3_redist_regions()
293 expected_addr = REDIST_REGION_ATTR_ADDR(2, 0x200000, 0, 0); in subtest_v3_redist_regions()
296 TEST_ASSERT(!ret && addr == expected_addr, "read characteristics of region #0"); in subtest_v3_redist_regions()
298 addr = REDIST_REGION_ATTR_ADDR(0, 0, 0, 1); in subtest_v3_redist_regions()
299 expected_addr = REDIST_REGION_ATTR_ADDR(1, 0x240000, 0, 1); in subtest_v3_redist_regions()
304 addr = REDIST_REGION_ATTR_ADDR(0, 0, 0, 2); in subtest_v3_redist_regions()
309 addr = 0x260000; in subtest_v3_redist_regions()
313 addr = REDIST_REGION_ATTR_ADDR(1, 0x260000, 0, 2); in subtest_v3_redist_regions()
382 addr = REDIST_REGION_ATTR_ADDR(1, 0x280000, 0, 2); in test_v3_new_redist_regions()
401 addr = REDIST_REGION_ATTR_ADDR(1, 0x280000, 0, 2); in test_v3_new_redist_regions()
421 (void)vm_vcpu_add(v.vm, 0, guest_code); in test_v3_typer_accesses()
440 for (i = 0; i < NR_VCPUS ; i++) { in test_v3_typer_accesses()
441 v3_redist_reg_get(v.gic_fd, i, GICR_TYPER, i * 0x100, in test_v3_typer_accesses()
445 addr = REDIST_REGION_ATTR_ADDR(2, 0x200000, 0, 0); in test_v3_typer_accesses()
449 /* The 2 first rdists should be put there (vcpu 0 and 3) */ in test_v3_typer_accesses()
450 v3_redist_reg_get(v.gic_fd, 0, GICR_TYPER, 0x0, "read typer of rdist #0"); in test_v3_typer_accesses()
451 v3_redist_reg_get(v.gic_fd, 3, GICR_TYPER, 0x310, "read typer of rdist #1"); in test_v3_typer_accesses()
453 addr = REDIST_REGION_ATTR_ADDR(10, 0x100000, 0, 1); in test_v3_typer_accesses()
458 v3_redist_reg_get(v.gic_fd, 1, GICR_TYPER, 0x100, in test_v3_typer_accesses()
460 v3_redist_reg_get(v.gic_fd, 2, GICR_TYPER, 0x200, in test_v3_typer_accesses()
463 addr = REDIST_REGION_ATTR_ADDR(10, 0x20000, 0, 1); in test_v3_typer_accesses()
467 v3_redist_reg_get(v.gic_fd, 1, GICR_TYPER, 0x100, "read typer of rdist #1"); in test_v3_typer_accesses()
468 v3_redist_reg_get(v.gic_fd, 2, GICR_TYPER, 0x210, in test_v3_typer_accesses()
481 for (i = 0; i < nr_vcpus; i++) in vm_gic_v3_create_with_vcpuids()
492 * rdist region #0 @0x100000 2 rdist capacity
493 * rdists: 0, 3 (Last)
494 * rdist region #1 @0x240000 2 rdist capacity
496 * rdist region #2 @0x200000 2 rdist capacity
501 uint32_t vcpuids[] = { 0, 3, 5, 4, 1, 2 }; in test_v3_last_bit_redist_regions()
510 addr = REDIST_REGION_ATTR_ADDR(2, 0x100000, 0, 0); in test_v3_last_bit_redist_regions()
514 addr = REDIST_REGION_ATTR_ADDR(2, 0x240000, 0, 1); in test_v3_last_bit_redist_regions()
518 addr = REDIST_REGION_ATTR_ADDR(2, 0x200000, 0, 2); in test_v3_last_bit_redist_regions()
522 v3_redist_reg_get(v.gic_fd, 0, GICR_TYPER, 0x000, "read typer of rdist #0"); in test_v3_last_bit_redist_regions()
523 v3_redist_reg_get(v.gic_fd, 1, GICR_TYPER, 0x100, "read typer of rdist #1"); in test_v3_last_bit_redist_regions()
524 v3_redist_reg_get(v.gic_fd, 2, GICR_TYPER, 0x200, "read typer of rdist #2"); in test_v3_last_bit_redist_regions()
525 v3_redist_reg_get(v.gic_fd, 3, GICR_TYPER, 0x310, "read typer of rdist #3"); in test_v3_last_bit_redist_regions()
526 v3_redist_reg_get(v.gic_fd, 5, GICR_TYPER, 0x500, "read typer of rdist #5"); in test_v3_last_bit_redist_regions()
527 v3_redist_reg_get(v.gic_fd, 4, GICR_TYPER, 0x410, "read typer of rdist #4"); in test_v3_last_bit_redist_regions()
535 uint32_t vcpuids[] = { 0, 3, 5, 4, 1, 2 }; in test_v3_last_bit_single_rdist()
544 addr = 0x10000; in test_v3_last_bit_single_rdist()
548 v3_redist_reg_get(v.gic_fd, 0, GICR_TYPER, 0x000, "read typer of rdist #0"); in test_v3_last_bit_single_rdist()
549 v3_redist_reg_get(v.gic_fd, 3, GICR_TYPER, 0x300, "read typer of rdist #1"); in test_v3_last_bit_single_rdist()
550 v3_redist_reg_get(v.gic_fd, 5, GICR_TYPER, 0x500, "read typer of rdist #2"); in test_v3_last_bit_single_rdist()
551 v3_redist_reg_get(v.gic_fd, 1, GICR_TYPER, 0x100, "read typer of rdist #3"); in test_v3_last_bit_single_rdist()
552 v3_redist_reg_get(v.gic_fd, 2, GICR_TYPER, 0x210, "read typer of rdist #3"); in test_v3_last_bit_single_rdist()
568 addr = max_phys_size - (3 * 2 * 0x10000); in test_v3_redist_ipa_range_check_at_vcpu_run()
572 addr = 0x00000; in test_v3_redist_ipa_range_check_at_vcpu_run()
601 addr = 0x401000; in test_v3_its_region()
613 addr = max_phys_size - 0x10000; in test_v3_its_region()
620 addr = 0x400000; in test_v3_its_region()
624 addr = 0x300000; in test_v3_its_region()
634 * Returns 0 if it's possible to create GIC device of a given type (V2 or V3).
646 ret = __kvm_test_create_device(v.vm, 0); in test_kvm_device()
656 TEST_ASSERT(ret < 0 && errno == EEXIST, "create GIC device twice"); in test_kvm_device()
664 TEST_ASSERT(ret < 0 && (errno == EINVAL || errno == EEXIST), in test_kvm_device()
670 return 0; in test_kvm_device()
692 int cnt_impl = 0; in main()
715 return 0; in main()