Port-xen archive

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

Re: xensource: FreeBSD mappings guest heuristics



On Monday 06 October 2008 12:49:54 Manuel Bouyer wrote:
> 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
> ...

I asked back and got this answer:

---------------------------------------------------------------------------------------
Well, the quick way is to compile Xen with performance counters, and see 
that bruteforce removals of writable mappings get mostly zeroed when 
running the selected guest OS, with your patch.
---------------------------------------------------------------------------------------

Christoph


Home | Main Index | Thread Index | Old Index