mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
target-ppc: Add "compat" CPU option
PowerISA defines a compatibility mode for server POWERPC CPUs which is supported by the PCR special register which is hypervisor privileged. To support this mode for guests, SPAPR defines a set of virtual PVRs, one per PowerISA spec version. When a hypervisor needs a guest to work in a compatibility mode, it puts a virtual PVR value into @cpu-version property of a CPU node. This introduces a "compat" CPU option which defines maximal compatibility mode enabled. The supported modes are power6/power7/power8. This does not change the existing behaviour, new property will be used by next patches. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
af354f19a9
commit
8dfa3a5e85
3 changed files with 87 additions and 0 deletions
|
@ -83,6 +83,7 @@ typedef struct PowerPCCPUClass {
|
|||
* PowerPCCPU:
|
||||
* @env: #CPUPPCState
|
||||
* @cpu_dt_id: CPU index used in the device tree. KVM uses this index too
|
||||
* @max_compat: Maximal supported logical PVR from the command line
|
||||
*
|
||||
* A PowerPC CPU.
|
||||
*/
|
||||
|
@ -93,6 +94,7 @@ struct PowerPCCPU {
|
|||
|
||||
CPUPPCState env;
|
||||
int cpu_dt_id;
|
||||
uint32_t max_compat;
|
||||
};
|
||||
|
||||
static inline PowerPCCPU *ppc_env_get_cpu(CPUPPCState *env)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue