summaryrefslogtreecommitdiffstats
path: root/hw/spapr.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2012-09-12 16:57:09 +0000
committerAlexander Graf <agraf@suse.de>2012-10-04 15:54:17 +0200
commitf1af19d767073a0926ce12c19b1f06c4933bca35 (patch)
tree110cc5b921781bca1df01270a05e9f7d767944ab /hw/spapr.c
parent89243b3b0183471a373d1457e7f93811773b64a7 (diff)
downloadhqemu-f1af19d767073a0926ce12c19b1f06c4933bca35.zip
hqemu-f1af19d767073a0926ce12c19b1f06c4933bca35.tar.gz
ppc: Make kvm_arch_put_registers() put *all* the registers
At least when invoked with high enough 'level' arguments, kvm_arch_put_registers() is supposed to copy essentially all the cpu state as encoded in qemu's internal structures into the kvm state. Currently the ppc version does not do this - it never calls KVM_SET_SREGS, for example, and therefore never sets the SDR1 and various other important though rarely changed registers. Instead, the code paths which need to set these registers need to explicitly make (conditional) kvm calls which transfer the changes to kvm. This breaks the usual model of handling state updates in qemu, where code just changes the internal model and has it flushed out to kvm automatically at some later point. This patch fixes this for Book S ppc CPUs by adding a suitable call to KVM_SET_SREGS and als to KVM_SET_ONE_REG to set the HIOR (the only register that is set with that call so far). This lets us remove the hacks to explicitly set these registers from the kvmppc_set_papr() function. The problem still exists for Book E CPUs (which use a different version of the kvm_sregs structure). But fixing that has some complications of its own so can be left to another day. Lkewise, there is still some ugly code for setting the PVR through special calls to SET_SREGS which is left in for now. The PVR needs to be set especially early because it can affect what other features are available on the CPU, so I need to do more thinking to see if it can be integrated into the normal paths or not. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/spapr.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud