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] RE: vcpu_translate issue

To: "Matt Chapman" <matthewc@xxxxxxxxxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Subject: RE: [Xen-ia64-devel] RE: vcpu_translate issue
From: "Magenheimer, Dan (HP Labs Fort Collins)" <dan.magenheimer@xxxxxx>
Date: Fri, 11 Nov 2005 10:54:12 -0800
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 11 Nov 2005 18:54:07 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcXmhY0FrGhj7Q+DTECg3NXLHKUK3gAUU5uwAAaIwrA=
Thread-topic: [Xen-ia64-devel] RE: vcpu_translate issue
OK, I've checked in a fix incorporating Matt's discovery
and the vcpu_translate region 0 handling code I had earlier
backed out.  ltp-mmap09 now works properly.  Matt can you
confirm that your dom0 boot problem is also fixed?

Thanks,
Dan

> -----Original Message-----
> From: Magenheimer, Dan (HP Labs Fort Collins) 
> Sent: Friday, November 11, 2005 8:48 AM
> To: 'Matt Chapman'; Tian, Kevin
> Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
> Subject: RE: [Xen-ia64-devel] RE: vcpu_translate issue
> 
> Good catch!  I'm guessing the solution will be for
> vcpu_itc (and fast_itc, though it is turned off
> by default) to handle this case by using the
> correct (rr0) rid when in metaphysical mode.
> 
> Dan
> 
> > -----Original Message-----
> > From: Matt Chapman [mailto:matthewc@xxxxxxxxxxxxxxx] 
> > Sent: Thursday, November 10, 2005 11:02 PM
> > To: Tian, Kevin
> > Cc: Magenheimer, Dan (HP Labs Fort Collins); 
> > xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
> > Subject: Re: [Xen-ia64-devel] RE: vcpu_translate issue
> > 
> > On Thu, Nov 10, 2005 at 05:02:52PM +0800, Tian, Kevin wrote:
> > > 
> > > >I think delivering a TLB miss is not sufficient.  Because the
> > > >mapping for the zero page is indeed in Linux's pagetable, the TLB
> > > >miss handler succeeds in finding and inserting it, and the page
> > > >fault handler is not triggered.
> > > 
> > > Actually that depends. Only when short format vhpt entry 
> > exists in TLB
> > > which contains that mapping for zero page, low level TLB 
> > miss handler
> > > can hit it. Or else the flow still goes to C code page 
> > fault handler,
> > > right? 
> > 
> > Yes, the C page fault handler is invoked if it's not in the 
> pagetable.
> > But as far as Linux is concerned, there is a valid read-only VMA at
> > address 0, so the C page fault handler won't raise a fault 
> on read, it
> > will simply insert a read-only mapping in the page table.
> > 
> > So, a write to the zero page will result in an access fault and
> > termination of the process.  A read from the zero page will succeed
> > (incorrectly).  But that doesn't explain why it now hangs there.
> > 
> > The more important problem seems to be that itc inserts 
> into the wrong
> > region when we're metaphysical, so the execution flow is like this:
> > 
> > 1. [rr0=X] guest accesses address 0 -> fault
> > 2. [rr0=X] Xen accesses VHPT at 0x1fffff000000000 -> deliver 
> > IA64_VHPT_FAULT
> > 3. guest switches to metaphysical to walk pagetable
> > 4. [rr0=mprid] guest inserts translation for 0 and 
> 0x1fffff0000000000
> > 5. guest returns to virtual mode (rfi)
> > 6. [rr0=X] goto 1
> > 
> > Matt
> > 
> > 
> 

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

<Prev in Thread] Current Thread [Next in Thread>