Lines Matching +full:non +full:- +full:overlapping
1 // SPDX-License-Identifier: GPL-2.0
72 return __vcpu_run(vcpu) ? -errno : 0; in run_vcpu()
102 close(v->gic_fd); in vm_gic_destroy()
103 kvm_vm_free(v->vm); in vm_gic_destroy()
138 * ARM_VGIC (GICv2 or GICv3) device gets created with an overlapping
151 rdist = VGIC_DEV_IS_V3(v->gic_dev_type) ? gic_v3_redist_region in subtest_dist_rdist()
153 dist = VGIC_DEV_IS_V3(v->gic_dev_type) ? gic_v3_dist_region in subtest_dist_rdist()
157 kvm_has_device_attr(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, dist.attr); in subtest_dist_rdist()
159 kvm_has_device_attr(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, rdist.attr); in subtest_dist_rdist()
161 /* check non existing attribute */ in subtest_dist_rdist()
162 ret = __kvm_has_device_attr(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, -1); in subtest_dist_rdist()
167 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_dist_rdist()
172 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_dist_rdist()
178 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_dist_rdist()
182 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_dist_rdist()
187 addr = max_phys_size - dist.alignment; in subtest_dist_rdist()
188 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_dist_rdist()
195 kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_dist_rdist()
200 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_dist_rdist()
204 ret = __kvm_has_device_attr(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_dist_rdist()
209 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_dist_rdist()
216 * Set overlapping DIST / REDIST, cannot be detected here. Will be detected in subtest_dist_rdist()
219 addr = rdist.size - rdist.alignment; in subtest_dist_rdist()
220 kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_dist_rdist()
230 ret = __kvm_has_device_attr(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
235 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
240 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
245 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
251 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
256 kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
260 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
265 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
268 "register an rdist region overlapping with another one"); in subtest_v3_redist_regions()
271 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
276 kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
280 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
286 addr = REDIST_REGION_ATTR_ADDR(2, max_phys_size - 0x30000, 0, 2); in subtest_v3_redist_regions()
287 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
293 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
307 ret = __kvm_device_attr_get(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
313 ret = __kvm_device_attr_get(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
318 ret = __kvm_device_attr_get(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
320 TEST_ASSERT(ret && errno == ENOENT, "read characteristics of non existing region"); in subtest_v3_redist_regions()
323 kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
327 ret = __kvm_device_attr_set(v->gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in subtest_v3_redist_regions()
351 TEST_ASSERT(ret == -EINVAL, "dist/rdist overlap detected on 1st vcpu run"); in test_vgic_then_vcpus()
368 TEST_ASSERT(ret == -EINVAL, "dist/rdist overlap detected on 1st vcpu run"); in test_vcpus_then_vgic()
391 "accessed non-existent CPU interface, want errno: %i", in test_v2_uaccess_cpuif_no_vcpus()
396 "accessed non-existent CPU interface, want errno: %i", in test_v2_uaccess_cpuif_no_vcpus()
401 "accessed non-existent CPU interface, want errno: %i", in test_v2_uaccess_cpuif_no_vcpus()
421 TEST_ASSERT(ret == -ENXIO, "running without sufficient number of rdists"); in test_v3_new_redist_regions()
434 TEST_ASSERT(ret == -EBUSY, "running without vgic explicit init"); in test_v3_new_redist_regions()
475 "attempting to read GICR_TYPER of non created vcpu"); in test_v3_typer_accesses()
615 addr = max_phys_size - (3 * 2 * 0x10000); in test_v3_redist_ipa_range_check_at_vcpu_run()
660 addr = max_phys_size - 0x10000; in test_v3_its_region()
692 /* try to create a non existing KVM device */ in test_kvm_device()