OSDN Git Service

target/ppc/mmu_common: Fix SRR1/MSR error code on Book-E
authorVitaly Cheptsov <cheptsov@ispras.ru>
Fri, 28 Jan 2022 12:15:02 +0000 (13:15 +0100)
committerCédric Le Goater <clg@kaod.org>
Fri, 28 Jan 2022 12:15:02 +0000 (13:15 +0100)
commite31ea5d89b613072e64b83f67e9763e9b149b87e
treef6f25c1a221be93dd6267f49dee2db4a4f2a900a
parent5aad0457eceec0085a289dde72e73f15db556b99
target/ppc/mmu_common: Fix SRR1/MSR error code on Book-E

Book-E architecture does not set the error code in 31:27 bits
of SRR1, but instead uses these bits for custom fields such
as GS (Guest Supervisor).

Wrongly setting these fields will result in QEMU crashes
when attempting to execute not executable code due to the attempts
to use Guest Supervisor mode.

Cc: "Cédric Le Goater" <clg@kaod.org>
Cc: Daniel Henrique Barboza <danielhb413@gmail.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Greg Kurz <groug@kaod.org>
Cc: qemu-ppc@nongnu.org
Cc: qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org
Signed-off-by: Vitaly Cheptsov <cheptsov@ispras.ru>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220121093107.15478-1-cheptsov@ispras.ru>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
target/ppc/mmu_common.c