diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2012-04-04 15:02:05 +1000 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-04-15 17:09:54 +0200 |
commit | 12b1143b2807a5b760e477fac0e1028a9760b6c6 (patch) | |
tree | b1f4414f9730fed4aa2bf203cafdc2a5424dce26 /target-ppc/kvm_ppc.h | |
parent | e2fbb432fc4ec64d0a53c41588ede31450b6c6a8 (diff) | |
download | qemu-12b1143b2807a5b760e477fac0e1028a9760b6c6.tar.gz qemu-12b1143b2807a5b760e477fac0e1028a9760b6c6.tar.bz2 qemu-12b1143b2807a5b760e477fac0e1028a9760b6c6.zip |
target-ppc: Add hooks for handling tcg and kvm limitations
On target-ppc, our table of CPU types and features encodes the features as
found on the hardware, regardless of whether these features are actually
usable under TCG or KVM. We already have cases where the information from
the cpu table must be fixed up to account for limitations in the emulation
method we're using. e.g. TCG does not support the DFP and VSX instructions
and KVM needs different numbering of the CPUs in order to tell it the
correct thread to core mappings.
This patch cleans up these hacks to handle emulation limitations by
consolidating them into a pair of functions specifically for the purpose.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[AF: Style and typo fixes, rename new functions and drop ppc_def_t arg]
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-ppc/kvm_ppc.h')
-rw-r--r-- | target-ppc/kvm_ppc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target-ppc/kvm_ppc.h b/target-ppc/kvm_ppc.h index 8f1267c6cc..34ecad3e26 100644 --- a/target-ppc/kvm_ppc.h +++ b/target-ppc/kvm_ppc.h @@ -29,6 +29,7 @@ void *kvmppc_create_spapr_tce(uint32_t liobn, uint32_t window_size, int *pfd); int kvmppc_remove_spapr_tce(void *table, int pfd, uint32_t window_size); #endif /* !CONFIG_USER_ONLY */ const ppc_def_t *kvmppc_host_cpu_def(void); +int kvmppc_fixup_cpu(CPUPPCState *env); #else @@ -95,6 +96,10 @@ static inline const ppc_def_t *kvmppc_host_cpu_def(void) return NULL; } +static inline int kvmppc_fixup_cpu(CPUPPCState *env) +{ + return -1; +} #endif #ifndef CONFIG_KVM |