* [PATCH v2 0/2] target/arm: Fix ISSIs16Bit
@ 2020-01-17 0:46 Richard Henderson
2020-01-17 0:46 ` [PATCH v2 1/2] target/arm: Return correct IL bit in merge_syn_data_abort Richard Henderson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Richard Henderson @ 2020-01-17 0:46 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, alex.bennee, jeff.kubascik
Changes in v2:
- Include the merge_syn_data_abort fix, as a self-contained patch.
r~
Jeff Kubascik (1):
target/arm: Return correct IL bit in merge_syn_data_abort
Richard Henderson (1):
target/arm: Set ISSIs16Bit in make_issinfo
target/arm/tlb_helper.c | 2 +-
target/arm/translate.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] target/arm: Return correct IL bit in merge_syn_data_abort
2020-01-17 0:46 [PATCH v2 0/2] target/arm: Fix ISSIs16Bit Richard Henderson
@ 2020-01-17 0:46 ` Richard Henderson
2020-01-17 0:46 ` [PATCH v2 2/2] target/arm: Set ISSIs16Bit in make_issinfo Richard Henderson
2020-01-17 12:06 ` [PATCH v2 0/2] target/arm: Fix ISSIs16Bit Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2020-01-17 0:46 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, alex.bennee, qemu-stable, jeff.kubascik
From: Jeff Kubascik <jeff.kubascik@dornerworks.com>
The IL bit is set for 32-bit instructions, thus passing false
with the is_16bit parameter to syn_data_abort_with_iss() makes
a syn mask that always has the IL bit set.
Pass is_16bit as true to make the initial syn mask have IL=0,
so that the final IL value comes from or'ing template_syn.
Cc: qemu-stable@nongnu.org
Fixes: aaa1f954d4ca ("target-arm: A64: Create Instruction Syndromes for Data Aborts")
Signed-off-by: Jeff Kubascik <jeff.kubascik@dornerworks.com>
[rth: Extracted this as a self-contained bug fix from a larger patch]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/tlb_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/arm/tlb_helper.c b/target/arm/tlb_helper.c
index 5feb312941..e63f8bda29 100644
--- a/target/arm/tlb_helper.c
+++ b/target/arm/tlb_helper.c
@@ -44,7 +44,7 @@ static inline uint32_t merge_syn_data_abort(uint32_t template_syn,
syn = syn_data_abort_with_iss(same_el,
0, 0, 0, 0, 0,
ea, 0, s1ptw, is_write, fsc,
- false);
+ true);
/* Merge the runtime syndrome with the template syndrome. */
syn |= template_syn;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] target/arm: Set ISSIs16Bit in make_issinfo
2020-01-17 0:46 [PATCH v2 0/2] target/arm: Fix ISSIs16Bit Richard Henderson
2020-01-17 0:46 ` [PATCH v2 1/2] target/arm: Return correct IL bit in merge_syn_data_abort Richard Henderson
@ 2020-01-17 0:46 ` Richard Henderson
2020-01-17 12:06 ` [PATCH v2 0/2] target/arm: Fix ISSIs16Bit Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2020-01-17 0:46 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, alex.bennee, qemu-stable, jeff.kubascik
During the conversion to decodetree, the setting of
ISSIs16Bit got lost. This causes the guest os to
incorrectly adjust trapping memory operations.
Cc: qemu-stable@nongnu.org
Fixes: 46beb58efbb8a2a32 ("target/arm: Convert T16, load (literal)")
Reported-by: Jeff Kubascik <jeff.kubascik@dornerworks.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/translate.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 5185e08641..c25921ef95 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -8556,6 +8556,9 @@ static ISSInfo make_issinfo(DisasContext *s, int rd, bool p, bool w)
/* ISS not valid if writeback */
if (p && !w) {
ret = rd;
+ if (s->base.pc_next - s->pc_curr == 2) {
+ ret |= ISSIs16Bit;
+ }
} else {
ret = ISSInvalid;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] target/arm: Fix ISSIs16Bit
2020-01-17 0:46 [PATCH v2 0/2] target/arm: Fix ISSIs16Bit Richard Henderson
2020-01-17 0:46 ` [PATCH v2 1/2] target/arm: Return correct IL bit in merge_syn_data_abort Richard Henderson
2020-01-17 0:46 ` [PATCH v2 2/2] target/arm: Set ISSIs16Bit in make_issinfo Richard Henderson
@ 2020-01-17 12:06 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2020-01-17 12:06 UTC (permalink / raw)
To: Richard Henderson; +Cc: Alex Bennée, QEMU Developers, Jeff Kubascik
On Fri, 17 Jan 2020 at 00:46, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Changes in v2:
> - Include the merge_syn_data_abort fix, as a self-contained patch.
>
>
> r~
>
Applied to target-arm.next, thanks. (I didn't cc stable
since it turns out this has been a bug since forever rather
than a new regression introduced by the decodetree conversion.)
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-17 12:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-17 0:46 [PATCH v2 0/2] target/arm: Fix ISSIs16Bit Richard Henderson
2020-01-17 0:46 ` [PATCH v2 1/2] target/arm: Return correct IL bit in merge_syn_data_abort Richard Henderson
2020-01-17 0:46 ` [PATCH v2 2/2] target/arm: Set ISSIs16Bit in make_issinfo Richard Henderson
2020-01-17 12:06 ` [PATCH v2 0/2] target/arm: Fix ISSIs16Bit Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).