]> Git Repo - qemu.git/commitdiff
target/ppc: Allow PIR read in privileged mode
authorluporl <[email protected]>
Fri, 8 Jun 2018 09:46:55 +0000 (11:46 +0200)
committerDavid Gibson <[email protected]>
Tue, 12 Jun 2018 00:44:36 +0000 (10:44 +1000)
According to PowerISA, the PIR register should be readable in privileged
mode also, not only in hypervisor privileged mode.

PowerISA 3.0 - 4.3.3 Processor Identification Register

"Read access to the PIR is privileged; write access is not provided."

Figure 18 in section 4.4.4 explicitly confirms that mfspr PIR is privileged
and doesn't require hypervisor state.

Cc: David Gibson <[email protected]>
Cc: Alexander Graf <[email protected]>
Cc: [email protected]
Signed-off-by: Leandro Lupori <[email protected]>
Reviewed-by: Jose Ricardo Ziviani <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Signed-off-by: Greg Kurz <[email protected]>
Signed-off-by: David Gibson <[email protected]>
target/ppc/translate_init.inc.c

index 1a89017ddea83534d6e6dcb97133b31b68467fe4..bb9296f5a3daee825f846d738a62d53cf6662364 100644 (file)
@@ -7819,7 +7819,7 @@ static void gen_spr_book3s_ids(CPUPPCState *env)
     /* Processor identification */
     spr_register_hv(env, SPR_PIR, "PIR",
                  SPR_NOACCESS, SPR_NOACCESS,
-                 SPR_NOACCESS, SPR_NOACCESS,
+                 &spr_read_generic, SPR_NOACCESS,
                  &spr_read_generic, NULL,
                  0x00000000);
     spr_register_hv(env, SPR_HID0, "HID0",
This page took 0.038183 seconds and 4 git commands to generate.