mirror of https://github.com/xemu-project/xemu.git
cpu: Introduce CPUNegativeOffsetState
Nothing in there so far, but all of the plumbing done within the target ArchCPU state. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
7506ed902e
commit
5b146dc716
|
@ -404,4 +404,28 @@ static inline CPUState *env_cpu(CPUArchState *env)
|
||||||
return &env_archcpu(env)->parent_obj;
|
return &env_archcpu(env)->parent_obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* env_neg(env)
|
||||||
|
* @env: The architecture environment
|
||||||
|
*
|
||||||
|
* Return the CPUNegativeOffsetState associated with the environment.
|
||||||
|
*/
|
||||||
|
static inline CPUNegativeOffsetState *env_neg(CPUArchState *env)
|
||||||
|
{
|
||||||
|
ArchCPU *arch_cpu = container_of(env, ArchCPU, env);
|
||||||
|
return &arch_cpu->neg;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* cpu_neg(cpu)
|
||||||
|
* @cpu: The generic CPUState
|
||||||
|
*
|
||||||
|
* Return the CPUNegativeOffsetState associated with the cpu.
|
||||||
|
*/
|
||||||
|
static inline CPUNegativeOffsetState *cpu_neg(CPUState *cpu)
|
||||||
|
{
|
||||||
|
ArchCPU *arch_cpu = container_of(cpu, ArchCPU, parent_obj);
|
||||||
|
return &arch_cpu->neg;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* CPU_ALL_H */
|
#endif /* CPU_ALL_H */
|
||||||
|
|
|
@ -227,4 +227,12 @@ typedef struct CPUTLB {
|
||||||
|
|
||||||
#endif /* !CONFIG_USER_ONLY && CONFIG_TCG */
|
#endif /* !CONFIG_USER_ONLY && CONFIG_TCG */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This structure must be placed in ArchCPU immedately
|
||||||
|
* before CPUArchState, as a field named "neg".
|
||||||
|
*/
|
||||||
|
typedef struct CPUNegativeOffsetState {
|
||||||
|
/* Empty */
|
||||||
|
} CPUNegativeOffsetState;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -272,6 +272,7 @@ struct AlphaCPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUAlphaState env;
|
CPUAlphaState env;
|
||||||
|
|
||||||
/* This alarm doesn't exist in real hardware; we wish it did. */
|
/* This alarm doesn't exist in real hardware; we wish it did. */
|
||||||
|
|
|
@ -721,6 +721,7 @@ struct ARMCPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUARMState env;
|
CPUARMState env;
|
||||||
|
|
||||||
/* Coprocessor information */
|
/* Coprocessor information */
|
||||||
|
|
|
@ -180,6 +180,7 @@ struct CRISCPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUCRISState env;
|
CPUCRISState env;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -218,6 +218,7 @@ struct HPPACPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUHPPAState env;
|
CPUHPPAState env;
|
||||||
QEMUTimer *alarm_timer;
|
QEMUTimer *alarm_timer;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1369,6 +1369,7 @@ struct X86CPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUX86State env;
|
CPUX86State env;
|
||||||
|
|
||||||
bool hyperv_vapic;
|
bool hyperv_vapic;
|
||||||
|
|
|
@ -186,6 +186,7 @@ struct LM32CPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPULM32State env;
|
CPULM32State env;
|
||||||
|
|
||||||
uint32_t revision;
|
uint32_t revision;
|
||||||
|
|
|
@ -160,6 +160,7 @@ struct M68kCPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUM68KState env;
|
CPUM68KState env;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -287,6 +287,9 @@ struct MicroBlazeCPU {
|
||||||
|
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
|
CPUMBState env;
|
||||||
|
|
||||||
/* Microblaze Configuration Settings */
|
/* Microblaze Configuration Settings */
|
||||||
struct {
|
struct {
|
||||||
bool stackprot;
|
bool stackprot;
|
||||||
|
@ -306,8 +309,6 @@ struct MicroBlazeCPU {
|
||||||
char *version;
|
char *version;
|
||||||
uint8_t pvr;
|
uint8_t pvr;
|
||||||
} cfg;
|
} cfg;
|
||||||
|
|
||||||
CPUMBState env;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1068,6 +1068,7 @@ struct MIPSCPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUMIPSState env;
|
CPUMIPSState env;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,7 @@ typedef struct MoxieCPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUMoxieState env;
|
CPUMoxieState env;
|
||||||
} MoxieCPU;
|
} MoxieCPU;
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,9 @@ typedef struct Nios2CPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUNios2State env;
|
CPUNios2State env;
|
||||||
|
|
||||||
bool mmu_present;
|
bool mmu_present;
|
||||||
uint32_t pid_num_bits;
|
uint32_t pid_num_bits;
|
||||||
uint32_t tlb_num_ways;
|
uint32_t tlb_num_ways;
|
||||||
|
|
|
@ -313,8 +313,8 @@ typedef struct OpenRISCCPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUOpenRISCState env;
|
CPUOpenRISCState env;
|
||||||
|
|
||||||
} OpenRISCCPU;
|
} OpenRISCCPU;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1184,7 +1184,9 @@ struct PowerPCCPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUPPCState env;
|
CPUPPCState env;
|
||||||
|
|
||||||
int vcpu_id;
|
int vcpu_id;
|
||||||
uint32_t compat_pvr;
|
uint32_t compat_pvr;
|
||||||
PPCVirtualHypervisor *vhyp;
|
PPCVirtualHypervisor *vhyp;
|
||||||
|
|
|
@ -210,6 +210,7 @@ typedef struct RISCVCPU {
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPURISCVState env;
|
CPURISCVState env;
|
||||||
|
|
||||||
/* Configuration Settings */
|
/* Configuration Settings */
|
||||||
|
|
|
@ -156,6 +156,7 @@ struct S390CPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUS390XState env;
|
CPUS390XState env;
|
||||||
S390CPUModel *model;
|
S390CPUModel *model;
|
||||||
/* needed for live migration */
|
/* needed for live migration */
|
||||||
|
|
|
@ -204,6 +204,7 @@ struct SuperHCPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUSH4State env;
|
CPUSH4State env;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -529,6 +529,7 @@ struct SPARCCPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUSPARCState env;
|
CPUSPARCState env;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -135,6 +135,7 @@ typedef struct TileGXCPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUTLGState env;
|
CPUTLGState env;
|
||||||
} TileGXCPU;
|
} TileGXCPU;
|
||||||
|
|
||||||
|
|
|
@ -205,6 +205,7 @@ struct TriCoreCPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUTriCoreState env;
|
CPUTriCoreState env;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,7 @@ struct UniCore32CPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUUniCore32State env;
|
CPUUniCore32State env;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -556,6 +556,7 @@ struct XtensaCPU {
|
||||||
CPUState parent_obj;
|
CPUState parent_obj;
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
|
|
||||||
|
CPUNegativeOffsetState neg;
|
||||||
CPUXtensaState env;
|
CPUXtensaState env;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue