target/arm: Fix ISSIs16Bit
v2 cover target/arm: Fix ISSIs16Bit
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(-)
Signature · 1 line
2.20.1
PATCH v2 1/2 target/arm: Return correct IL bit in merge_syn_data_abort
From: Jeff Kubascik <[email protected]>
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.
--- target/arm/tlb_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/arm/tlb_helper.c +1 -1
@@ -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; }
Signature · 1 line
2.20.1
PATCH v2 2/2 target/arm: Set ISSIs16Bit in make_issinfo
In reply to Richard HendersonDuring the conversion to decodetree, the setting of ISSIs16Bit got lost. This causes the guest os to incorrectly adjust trapping memory operations.
--- target/arm/translate.c | 3 +++ 1 file changed, 3 insertions(+)
target/arm/translate.c +3 -0
@@ -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; }
Signature · 1 line
2.20.1
Peter Maydell
AppliedQuoted 7 lines · Richard Henderson
Changes in v2:
- Include themerge_syn_data_abortfix, 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