Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xensource: FreeBSD mappings guest heuristics



On Mon, Oct 06, 2008 at 12:15:57PM +0200, Christoph Egger wrote:
> > For i386 and i386PAE, we use the same values as FreeBSD, no changes needed.
> > For x86_64, we use different values for linear mappings,
> > and don't have a direct map. So we'd need something like that, I guess:
> >
> > +             /* NetBSD 64bit: linear map 0x7F8000000000 */
> > +             switch ( level )
> > +             {
> > +             case 1: GUESS(0x7F8000000000UL
> > +                           + ((fault_addr & VADDR_MASK) >> 9), 6); break;
> > +             case 2: GUESS(0x7FBFC0000000UL
> > +                           + ((fault_addr & VADDR_MASK) >> 18), 6); break;
> > +             case 3: GUESS(0x7FBFDFE00000UL
> > +                           + ((fault_addr & VADDR_MASK) >> 27), 6); break;
> > +             }
> 
> How would you test this ?

I'm not sure. How did it get tested for FreeBSD ?
Maybe a printk in Xen would be enough to check that we go though this case ...

-- 
Manuel Bouyer, LIP6, Universite Paris VI.           
Manuel.Bouyer%lip6.fr@localhost
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index