target/ppc: Filter mtmsr[d] input before setting MSR
commit6fa5726be6a52b246335cb86a3c118cdfd40c677
authorMatheus Ferst <matheus.ferst@eldorado.org.br>
Fri, 15 Oct 2021 18:19:40 +0000 (15 15:19 -0300)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 21 Oct 2021 00:42:47 +0000 (21 11:42 +1100)
tree7af203bb6426ddbed97b447aa74f1cb22a7d8a05
parent5ff1dfdf66f99c5208187cc2716a3a974f22b7c7
target/ppc: Filter mtmsr[d] input before setting MSR

PowerISA says that mtmsr[d] "does not alter MSR[HV], MSR[S], MSR[ME], or
MSR[LE]", but the current code only filters the GPR-provided value if
L=1. This behavior caused some problems in FreeBSD, and a build option
was added to work around the issue [1], but it seems that the bug was
not reported in launchpad/gitlab. This patch address the issue in qemu,
so the option on FreeBSD should no longer be required.

[1] https://cgit.freebsd.org/src/commit/?id=4efb1ca7d2a44cfb33d7f9e18bd92f8d68dcfee0

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211015181940.197982-1-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/cpu.h
target/ppc/translate.c