ppc patch queue 2017-08-09

This series contains a number of bugfixes for ppc and related
 machines, for the qemu-2.10.release.  Some are true regressions,
 others are serious enough and non-invasive enough to fix that it's
 worth putting in 2.10 this late.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlmKrEUACgkQbDjKyiDZ
 s5IkMQ/+NGW30/N3siqDh3R7JUL9jpT7N4XRuYrGlWcJFh25NscEVw6M6iPJtkDZ
 qS7/OZDlfnELj/9Js8kcTYdzI+X3X9WSnftiZalJ0KYiE6sPDiWRa4bo9jiT+0OU
 MkIY1pVTpzrJnZl0XSlN/n+senjdBQWg/djmatX8+LPTz75lOlkujxo6LEDOtyv5
 RSx9jME4J/HZ0WQyoY8dOAORBQQHxtJel5RBfd+BloTfslA+VREJEOi8d+Xkc9oz
 H4UPEMp/Kb4fpBB7XsaACUC3HRs7kikG/eS6tOtwKor9jwpp2v/BP733jMHsebzw
 RiyJVnVVk8kfyC7DBsra3XhjBtDlQPbq/quL/O3qMcdc8EslkVECMBUbb2tWsnYD
 /H1H1sjdvDJV9nVs9Wbqmi/N/SE6gvubK35wBpWQ0U0ZDGcbSdmwXkbdjFT1plUg
 z5+oZWYmOP0ndsKrv4+rmeqbMszEBQv4EBSZJ1LswGdC7+7Ga95VmN+f6ZUFq2en
 OlSlgPAvXn0PkEYgn/CVIr+Oq6lR5SNRtvDkLNpa+IkQzBoGXCgIeiuyR6ZaswH5
 FywK+QaiVKqtwgF0Zb3JWf6L5fyKdOE6fTZvyL93esXVCBSfkMIvCeACDLInczUl
 xgZCryyBpdVT/mxz4M06QI43H8nb0WIbY6UeV2WuXIN4dJlSJqE=
 =43aW
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.10-20170809' into staging

ppc patch queue 2017-08-09

This series contains a number of bugfixes for ppc and related
machines, for the qemu-2.10.release.  Some are true regressions,
others are serious enough and non-invasive enough to fix that it's
worth putting in 2.10 this late.

# gpg: Signature made Wed 09 Aug 2017 07:31:33 BST
# 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.10-20170809:
  spapr: Fix bug in h_signal_sys_reset()
  spapr_drc: abort if object_property_add_child() fails
  target/ppc: Add stub implementation of the PSSCR
  target/ppc: Implement TIDR
  ppc: fix double-free in cpu_post_load()
  booke206: fix MAS update on tlb miss

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2017-08-10 11:12:36 +01:00
commit b38df311c1
6 changed files with 18 additions and 8 deletions

View File

@ -541,7 +541,7 @@ sPAPRDRConnector *spapr_dr_connector_new(Object *owner, const char *type,
drc->owner = owner;
prop_name = g_strdup_printf("dr-connector[%"PRIu32"]",
spapr_drc_index(drc));
object_property_add_child(owner, prop_name, OBJECT(drc), NULL);
object_property_add_child(owner, prop_name, OBJECT(drc), &error_abort);
object_property_set_bool(OBJECT(drc), true, "realized", NULL);
g_free(prop_name);

View File

@ -1431,11 +1431,10 @@ static target_ulong h_signal_sys_reset(PowerPCCPU *cpu,
} else {
/* Unicast */
CPU_FOREACH(cs) {
if (cpu->cpu_dt_id == target) {
run_on_cpu(cs, spapr_do_system_reset_on_cpu, RUN_ON_CPU_NULL);
return H_SUCCESS;
}
cs = CPU(ppc_get_vcpu_by_dt_id(target));
if (cs) {
run_on_cpu(cs, spapr_do_system_reset_on_cpu, RUN_ON_CPU_NULL);
return H_SUCCESS;
}
return H_PARAMETER;
}

View File

@ -1451,6 +1451,7 @@ void ppc_compat_add_property(Object *obj, const char *name,
#define SPR_TEXASR (0x082)
#define SPR_TEXASRU (0x083)
#define SPR_UCTRL (0x088)
#define SPR_TIDR (0x090)
#define SPR_MPC_CMPA (0x090)
#define SPR_MPC_CMPB (0x091)
#define SPR_MPC_CMPC (0x092)
@ -1770,6 +1771,7 @@ void ppc_compat_add_property(Object *obj, const char *name,
#define SPR_IC (0x350)
#define SPR_VTB (0x351)
#define SPR_MMCRC (0x353)
#define SPR_PSSCR (0x357)
#define SPR_440_INV0 (0x370)
#define SPR_440_INV1 (0x371)
#define SPR_440_INV2 (0x372)

View File

@ -239,7 +239,6 @@ static int cpu_post_load(void *opaque, int version_id)
ppc_set_compat(cpu, cpu->compat_pvr, &local_err);
if (local_err) {
error_report_err(local_err);
error_free(local_err);
return -1;
}
} else

View File

@ -1551,7 +1551,7 @@ static int cpu_ppc_handle_mmu_fault(CPUPPCState *env, target_ulong address,
env->spr[SPR_40x_ESR] = 0x00000000;
break;
case POWERPC_MMU_BOOKE206:
booke206_update_mas_tlb_miss(env, address, rw);
booke206_update_mas_tlb_miss(env, address, 2);
/* fall through */
case POWERPC_MMU_BOOKE:
cs->exception_index = POWERPC_EXCP_ITLB;

View File

@ -8841,6 +8841,16 @@ static void init_proc_POWER9(CPUPPCState *env)
gen_spr_power8_book4(env);
gen_spr_power8_rpr(env);
/* POWER9 Specific registers */
spr_register_kvm(env, SPR_TIDR, "TIDR", NULL, NULL,
spr_read_generic, spr_write_generic,
KVM_REG_PPC_TIDR, 0);
/* FIXME: Filter fields properly based on privilege level */
spr_register_kvm_hv(env, SPR_PSSCR, "PSSCR", NULL, NULL, NULL, NULL,
spr_read_generic, spr_write_generic,
KVM_REG_PPC_PSSCR, 0);
/* env variables */
#if !defined(CONFIG_USER_ONLY)
env->slb_nr = 32;