From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org
Cc: kvm-devel
<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
Shaohua Li <shaoh.li-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [RFC]kvm: swapout guest page
Date: Mon, 21 May 2007 17:35:43 +0300 [thread overview]
Message-ID: <4651AE3F.8060603@qumranet.com> (raw)
In-Reply-To: <4651A7A4.9040702-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
Carsten Otte wrote:
>
>> An example: suppose host pfn 7 is allocated as guest pfn 8 (and
>> therefore, userspace address 0x8000). Suppose further the guest maps
>> guest pfn 8 to guest virtual 0x10000 and guest virtal 0x11000.
>> Aren't there three tlbs you need to shoot down? host virtual
>> 0x8000->pfn 7 and guest virual 0x10000->pfn 7 and 0x11000->pfn 7?
> So far, we have a 1:1 mapping between guest physical and host
> userspace. A userspace pointer equals a guest real pointer.
> Our hardware control block for vcpu also allows to set an offset
> "guest physical + offset = host user". The CPU knows about this offset
> when doing page translations, and this is also transparent with regard
> to tlb entries.
> Now if the guest itself enables dynamic address translation, the tlb
> entry can cache information about both page translation steps. This
> process is transparent for both guest and host operating system. If
> the host flushes this tlb entry, the information about the guest
> internal translation is also removed.
Interesting. And if you have multiple guest virtual to guest physical
translations, the hardware knows to flush them when the host virtual to
host physical entry is flushed?
[I neglected to mention npt/ept. For that, you can't keep an rmap, so
you need to flush the entire guest tlb on a swapout. You might avoid it
if the hardware updates the page accessed bit in the tlb (I think AMD
does, not sure about Intel).]
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
next prev parent reply other threads:[~2007-05-21 14:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-21 8:12 [RFC]kvm: swapout guest page Shaohua Li
[not found] ` <288dbef70705210112t710bc904pe546840f7b9cfcfa-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-05-21 8:43 ` Dor Laor
2007-05-21 9:17 ` Carsten Otte
[not found] ` <46516392.6070402-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-05-21 9:20 ` Avi Kivity
[not found] ` <46516466.9030904-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-21 12:38 ` Carsten Otte
[not found] ` <465192DE.3000902-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-05-21 13:31 ` Avi Kivity
[not found] ` <46519F32.7020808-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-21 14:07 ` Carsten Otte
[not found] ` <4651A7A4.9040702-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-05-21 14:35 ` Avi Kivity [this message]
[not found] ` <4651AE3F.8060603-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-21 14:41 ` Carsten Otte
[not found] ` <4651AFA6.2060605-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-05-21 14:43 ` Avi Kivity
[not found] ` <4651AFF7.2080107-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-22 15:10 ` Carsten Otte
2007-05-21 11:51 ` Christoph Hellwig
2007-05-21 9:17 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4651AE3F.8060603@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=shaoh.li-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox