mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
target/i386: move paging mode constants from SVM to cpu.h
We will reuse the page walker for both SVM and regular accesses. To do so we will build a function that receives the currently active paging mode; start by including in cpu.h the constants and the function to go from cr4/hflags/efer to the paging mode. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
6ed6b0d380
commit
616a89eaad
4 changed files with 31 additions and 21 deletions
|
@ -303,6 +303,11 @@ typedef enum X86Seg {
|
|||
#define PG_ERROR_I_D_MASK 0x10
|
||||
#define PG_ERROR_PK_MASK 0x20
|
||||
|
||||
#define PG_MODE_PAE (1 << 0)
|
||||
#define PG_MODE_LMA (1 << 1)
|
||||
#define PG_MODE_NXE (1 << 2)
|
||||
#define PG_MODE_PSE (1 << 3)
|
||||
|
||||
#define MCG_CTL_P (1ULL<<8) /* MCG_CAP register available */
|
||||
#define MCG_SER_P (1ULL<<24) /* MCA recovery/new status bits */
|
||||
#define MCG_LMCE_P (1ULL<<27) /* Local Machine Check Supported */
|
||||
|
@ -2105,6 +2110,9 @@ static inline bool cpu_vmx_maybe_enabled(CPUX86State *env)
|
|||
((env->cr[4] & CR4_VMXE_MASK) || (env->hflags & HF_SMM_MASK));
|
||||
}
|
||||
|
||||
/* excp_helper.c */
|
||||
int get_pg_mode(CPUX86State *env);
|
||||
|
||||
/* fpu_helper.c */
|
||||
void update_fp_status(CPUX86State *env);
|
||||
void update_mxcsr_status(CPUX86State *env);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue