1 // SPDX-License-Identifier: GPL-2.0
3 * Generate definitions needed by assembly language modules.
4 * This code generates raw asm output which is post-processed to extract
5 * and format the required data.
7 #define COMPILE_OFFSETS
9 #include <linux/kbuild.h>
13 static void __used
common(void)
15 if (IS_ENABLED(CONFIG_KVM_AMD
)) {
17 OFFSET(SVM_vcpu_arch_regs
, vcpu_svm
, vcpu
.arch
.regs
);
18 OFFSET(SVM_current_vmcb
, vcpu_svm
, current_vmcb
);
19 OFFSET(SVM_spec_ctrl
, vcpu_svm
, spec_ctrl
);
20 OFFSET(SVM_vmcb01
, vcpu_svm
, vmcb01
);
21 OFFSET(KVM_VMCB_pa
, kvm_vmcb_info
, pa
);
22 OFFSET(SD_save_area_pa
, svm_cpu_data
, save_area_pa
);
25 if (IS_ENABLED(CONFIG_KVM_INTEL
)) {
27 OFFSET(VMX_spec_ctrl
, vcpu_vmx
, spec_ctrl
);