kvm_arch_vcp...fault_memory(9)
π kvm_arch_vcp...fault_memory(9) π
okay bestie, welcome to the Kernel API Manual β yes, THE manual, and yes, this page is called kvm_arch_vcp...fault_memory(9) (the title got truncated mid-word and honestly? icon behavior, we respect it). So sit down, grab a boba, and let's get into it β¨
π NAME π
kvm_arch_vcpu_pre_fault_memory β pre-fault and link gmap dat tables
Like, that's the whole vibe. Pre-faulting. Linking gmap dat tables. Slay.
π¦ SYNOPSIS π¦
long kvm_arch_vcpu_pre_fault_memory (struct kvm_vcpu *vcpu , struct
kvm_pre_fault_memory *range );
That's the signature, copy it exactly, no cap π
πΈ ARGUMENTS πΈ
vcpuβ the vcpu that shall appear to have generated the fault-in. ok so this one is literally just vibing as the ~alleged~ source of the fault-in, like it's taking the credit πrangeβ the range that needs to be faulted in. this is the actual work, bestie.
β DESCRIPTION β
So here's what happens, lowkey the whole plot:
The first page of the given range gets faulted in, and the corresponding gmap page tables get created β all as if the given vCPU had performed a read operation. Main character energy: the vcpu did nothing but we're all acting like it read something π«Ά
Now the vibe checks:
If the range starts outside any memslots, an error is returned. no memslot, no service π
An error is also returned for UCONTROL VMs β those should instead use the KVM_S390_VCPU_FAULT ioctl. different ioctl for different... VMs, iykyk.
π₯ RETURN π₯
The return value menu, fr fr:
-ENOENTif the range lies outside of a memslot. (you are not on the list, goodbye π)-EINVALin case of invalid state (for example if the VM is UCONTROL). invalid state = invalid state, that's the rule β¨-EIOif errors happen while faulting-in the page (will trigger a warning in the caller). yeah, the caller is gonna hear about this one π- other error codes
< 0in case of other errors. mysterious. iconic. unspecified. π - otherwise a number
> 0of bytes that have been faulted in successfully. that's the good ending, we love a positive return π
π SEE ALSO π
- Kernel file
./arch/s390/kvm/s390/s390.cβ the source, the lore, the origin story π§ kvm_s390_update_topology_change_report(9)kvm_s390_cpus_from_pv(9)kvm_s390_cpus_to_pv(9)kvm_test_age_gfn(9)kvm_age_gfn(9)kvm_unmap_gfn_range(9)
all the besties in the same friend group, go read them too π
and that's the page!! π this lil masterpiece lives in ./arch/s390/kvm/s390 and it's dated October 2026, so mark your calendars bestie β sending you all the π and hoping every range you fault in lands inside a memslot. periodt. π¦β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms