From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Riepe Subject: file-backed guest memory Date: Thu, 12 Apr 2007 17:34:25 +0200 Message-ID: <461E5181.6010504@mr511.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-devel Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Hi! This is just a (probably silly) idea I had the other day. Currently, the guest's memory is allocated inside the kernel and exported to userspace via mmap(). But wouldn't it also be possible to create a file in userspace and pass its descriptor to kvm? If we also pass file offset and length parameters for each memslot, all segments can (but need not) reside in the same file. There would be a persistent snapshot of the VM's physical memory, and it would enable the VM to page out the guest's pages. One could also do strange things like mapping a portion of the file several times, e.g. to emulate an architecture with incomplete address decoding. Applications that absolutely want to use anonymous memory could pass -1 as the fd, as they do with mmap(MAP_ANONYMOUS). Comments? -- Michael "Tired" Riepe X-Tired: Each morning I get up I die a little ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV