Commit 9fceefa7d12c832c4da69737ce216c415309a7c3
1 parent
5b52b991
Don't print any message when a priviledge exception occurs on mfpvr
as the Linux allows applications to read this register. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3510 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
10 additions
and
4 deletions
target-ppc/translate.c
@@ -3550,11 +3550,17 @@ static always_inline void gen_op_mfspr (DisasContext *ctx) | @@ -3550,11 +3550,17 @@ static always_inline void gen_op_mfspr (DisasContext *ctx) | ||
3550 | gen_op_store_T0_gpr(rD(ctx->opcode)); | 3550 | gen_op_store_T0_gpr(rD(ctx->opcode)); |
3551 | } else { | 3551 | } else { |
3552 | /* Privilege exception */ | 3552 | /* Privilege exception */ |
3553 | - if (loglevel != 0) { | ||
3554 | - fprintf(logfile, "Trying to read privileged spr %d %03x\n", | ||
3555 | - sprn, sprn); | 3553 | + /* This is a hack to avoid warnings when running Linux: |
3554 | + * this OS breaks the PowerPC virtualisation model, | ||
3555 | + * allowing userland application to read the PVR | ||
3556 | + */ | ||
3557 | + if (sprn != SPR_PVR) { | ||
3558 | + if (loglevel != 0) { | ||
3559 | + fprintf(logfile, "Trying to read privileged spr %d %03x\n", | ||
3560 | + sprn, sprn); | ||
3561 | + } | ||
3562 | + printf("Trying to read privileged spr %d %03x\n", sprn, sprn); | ||
3556 | } | 3563 | } |
3557 | - printf("Trying to read privileged spr %d %03x\n", sprn, sprn); | ||
3558 | GEN_EXCP_PRIVREG(ctx); | 3564 | GEN_EXCP_PRIVREG(ctx); |
3559 | } | 3565 | } |
3560 | } else { | 3566 | } else { |