Port-xen archive

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

Re: Xen 3.3: Problem HVM guest



hello,
sorry for the delay, I was offline for the last 3 days

On Thu, Aug 14, 2008 at 11:39:23PM +0200, Christoph Egger wrote:
> I found the bug:
> 
> >>>>> - instrument privpgop_fault() to see if it gets called at all for
> >>>>>   this mapping, and if it's doing the right thing.
> >>>>>   There should be only one page in this object, and the machine
> >>>>>   address should be 0 (pobj->maddr[maddr_i])
> >>>>>
> >>>> Yes, privpgop_fault() is called. It looks like it's called in a
> >>>> loop. npages = 1 and machine address is 0.
> >>>>
> >>> OK, it has the right data. I guess it's called in a loop because
> >>> writing at the page keeps failing.
> >>>
> 
> Writing at the page keeps failing because privpgop_fault()
> does not handle this case:
> 
>          if (pobj->maddr[maddr_i] == 0)
>               continue; /* this has already been flagged as error */
> 
> Removing this makes privpgop_fault() calling pmap_enter_ma()
> and that makes the write access finally succeed and the HVM guest
> starts.
> 
> May I commit this change?

There's a problem with this: IOCTL_PRIVCMD_MMAPBATCH use 0 as an invalid
address, so this test is usefull. The test should be restored, but
with a different magic value. As this is a physical addresss and
is should be page-aligned, maybe we could use 0xfff as the magic value ?

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index