> -----Original Message----- > From: Richard Henderson <richard.hender...@linaro.org> > Sent: Thursday, January 26, 2023 3:48 PM > To: Sid Manning <sidn...@quicinc.com>; qemu-devel@nongnu.org > Cc: phi...@linaro.org; Mark Burton <mbur...@qti.qualcomm.com>; Alex > Bennée <alex.ben...@linaro.org> > Subject: Re: ARM: ptw.c:S1_ptw_translate > > WARNING: This email originated from outside of Qualcomm. Please be wary > of any links or attachments, and do not enable macros. > > Please try the following. It's essentially the same bug I had for mte. > I've just realized that the testing I did under Linux with virtualization=on > was > insufficient -- this path won't be exercised without KVM under TCG. > > > diff --git a/target/arm/ptw.c b/target/arm/ptw.c index > 57f3615a66..2b125fff44 100644 > --- a/target/arm/ptw.c > +++ b/target/arm/ptw.c > @@ -266,7 +266,7 @@ static bool S1_ptw_translate(CPUARMState *env, > S1Translate *ptw, > if (unlikely(flags & TLB_INVALID_MASK)) { > goto fail; > } > - ptw->out_phys = full->phys_addr; > + ptw->out_phys = full->phys_addr | (addr & ~TARGET_PAGE_MASK); > ptw->out_rw = full->prot & PAGE_WRITE; > pte_attrs = full->pte_attrs; > pte_secure = full->attrs.secure; > This change works! Thank you for taking the time to look into it.
> > > r~