invala

Marcel Moolenaar marcel at xcllnt.net
Wed May 12 22:30:54 PDT 2004


On Wed, May 12, 2004 at 06:48:07PM -0700, Arun Sharma wrote:
> On 5/12/2004 4:28 PM, Marcel Moolenaar wrote:
> 
> >On Wed, May 12, 2004 at 03:09:38PM -0700, Arun Sharma wrote:
> >>
> >>I noticed that the code in exception.S:TRAP() doesn't invalidate the ALAT 
> >>on a register backing store switch. This could be a problem if the kernel 
> >>starts using data speculation (say by using a different compiler). 
> >>However, restorectx is doing the right thing by using invala.
> >
> >Why would this be a problem?
> 
> The kernel data speculation might introduce entries into the ALAT which 
> might cause the user data speculation to think that the speculation 
> (advanced load) succeeded, when in fact it has failed.

True. But doesn't a rfi instruction restore RSE.BOF, and thus preserve
the virtual to physical register mapping?
Note also that we have the EPC syscall path (sys/ia64/ia64/syscall.S),
where we also switch stacks, but we do not have the rfi on our way out.
This could mean that we actually do need an invala in that case. I do
not know under which conditions RSE.BOF is preserved...


-- 
 Marcel Moolenaar	  USPA: A-39004		 marcel at xcllnt.net


More information about the freebsd-ia64 mailing list