drivers/firmware/smccc/kvm_guest.c
Source file repositories/reference/linux-study-clean/drivers/firmware/smccc/kvm_guest.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/firmware/smccc/kvm_guest.c- Extension
.c- Size
- 2896 bytes
- Lines
- 114
- Domain
- Driver Families
- Bucket
- drivers/firmware
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/arm-smccc.hlinux/bitmap.hlinux/cache.hlinux/kernel.hlinux/memblock.hlinux/string.huapi/linux/psci.hasm/hypervisor.h
Detected Declarations
function kvm_init_hyp_servicesfunction kvm_arm_hyp_service_availablefunction kvm_arm_target_impl_cpu_initexport kvm_arm_hyp_service_available
Annotated Snippet
if (res.a0 != SMCCC_RET_SUCCESS) {
pr_warn("Discovering target implementation CPUs failed\n");
goto mem_free;
}
target[i].midr = res.a1;
target[i].revidr = res.a2;
target[i].aidr = res.a3;
}
if (!cpu_errata_set_target_impl(max_cpus, target)) {
pr_warn("Failed to set target implementation CPUs\n");
goto mem_free;
}
pr_info("Number of target implementation CPUs is %lld\n", max_cpus);
return;
mem_free:
memblock_free(target, sizeof(*target) * max_cpus);
}
#endif
Annotation
- Immediate include surface: `linux/arm-smccc.h`, `linux/bitmap.h`, `linux/cache.h`, `linux/kernel.h`, `linux/memblock.h`, `linux/string.h`, `uapi/linux/psci.h`, `asm/hypervisor.h`.
- Detected declarations: `function kvm_init_hyp_services`, `function kvm_arm_hyp_service_available`, `function kvm_arm_target_impl_cpu_init`, `export kvm_arm_hyp_service_available`.
- Atlas domain: Driver Families / drivers/firmware.
- Implementation status: integration 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.