aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/xics_kvm.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-11-14 15:24:01 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-11-14 15:24:01 +0000
commit0dc8874aded76e2b6c73d95df5651e3c8a31a9ec (patch)
tree323eed70955857a817f86a0e21d1f5ca2fc40217 /hw/intc/xics_kvm.c
parent9895606363615a0d2a9554c9dadc7c57ec81f969 (diff)
parentdcb556fc6ad879f7d29fb233a273a1ea3aa0549c (diff)
downloadqemu-0dc8874aded76e2b6c73d95df5651e3c8a31a9ec.zip
qemu-0dc8874aded76e2b6c73d95df5651e3c8a31a9ec.tar.gz
qemu-0dc8874aded76e2b6c73d95df5651e3c8a31a9ec.tar.bz2
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.11-20171114' into staging
ppc patch queue for 2017-11-14 Another couple of fixes for qemu-2.11. # gpg: Signature made Tue 14 Nov 2017 04:36:20 GMT # gpg: using RSA key 0x6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-2.11-20171114: xics/kvm: synchonize state before 'info pic' target/ppc: correct htab shift for hash on radix Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/intc/xics_kvm.c')
-rw-r--r--hw/intc/xics_kvm.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
index 3091ad3..89fb20e 100644
--- a/hw/intc/xics_kvm.c
+++ b/hw/intc/xics_kvm.c
@@ -81,6 +81,18 @@ static void icp_get_kvm_state(ICPState *icp)
& KVM_REG_PPC_ICP_PPRI_MASK;
}
+static void do_icp_synchronize_state(CPUState *cpu, run_on_cpu_data arg)
+{
+ icp_get_kvm_state(arg.host_ptr);
+}
+
+static void icp_synchronize_state(ICPState *icp)
+{
+ if (icp->cs) {
+ run_on_cpu(icp->cs, do_icp_synchronize_state, RUN_ON_CPU_HOST_PTR(icp));
+ }
+}
+
static int icp_set_kvm_state(ICPState *icp, int version_id)
{
uint64_t state;
@@ -156,6 +168,7 @@ static void icp_kvm_class_init(ObjectClass *klass, void *data)
icpc->post_load = icp_set_kvm_state;
icpc->realize = icp_kvm_realize;
icpc->reset = icp_kvm_reset;
+ icpc->synchronize_state = icp_synchronize_state;
}
static const TypeInfo icp_kvm_info = {
@@ -234,6 +247,11 @@ static void ics_get_kvm_state(ICSState *ics)
}
}
+static void ics_synchronize_state(ICSState *ics)
+{
+ ics_get_kvm_state(ics);
+}
+
static int ics_set_kvm_state(ICSState *ics, int version_id)
{
uint64_t state;
@@ -347,6 +365,7 @@ static void ics_kvm_class_init(ObjectClass *klass, void *data)
icsc->realize = ics_kvm_realize;
icsc->pre_save = ics_get_kvm_state;
icsc->post_load = ics_set_kvm_state;
+ icsc->synchronize_state = ics_synchronize_state;
}
static const TypeInfo ics_kvm_info = {