]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: use a separate asm-offsets.c file
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 Nov 2022 08:44:53 +0000 (09:44 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 9 Nov 2022 17:10:17 +0000 (12:10 -0500)
commit0d75f5bcced77f97b06d2bdec336c735efe76bdc
treec80a687469c6947e0087f37d5c44ee090d8a5fa1
parent0a255aba6f75c2849889d1eb34bb6c6339b0bebf
KVM: x86: use a separate asm-offsets.c file

This already removes an ugly #include "" from asm-offsets.c, but
especially it avoids a future error when trying to define asm-offsets
for KVM's svm/svm.h header.

This would not work for kernel/asm-offsets.c, because svm/svm.h
includes kvm_cache_regs.h which is not in the include path when
compiling asm-offsets.c.  The problem is not there if the .c file is
in arch/x86/kvm.

Suggested-by: Sean Christopherson <seanjc@google.com>
Cc: stable@vger.kernel.org
Fixes: 7e8f27f3f2eb ("x86: Add magic AMD return-thunk")
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kernel/asm-offsets.c
arch/x86/kvm/.gitignore [new file with mode: 0644]
arch/x86/kvm/Makefile
arch/x86/kvm/kvm-asm-offsets.c [new file with mode: 0644]
arch/x86/kvm/vmx/vmenter.S