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)
commitdebc5a1ec0d195ffea70d11efeffb713de9fdbc7
treec80a687469c6947e0087f37d5c44ee090d8a5fa1
parentf4298cac2bfcced49ab308756dc8fef684f3da81
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: a149180fbcf3 ("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