public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Swapping out kvm pages
@ 2007-04-11 13:34 Chen Haogang
       [not found] ` <c4ebe0280704110634h19ddc60egbff264b8e3dbc503-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Chen Haogang @ 2007-04-11 13:34 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f


[-- Attachment #1.1: Type: text/plain, Size: 1159 bytes --]

In kvm's TODO page, I saw the item "attach kvm memory to a Linux
address_space so that guest memory can be paged out". But I don't think it
is as simple as this. Because both host part page fault and guest part page
fault interact.

As I know, the creation of guest's shadow PTEs don't go through host's PTEs.
When a shadow PTE is to be created, it always assumes the page pointer
stored in memory region is vaild, and use the page struct to calcuate host
physical address.

So, if we want to implement a swap mechanism. It is important to mark the
page struct pointer as invalid when host frame is swapped out. And replace
the page pointer with the new one when a frame is swapped in.

Moreover, we should not swapped out pages that are currently mapped by
shadow PTEs unless we got a way to invalidate them. On the guest part, when
a shadow PTE is to be created, we should make sure the page pointer in
memory regeion is vaild (i.e. the page is not swapped out), if not, we
should ask to host to bring in the page before guest can resume.

I want to know if I misunderstood anything, and wonder if there's any easier
way to implement guest pages' swapping?

[-- Attachment #1.2: Type: text/html, Size: 1255 bytes --]

[-- Attachment #2: Type: text/plain, Size: 345 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #3: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-04-15 17:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-11 13:34 Swapping out kvm pages Chen Haogang
     [not found] ` <c4ebe0280704110634h19ddc60egbff264b8e3dbc503-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-04-11 14:41   ` Avi Kivity
2007-04-15  6:00   ` Chen Haogang
     [not found]     ` <c4ebe0280704142300x379fb7b8u2a8df7101292b414-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-04-15 17:13       ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox