Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/arch/x86/kvm/kvm-asm-offsets.c
26424 views
1
// SPDX-License-Identifier: GPL-2.0
2
/*
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.
6
*/
7
#define COMPILE_OFFSETS
8
9
#include <linux/kbuild.h>
10
#include "vmx/vmx.h"
11
#include "svm/svm.h"
12
13
static void __used common(void)
14
{
15
if (IS_ENABLED(CONFIG_KVM_AMD)) {
16
BLANK();
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);
23
}
24
25
if (IS_ENABLED(CONFIG_KVM_INTEL)) {
26
BLANK();
27
OFFSET(VMX_spec_ctrl, vcpu_vmx, spec_ctrl);
28
}
29
}
30
31