Re: [RFC/PATCH LGUEST X86_64 00/13] Lguest for the x86_64

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

 



Rusty Russell wrote:
>> To prevent a guest from stealing all the hosts memory pages, we can
>> use these hashes to also limit the number of puds, pmds, and ptes.
>>
>> If the page is not pinned (currently used), we can set up LRU lists,
>> and find those pages that are somewhat stale, and free them.  This
>> can be done safely since we have all the info we need to put them
>> back if the guest needs them again.
>>     
>
> This is the same issue with 32-bit (one main reason why it's root-only).
> In my case it's not too hard to add a shrinker (it would drop PTE pages
> out of the pagetable of any non-running guest, just needs locking), but
> we also want to avoid pinning in guest (ie. userspace) pages: for this I
> think we really want a per-mm callback when the swapper wants to kick
> something out.
>
> I imagine kvm will have the same or similar issues (they restrict their
> pagetables to 256 pages per guest, which is simultanously too many and
> too few IMHO).
>   

We have similar issues, but they are easily fixed since at most four 
pages are pinned per vcpu (sixteen with Ingo's cr3 cache).  A per-mm 
swapper callback sounds great, especially when thinking about swapping 
regular guest pages, and even more in the context of nested page tables.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxx
https://lists.osdl.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux