tools/testing/selftests/kvm/arm64/arch_timer.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/kvm/arm64/arch_timer.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/kvm/arm64/arch_timer.c- Extension
.c- Size
- 5626 bytes
- Lines
- 216
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
arch_timer.hdelay.hgic.hprocessor.htimer_test.hucall_common.hvgic.h
Detected Declarations
enum guest_stagefunction guest_configure_timer_actionfunction guest_validate_irqfunction guest_irq_handlerfunction guest_run_stagefunction guest_codefunction test_init_timer_irqfunction test_vm_cleanup
Annotated Snippet
if (kvm_has_cap(KVM_CAP_COUNTER_OFFSET)) {
struct kvm_arm_counter_offset offset = {
.counter_offset = test_args.counter_offset,
.reserved = 0,
};
vm_ioctl(vm, KVM_ARM_SET_COUNTER_OFFSET, &offset);
} else
TEST_FAIL("no support for global offset");
}
for (i = 0; i < nr_vcpus; i++)
vcpu_init_descriptor_tables(vcpus[i]);
test_init_timer_irq(vm);
/* Make all the test's cmdline args visible to the guest */
sync_global_to_guest(vm, test_args);
return vm;
}
void test_vm_cleanup(struct kvm_vm *vm)
{
kvm_vm_free(vm);
}
Annotation
- Immediate include surface: `arch_timer.h`, `delay.h`, `gic.h`, `processor.h`, `timer_test.h`, `ucall_common.h`, `vgic.h`.
- Detected declarations: `enum guest_stage`, `function guest_configure_timer_action`, `function guest_validate_irq`, `function guest_irq_handler`, `function guest_run_stage`, `function guest_code`, `function test_init_timer_irq`, `function test_vm_cleanup`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.