arch/x86/kvm/svm/hyperv.c
Source file repositories/reference/linux-study-clean/arch/x86/kvm/svm/hyperv.c
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/kvm/svm/hyperv.c- Extension
.c- Size
- 654 bytes
- Lines
- 24
- Domain
- Architecture Layer
- Bucket
- arch/x86
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
hyperv.h
Detected Declarations
function svm_hv_inject_synthetic_vmexit_post_tlb_flush
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* AMD SVM specific code for Hyper-V on KVM.
*
* Copyright 2022 Red Hat, Inc. and/or its affiliates.
*/
#include "hyperv.h"
void svm_hv_inject_synthetic_vmexit_post_tlb_flush(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
/*
* The exit code used by Hyper-V for software-defined exits is reserved
* by AMD specifically for such use cases.
*/
BUILD_BUG_ON(HV_SVM_EXITCODE_ENL != SVM_EXIT_SW);
svm->vmcb->control.exit_code = HV_SVM_EXITCODE_ENL;
svm->vmcb->control.exit_info_1 = HV_SVM_ENL_EXITCODE_TRAP_AFTER_FLUSH;
svm->vmcb->control.exit_info_2 = 0;
nested_svm_vmexit(svm);
}
Annotation
- Immediate include surface: `hyperv.h`.
- Detected declarations: `function svm_hv_inject_synthetic_vmexit_post_tlb_flush`.
- Atlas domain: Architecture Layer / arch/x86.
- 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.