arch/x86/xen/irq.c
Source file repositories/reference/linux-study-clean/arch/x86/xen/irq.c
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/xen/irq.c- Extension
.c- Size
- 1350 bytes
- Lines
- 54
- 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.
Dependency Surface
linux/hardirq.hasm/x86_init.hxen/interface/xen.hxen/interface/sched.hxen/interface/vcpu.hxen/features.hxen/events.hasm/xen/hypercall.hasm/xen/hypervisor.hxen-ops.h
Detected Declarations
function xen_force_evtchn_callbackfunction xen_safe_haltfunction xen_haltfunction xen_init_irq_ops
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
#include <linux/hardirq.h>
#include <asm/x86_init.h>
#include <xen/interface/xen.h>
#include <xen/interface/sched.h>
#include <xen/interface/vcpu.h>
#include <xen/features.h>
#include <xen/events.h>
#include <asm/xen/hypercall.h>
#include <asm/xen/hypervisor.h>
#include "xen-ops.h"
/*
* Force a proper event-channel callback from Xen after clearing the
* callback mask. We do this in a very simple manner, by making a call
* down into Xen. The pending flag will be checked by Xen on return.
*/
noinstr void xen_force_evtchn_callback(void)
{
(void)HYPERVISOR_xen_version(0, NULL);
}
static noinstr void xen_safe_halt(void)
{
/* Blocking includes an implicit local_irq_enable(). */
if (HYPERVISOR_sched_op(SCHEDOP_block, NULL) != 0)
BUG();
}
static void xen_halt(void)
{
if (irqs_disabled())
HYPERVISOR_vcpu_op(VCPUOP_down,
xen_vcpu_nr(smp_processor_id()), NULL);
else
xen_safe_halt();
}
void __init xen_init_irq_ops(void)
{
/* Initial interrupt flag handling only called while interrupts off. */
pv_ops.irq.save_fl = __PV_IS_CALLEE_SAVE(paravirt_ret0);
pv_ops.irq.irq_disable = __PV_IS_CALLEE_SAVE(paravirt_nop);
pv_ops.irq.irq_enable = __PV_IS_CALLEE_SAVE(BUG_func);
pv_ops.irq.safe_halt = xen_safe_halt;
pv_ops.irq.halt = xen_halt;
x86_init.irqs.intr_init = xen_init_IRQ;
}
Annotation
- Immediate include surface: `linux/hardirq.h`, `asm/x86_init.h`, `xen/interface/xen.h`, `xen/interface/sched.h`, `xen/interface/vcpu.h`, `xen/features.h`, `xen/events.h`, `asm/xen/hypercall.h`.
- Detected declarations: `function xen_force_evtchn_callback`, `function xen_safe_halt`, `function xen_halt`, `function xen_init_irq_ops`.
- 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.