mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
ppc/pnv: Fix TIMA indirect access
When the TIMA of a CPU needs to be accessed from the indirect page, the thread id of the target CPU is first stored in the PC_TCTXT_INDIR0 register. This thread id is relative to the chip and not to the system. Introduce a helper routine to look for a CPU of a given PIR and fix pnv_xive_get_indirect_tctx() to scan only the threads of the local chip and not the whole machine. Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20191125065820.927-8-clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
5014c60261
commit
119eaa9d11
3 changed files with 26 additions and 6 deletions
|
@ -162,6 +162,8 @@ typedef struct PnvChipClass {
|
|||
#define PNV_CHIP_INDEX(chip) \
|
||||
(((chip)->chip_id >> 2) * 2 + ((chip)->chip_id & 0x3))
|
||||
|
||||
PowerPCCPU *pnv_chip_find_cpu(PnvChip *chip, uint32_t pir);
|
||||
|
||||
#define TYPE_PNV_MACHINE MACHINE_TYPE_NAME("powernv")
|
||||
#define PNV_MACHINE(obj) \
|
||||
OBJECT_CHECK(PnvMachineState, (obj), TYPE_PNV_MACHINE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue