I have searched the answer to my question for hours, to no avail.
My question: I want to define a variable that can be accessed(w/r)(shared) by the two files in linux kernel: source/arch/x86/kvm/x86.c and source/kernel/sched/core.c.
My failed attempt: I tried to use export_symbol to define a global var in x86.c. But the compile error message says:
the var is undefined reference
Is there any other solution? I am new to linux kernel programming. Thanks in advance.