kvm_get_badinstrp(9)
π NAME π
hiii bestie π welcome to kvm_get_badinstrp(9), a lil page from the Kernel API Manual. The name says it all: kvm_get_badinstrp β Get bad prior instruction encoding. no cap, that's the whole vibe.
β¨ SYNOPSIS β¨
okay so here's the signature, copied exactly because we do not mess with code:
int kvm_get_badinstrp (u32 *opc , struct kvm_vcpu *vcpu , u32 *out );
π¦ ARGUMENTS π¦
opcβ guest pointer to the prior faulting instruction. yes ma'am, a guest pointer.vcpuβ KVM VCPU information. that's the vcpu bestie π«Ά.outβ the original page literally says-- undescribed --, so that's all we've got π. no invented lore here.
πΈ DESCRIPTION πΈ
okay so what does it do? It gets the instruction encoding of the prior faulting instruction β specifically the branch containing the delay slot which faulted β using the saved BadInstrP register value if it exists; otherwise it falls back to reading guest memory at opc. that's it, that's the tea ββ¨ fr fr.
π RETURN π
it returns the instruction encoding of the prior faulting instruction. iconic behavior, honestly π periodt.
π SEE ALSO π
Kernel file ./arch/mips/kvm/emulate.c, plus these besties:
kvm_get_badinstr(9)kvm_mips_count_disabled(9)kvm_mips_ktime_to_count(9)kvm_mips_count_time(9)kvm_mips_read_count_running(9)kvm_mips_read_count(9)kvm_mips_freeze_hrtimer(9)kvm_mips_resume_hrtimer(9)kvm_mips_restore_hrtimer(9)kvm_mips_write_count(9)kvm_mips_init_count(9)kvm_mips_set_count_hz(9)kvm_mips_write_compare(9)kvm_mips_count_disable(9)kvm_mips_count_disable_cause(9)kvm_mips_count_enable_cause(9)kvm_mips_set_count_ctl(9)kvm_mips_set_count_resume(9)kvm_mips_count_timeout(9)
mwah π thatβs the whole page, bestie β it comes from ./arch/mips/kvm and is dated October 2026. π«Ά
π¦ 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