WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel] [PATCH] Strange problem with virtual aliases

On Thu, Nov 30, 2006 at 02:48:40PM +0900, Isaku Yamahata wrote:
>
> one-entry TLB is shrinked to PAGE_SIZE around virtual address.
> not the bottom of the superpage.
> So shrinking page size to PAGE_SIZE doesn't affect correctness.

Unfortunately, that is not what the code actually does... it does not
update the ppn to point to the same PAGE_SIZE part of the big page as
the ifa is pointing to.

> > I think it makes most sense to simply use the original itir when
> > inserting into the single-entry TLB, as per attached patch.  I've moved
> > the vcpu_set_tr_entry calls up a level into vcpu_itc_d and vcpu_itc_i;
> > the third caller previously used the 4 flag to specify "don't do that".
> 
> vcpu_set_tr_entry() must be before p2m_entry_retry() check.
> Otherwise one-entry TLB might have a stale entry which was purged
> by other vcpu.

Hmm, I'm not sure.

The one-entry TLB contains the *untranslated* PTE supplied to itc, so it
doesn't depend on the p2m mapping... it doesn't seem to depend on
anything that could change in the retry loop, which is why I put it
outside.  Of course I may have misunderstood the purpose of
p2m_entry_retry().

In terms of ordering with respect to ptc.g on another vcpu...  as far as
the guest is concerned, it is executing itc on the this vcpu, and ptc.g
on another.  It can't know what the relative ordering of those two
operations will be, so there may be a "stale entry" inserted by the itc.
(Which is why Linux necessarily rechecks and purges after.)

Matt


_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel