diff options
author | Harsh Prateek Bora <harshpb@linux.ibm.com> | 2024-03-08 16:49:38 +0530 |
---|---|---|
committer | Nicholas Piggin <npiggin@gmail.com> | 2024-03-13 02:47:04 +1000 |
commit | 98823ce03ad5f3fe6f8a43d747168452ecc6cc8b (patch) | |
tree | 522cfe1a5c8c004597ab6cf4fc94b1dceb767ab7 /hw/ppc/spapr.c | |
parent | 64c43909b29765f415c4bfe3e38f113252894277 (diff) | |
download | qemu-98823ce03ad5f3fe6f8a43d747168452ecc6cc8b.zip qemu-98823ce03ad5f3fe6f8a43d747168452ecc6cc8b.tar.gz qemu-98823ce03ad5f3fe6f8a43d747168452ecc6cc8b.tar.bz2 |
spapr: nested: Use correct source for parttbl info for nested PAPR API.
For nested PAPR API, we use SpaprMachineStateNestedGuest struct to store
partition table info, use the same in spapr_get_pate_nested() via
helper.
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r-- | hw/ppc/spapr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e001ffe..aaf7378 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1421,11 +1421,13 @@ static bool spapr_get_pate(PPCVirtualHypervisor *vhyp, PowerPCCPU *cpu, entry->dw1 = spapr->patb_entry; return true; } else { - assert(spapr_nested_api(spapr)); if (spapr_nested_api(spapr) == NESTED_API_KVM_HV) { return spapr_get_pate_nested_hv(spapr, cpu, lpid, entry); + } else if (spapr_nested_api(spapr) == NESTED_API_PAPR) { + return spapr_get_pate_nested_papr(spapr, cpu, lpid, entry); + } else { + g_assert_not_reached(); } - return false; } } |