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

To: Matthew Chapman <matthewc@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH] Strange problem with virtual aliases
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 30 Nov 2006 14:48:40 +0900
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 29 Nov 2006 21:48:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20061130041757.GA10895@xxxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <51CFAB8CB6883745AE7B93B3E084EBE207DD76@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20061130031156.GA8887@xxxxxxxxxxxxxxx> <20061130041757.GA10895@xxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
Hi Matthew.

On Thu, Nov 30, 2006 at 03:17:57PM +1100, Matthew Chapman wrote:
> I found the problem...
> 
> The real VHPT insertion is done based on the machine PTE returned from
> translate_domain_pte, which does the appropriate offset calculations.
> 
> However, the insertion into the one-entry TLB uses the original PTE, but
> the page size has been reset to PAGE_SIZE [1].  Thus the entry in the
> one-entry TLB incorrectly maps the PAGE_SIZE sub-page which was faulted
> on to the PAGE_SIZE sub-page at the bottom of the superpage.

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.


> 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.

-- 
yamahata

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