ppc 6.2 queue :
* Fix of a regression in floating point load instructions (Matheus) * Associativity fix for pseries machine (Daniel) * tlbivax fix for BookE machines (Danel) -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmGOS+EACgkQUaNDx8/7 7KF8OQ/8C1tgrQbzWpFBtPm6zHJhxUu8+pdlpV3Mc//g7f2OWij2lgiMLdlTmyo7 xnIwBOv8AROCZ86V/Itn5pofyCbj9Ydo8Bnlpbq2dB5xoOWJIZANtEK8EBk81mkA /yj9nCtffpjkj0kzDZIxzAUh/bCUTxrXjnroXTflrcIR6gICheCAy3ZKSsM64Mle gDKFQVjFU/KOZhqM45WqKyx7dI1AWctw3pGLGQFAH2N8mdksamxLFijm0bnOgevM htmFPB74rJQ0KTy+pl+JujYaEF7i/XzE2Dhos3QQ6RTdxBFeXW/FbVoShdFLR24M D1L9o9IfADKwTlBCzA8s+K5S5W+/W6uuV/8fd57pPZ4DLH485uQ8C7jJQVo1SvXV M3Sf7x8vUtQRB1l0kWK9ymFQ6ShHSpT1i6RzcrEGtRlkj5ui42GjpRuFeRKmqg2h YoeYDeer2IoqPWUXrIzwNqxAQ8EVlB06OAGC9+oWYdAcBP0JAVA49JyO/vqL+jcL XLV5oPV8RG9KdNmo47J0lxKcXZ2T1BAWeh7OnBXnbrLVILh+oHvlhg9GJhNE+RAa whMhxdlkJPgkikrhU7MVvZ+I1cxINDqo0Pib7T8hGPxEKa16xoL9tOT9YIYLXGW7 3q46Ts0D1g8Oiq2DXrFbRmWKLaKN/dzyY3jNKSDfyZJQKpmMvhg= =E3d7 -----END PGP SIGNATURE----- Merge tag 'pull-ppc-20211112' of https://github.com/legoater/qemu into staging ppc 6.2 queue : * Fix of a regression in floating point load instructions (Matheus) * Associativity fix for pseries machine (Daniel) * tlbivax fix for BookE machines (Danel) # gpg: Signature made Fri 12 Nov 2021 12:11:29 PM CET # gpg: using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1 # gpg: Good signature from "Cédric Le Goater <clg@kaod.org>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: A0F6 6548 F048 95EB FE6B 0B60 51A3 43C7 CFFB ECA1 * tag 'pull-ppc-20211112' of https://github.com/legoater/qemu: ppc/mmu_helper.c: do not truncate 'ea' in booke206_invalidate_ea_tlb() spapr_numa.c: fix FORM1 distance-less nodes target/ppc: Fix register update on lf[sd]u[x]/stf[sd]u[x] Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
commit
42f6c9179b
@ -66,16 +66,41 @@ static const uint32_t *get_associativity(SpaprMachineState *spapr, int node_id)
|
||||
return spapr->FORM1_assoc_array[node_id];
|
||||
}
|
||||
|
||||
/*
|
||||
* Wrapper that returns node distance from ms->numa_state->nodes
|
||||
* after handling edge cases where the distance might be absent.
|
||||
*/
|
||||
static int get_numa_distance(MachineState *ms, int src, int dst)
|
||||
{
|
||||
NodeInfo *numa_info = ms->numa_state->nodes;
|
||||
int ret = numa_info[src].distance[dst];
|
||||
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* In case QEMU adds a default NUMA single node when the user
|
||||
* did not add any, or where the user did not supply distances,
|
||||
* the distance will be absent (zero). Return local/remote
|
||||
* distance in this case.
|
||||
*/
|
||||
if (src == dst) {
|
||||
return NUMA_DISTANCE_MIN;
|
||||
}
|
||||
|
||||
return NUMA_DISTANCE_DEFAULT;
|
||||
}
|
||||
|
||||
static bool spapr_numa_is_symmetrical(MachineState *ms)
|
||||
{
|
||||
int src, dst;
|
||||
int nb_numa_nodes = ms->numa_state->num_nodes;
|
||||
NodeInfo *numa_info = ms->numa_state->nodes;
|
||||
int src, dst;
|
||||
|
||||
for (src = 0; src < nb_numa_nodes; src++) {
|
||||
for (dst = src; dst < nb_numa_nodes; dst++) {
|
||||
if (numa_info[src].distance[dst] !=
|
||||
numa_info[dst].distance[src]) {
|
||||
if (get_numa_distance(ms, src, dst) !=
|
||||
get_numa_distance(ms, dst, src)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -133,7 +158,6 @@ static uint8_t spapr_numa_get_numa_level(uint8_t distance)
|
||||
static void spapr_numa_define_FORM1_domains(SpaprMachineState *spapr)
|
||||
{
|
||||
MachineState *ms = MACHINE(spapr);
|
||||
NodeInfo *numa_info = ms->numa_state->nodes;
|
||||
int nb_numa_nodes = ms->numa_state->num_nodes;
|
||||
int src, dst, i, j;
|
||||
|
||||
@ -170,7 +194,7 @@ static void spapr_numa_define_FORM1_domains(SpaprMachineState *spapr)
|
||||
* The PPC kernel expects the associativity domains of node 0 to
|
||||
* be always 0, and this algorithm will grant that by default.
|
||||
*/
|
||||
uint8_t distance = numa_info[src].distance[dst];
|
||||
uint8_t distance = get_numa_distance(ms, src, dst);
|
||||
uint8_t n_level = spapr_numa_get_numa_level(distance);
|
||||
uint32_t assoc_src;
|
||||
|
||||
@ -498,7 +522,6 @@ static void spapr_numa_FORM2_write_rtas_tables(SpaprMachineState *spapr,
|
||||
void *fdt, int rtas)
|
||||
{
|
||||
MachineState *ms = MACHINE(spapr);
|
||||
NodeInfo *numa_info = ms->numa_state->nodes;
|
||||
int nb_numa_nodes = ms->numa_state->num_nodes;
|
||||
int distance_table_entries = nb_numa_nodes * nb_numa_nodes;
|
||||
g_autofree uint32_t *lookup_index_table = NULL;
|
||||
@ -540,30 +563,7 @@ static void spapr_numa_FORM2_write_rtas_tables(SpaprMachineState *spapr,
|
||||
|
||||
for (src = 0; src < nb_numa_nodes; src++) {
|
||||
for (dst = 0; dst < nb_numa_nodes; dst++) {
|
||||
/*
|
||||
* We need to be explicit with the local distance
|
||||
* value to cover the case where the user didn't added any
|
||||
* NUMA nodes, but QEMU adds the default NUMA node without
|
||||
* adding the numa_info to retrieve distance info from.
|
||||
*/
|
||||
distance_table[i] = numa_info[src].distance[dst];
|
||||
if (distance_table[i] == 0) {
|
||||
/*
|
||||
* In case QEMU adds a default NUMA single node when the user
|
||||
* did not add any, or where the user did not supply distances,
|
||||
* the value will be 0 here. Populate the table with a fallback
|
||||
* simple local / remote distance.
|
||||
*/
|
||||
if (src == dst) {
|
||||
distance_table[i] = NUMA_DISTANCE_MIN;
|
||||
} else {
|
||||
distance_table[i] = numa_info[src].distance[dst];
|
||||
if (distance_table[i] < NUMA_DISTANCE_MIN) {
|
||||
distance_table[i] = NUMA_DISTANCE_DEFAULT;
|
||||
}
|
||||
}
|
||||
}
|
||||
i++;
|
||||
distance_table[i++] = get_numa_distance(ms, src, dst);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1216,7 +1216,7 @@ void helper_booke206_tlbsx(CPUPPCState *env, target_ulong address)
|
||||
}
|
||||
|
||||
static inline void booke206_invalidate_ea_tlb(CPUPPCState *env, int tlbn,
|
||||
uint32_t ea)
|
||||
vaddr ea)
|
||||
{
|
||||
int i;
|
||||
int ways = booke206_tlb_ways(env, tlbn);
|
||||
|
@ -1328,7 +1328,7 @@ static bool do_lsfpsd(DisasContext *ctx, int rt, int ra, TCGv displ,
|
||||
set_fpr(rt, t0);
|
||||
}
|
||||
if (update) {
|
||||
tcg_gen_mov_tl(cpu_gpr[rt], ea);
|
||||
tcg_gen_mov_tl(cpu_gpr[ra], ea);
|
||||
}
|
||||
tcg_temp_free_i64(t0);
|
||||
tcg_temp_free(ea);
|
||||
|
Loading…
Reference in New Issue
Block a user