Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 #ifndef __LINUX_KBUILD_H
0003 # error "Please do not build this file directly, build asm-offsets.c instead"
0004 #endif
0005 
0006 #include <asm/ia32.h>
0007 
0008 #if defined(CONFIG_KVM_GUEST)
0009 #include <asm/kvm_para.h>
0010 #endif
0011 
0012 int main(void)
0013 {
0014 #ifdef CONFIG_PARAVIRT
0015 #ifdef CONFIG_PARAVIRT_XXL
0016 #ifdef CONFIG_DEBUG_ENTRY
0017     OFFSET(PV_IRQ_save_fl, paravirt_patch_template, irq.save_fl);
0018 #endif
0019 #endif
0020     BLANK();
0021 #endif
0022 
0023 #if defined(CONFIG_KVM_GUEST)
0024     OFFSET(KVM_STEAL_TIME_preempted, kvm_steal_time, preempted);
0025     BLANK();
0026 #endif
0027 
0028 #define ENTRY(entry) OFFSET(pt_regs_ ## entry, pt_regs, entry)
0029     ENTRY(bx);
0030     ENTRY(cx);
0031     ENTRY(dx);
0032     ENTRY(sp);
0033     ENTRY(bp);
0034     ENTRY(si);
0035     ENTRY(di);
0036     ENTRY(r8);
0037     ENTRY(r9);
0038     ENTRY(r10);
0039     ENTRY(r11);
0040     ENTRY(r12);
0041     ENTRY(r13);
0042     ENTRY(r14);
0043     ENTRY(r15);
0044     ENTRY(flags);
0045     BLANK();
0046 #undef ENTRY
0047 
0048 #define ENTRY(entry) OFFSET(saved_context_ ## entry, saved_context, entry)
0049     ENTRY(cr0);
0050     ENTRY(cr2);
0051     ENTRY(cr3);
0052     ENTRY(cr4);
0053     ENTRY(gdt_desc);
0054     BLANK();
0055 #undef ENTRY
0056 
0057     BLANK();
0058 
0059 #ifdef CONFIG_STACKPROTECTOR
0060     DEFINE(stack_canary_offset, offsetof(struct fixed_percpu_data, stack_canary));
0061     BLANK();
0062 #endif
0063     return 0;
0064 }