virt/kvm/coalesced_mmio.c
Source file repositories/reference/linux-study-clean/virt/kvm/coalesced_mmio.c
File Facts
- System
- Linux kernel
- Corpus path
virt/kvm/coalesced_mmio.c- Extension
.c- Size
- 4708 bytes
- Lines
- 191
- Domain
- Kernel Services
- Bucket
- virt
- Inferred role
- Kernel Services: implementation source
- Status
- source implementation candidate
Why This File Exists
Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
kvm/iodev.hlinux/kvm_host.hlinux/slab.hlinux/kvm.hcoalesced_mmio.h
Detected Declarations
function Copyrightfunction coalesced_mmio_in_rangefunction coalesced_mmio_writefunction coalesced_mmio_destructorfunction kvm_coalesced_mmio_initfunction kvm_coalesced_mmio_freefunction kvm_vm_ioctl_register_coalesced_mmiofunction kvm_vm_ioctl_unregister_coalesced_mmiofunction list_for_each_entry_safe
Annotated Snippet
coalesced_mmio_in_range(dev, zone->addr, zone->size)) {
r = kvm_io_bus_unregister_dev(kvm,
zone->pio ? KVM_PIO_BUS : KVM_MMIO_BUS, &dev->dev);
/*
* On failure, unregister destroys all devices on the
* bus, including the target device. There's no need
* to restart the walk as there aren't any zones left.
*/
if (r)
break;
}
}
mutex_unlock(&kvm->slots_lock);
/*
* Ignore the result of kvm_io_bus_unregister_dev(), from userspace's
* perspective, the coalesced MMIO is most definitely unregistered.
*/
return 0;
}
Annotation
- Immediate include surface: `kvm/iodev.h`, `linux/kvm_host.h`, `linux/slab.h`, `linux/kvm.h`, `coalesced_mmio.h`.
- Detected declarations: `function Copyright`, `function coalesced_mmio_in_range`, `function coalesced_mmio_write`, `function coalesced_mmio_destructor`, `function kvm_coalesced_mmio_init`, `function kvm_coalesced_mmio_free`, `function kvm_vm_ioctl_register_coalesced_mmio`, `function kvm_vm_ioctl_unregister_coalesced_mmio`, `function list_for_each_entry_safe`.
- Atlas domain: Kernel Services / virt.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.