mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
![Sean Christopherson](/assets/img/avatar_default.png)
Declaring the VCPU_REGS_* as enums allows for more robust C code, but it prevents using the values in assembly files. Expliciting #define the indices in an asm-friendly file to prepare for VMX moving its transition code to a proper assembly file, but keep the enums for general usage. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
25 lines
606 B
C
25 lines
606 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_X86_KVM_VCPU_REGS_H
|
|
#define _ASM_X86_KVM_VCPU_REGS_H
|
|
|
|
#define __VCPU_REGS_RAX 0
|
|
#define __VCPU_REGS_RCX 1
|
|
#define __VCPU_REGS_RDX 2
|
|
#define __VCPU_REGS_RBX 3
|
|
#define __VCPU_REGS_RSP 4
|
|
#define __VCPU_REGS_RBP 5
|
|
#define __VCPU_REGS_RSI 6
|
|
#define __VCPU_REGS_RDI 7
|
|
|
|
#ifdef CONFIG_X86_64
|
|
#define __VCPU_REGS_R8 8
|
|
#define __VCPU_REGS_R9 9
|
|
#define __VCPU_REGS_R10 10
|
|
#define __VCPU_REGS_R11 11
|
|
#define __VCPU_REGS_R12 12
|
|
#define __VCPU_REGS_R13 13
|
|
#define __VCPU_REGS_R14 14
|
|
#define __VCPU_REGS_R15 15
|
|
#endif
|
|
|
|
#endif /* _ASM_X86_KVM_VCPU_REGS_H */
|