Port-xen archive

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

Re: [PATCH v2] port/xen: map memory directly in privcmd PRIVCMD_MMAPBATCH



On Mon, Jun 25, 2012 at 7:16 PM, Manuel Bouyer 
<bouyer%antioche.eu.org@localhost> wrote:
> On Mon, Jun 25, 2012 at 06:35:15PM +0100, Roger Pau Monne wrote:
>> Cherry G.Mathew wrote:
>> >Hi Roger,
>> >
>> >
>> >
>> >     Roger>  Instead of mapping memory when a pagefault happens in the
>> >     Roger>  memory region, map the memory directly on the pivcmd call (as
>> >     Roger>  Linux does).  This fixes the problem with Qemu upstream, that
>> >     Roger>  changes the location of the pfns after calling
>> >     Roger>  xc_map_foreign_bulk.
>> >
>> >I'm not sure why exactly this change is needed, could you explain it
>> >again ? Why is it not ok for the backing mfns to be lazy mapped in ?
>>
>> I've tried explaining the problem here:
>>
>> http://mail-index.netbsd.org/port-xen/2012/06/15/msg007293.html
>>
>> Hopefully it's a good starting point.
>
> In this mail, are 0x3f800 and 0xf0000 virtual, physical or machine addresses ?

This are physical address of the guest we are creating.

>>
>> >I see that you use pmap_enter() directly to map the MAs. This means that
>> >uvm(9) doesn't know about the mapping, and if the qemu process were to
>> >be swapped out of memory, the mapping would not be restored on a
>> >subsequent swap in. Is this okay ?
>>
>> Linux maps those pages as VM_RESERVED which prevents them from being
>> swapped out, should we do the same (PMAP_WIRED)?
>
> Probably, yes.
>
> --
> Manuel Bouyer <bouyer%antioche.eu.org@localhost>
>     NetBSD: 26 ans d'experience feront toujours la difference
> --


Home | Main Index | Thread Index | Old Index