]> git.proxmox.com Git - qemu.git/commit
ppc: Alter CPU state to mask out TCG unimplemented instructions as appropriate
authorDavid Gibson <david@gibson.dropbear.id.au>
Sun, 30 Oct 2011 15:51:24 +0000 (15:51 +0000)
committerAlexander Graf <agraf@suse.de>
Mon, 31 Oct 2011 01:57:56 +0000 (02:57 +0100)
commit02d4eae4b0be19d84996105cf6e0cc33f41e3833
treeb5b3001e2a4e9c3e19d0176cba88832a1bc9fc29
parent74b41e5676568e6560474267bbf1a5a32d3e2c41
ppc: Alter CPU state to mask out TCG unimplemented instructions as appropriate

The CPU state contains two bitmaps, initialized from the CPU spec
which describes which instructions are implemented on the CPU.  A
couple of bits are defined which cover instructions (VSX and DFP)
which are not currently implemented in TCG.  So far, these are only
used to handle the case of -cpu host because a KVM guest can use
the instructions when the host CPU supports them.

However, it's a mild layering violation to simply not include those
bits in the CPU descriptions for those CPUs that do support them,
just because we can't handle them in TCG.  This patch corrects the
situation, so that the instruction bits _are_ shown correctly in the
cpu spec table, but are masked out from the cpu state in the non-KVM
case.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/cpu.h
target-ppc/translate_init.c