Re: file-backed guest memory

Christian Borntraeger
2007-04-13T06:57:14Z

On Thursday 12 April 2007 17:38, Avi Kivity wrote:
> > But wouldn't it also be possible to create a file in
> > userspace and pass its descriptor to kvm?
[...]
> swap, hugetlbfs, and maybe other nifty stuff. I think I know how to do
> this for the current mmu, but I'm worried that it will have a
> performance impact with the nested page tables mmu.

Another thing to consider is the commit "mm: tracking shared dirty pages"
(d08b3851da41d0ee60851f2c75b118e1f7a5fc89). We need a shared mapping to
actually have guest memory written back to the file.
The dirty page tracking change will cause the host kernel to write protect
guest memory pages after writeback. This will often trigger guest exits due
to host protection faults. If we want to have file backed guest memory we
really should modify the VMA to be not eligible for dirty page tracking.

Christian