On Mon, Mar 30, 2015 at 11:41 AM, Ian Campbell <ian.campb...@citrix.com> wrote:
> On Fri, 2015-03-27 at 22:18 +0000, Tamas K Lengyel wrote: > > > > > > union hsr hsr) > > > { > > > - register_t addr = READ_SYSREG(FAR_EL2); > > > - inject_iabt_exception(regs, addr, hsr.len); > > > + struct hsr_iabt iabt = hsr.iabt; > > > + int rc; > > > + paddr_t gpa; > > > + register_t gva = READ_SYSREG(FAR_EL2); > > > + > > > + if ( iabt.s1ptw ) > > > + gpa = READ_SYSREG(HPFAR_EL2); > > > + else > > > > > > Can you not avoid the else case entirely by extending the if to > cover > > the other cases where HPFAR is explicitly valid? I can't be > bothered to > > go look right now but IIRC it included at least stage 2 access > > permissions related failures, which would cover more xenaccess > > scenarios, no? > > > > > > Depending on the fault cause, we might. For permission faults, HPFAR > > is only valid during s1ptw.. Given that the only check we do is for > > permission faults and that's the only thing that cares about the API > > anyway, we can put this entire block into the switch itself once the > > fault check is already determined to be a permission fault. > > According to ARMv8 ARM HPFAR is valid for any of these: > * A Translation or Access Flag fault on a stage 2 translation. > * A stage 2 Address Size fault. > * A fault on the stage 2 translation of an address accessed in a > stage 1 translation table walk. > > I think what you are (correctly) saying is that it omits "a permission > fault on a stage 2 translation", which is one of the cases which can > occur under xenaccess. Which is shame :-( > > Ian. > Hm, what I recall is that it is valid for permission faults as well, but only and exclusively during s1ptw. Tamas
_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel