summaryrefslogtreecommitdiffstats
path: root/hw/ppc
diff options
context:
space:
mode:
authorNicholas Piggin2022-02-18 08:34:14 +0100
committerCédric Le Goater2022-02-18 08:34:14 +0100
commitf32d4ab41c467c0e4ddcaff37e4f2af57bcaad8c (patch)
treeaaa6c70f4c82fdd00c5f18410162f0bc5cea1847 /hw/ppc
parenttarget/ppc: add vhyp addressing mode helper for radix MMU (diff)
downloadqemu-f32d4ab41c467c0e4ddcaff37e4f2af57bcaad8c.tar.gz
qemu-f32d4ab41c467c0e4ddcaff37e4f2af57bcaad8c.tar.xz
qemu-f32d4ab41c467c0e4ddcaff37e4f2af57bcaad8c.zip
target/ppc: make vhyp get_pate method take lpid and return success
In prepartion for implementing a full partition table option for vhyp, update the get_pate method to take an lpid and return a success/fail indicator. The spapr implementation currently just asserts lpid is always 0 and always return success. Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [ clg: checkpatch fixes ] Message-Id: <20220216102545.1808018-6-npiggin@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/spapr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 9263985663..4fdff12a96 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1309,13 +1309,18 @@ void spapr_set_all_lpcrs(target_ulong value, target_ulong mask)
}
}
-static void spapr_get_pate(PPCVirtualHypervisor *vhyp, ppc_v3_pate_t *entry)
+static bool spapr_get_pate(PPCVirtualHypervisor *vhyp, PowerPCCPU *cpu,
+ target_ulong lpid, ppc_v3_pate_t *entry)
{
SpaprMachineState *spapr = SPAPR_MACHINE(vhyp);
+ assert(lpid == 0);
+
/* Copy PATE1:GR into PATE0:HR */
entry->dw0 = spapr->patb_entry & PATE0_HR;
entry->dw1 = spapr->patb_entry;
+
+ return true;
}
#define HPTE(_table, _i) (void *)(((uint64_t *)(_table)) + ((_i) * 2))