From: Avi Kivity <avi@qumranet.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: kvm-devel@lists.sourceforge.net, linux-mm@kvack.org,
Daniel J Blueman <daniel.blueman@quadrics.com>,
Andrea Arcangeli <andrea@qumranet.com>
Subject: Re: [kvm-devel] mmu notifiers
Date: Tue, 15 Jan 2008 19:53:19 +0200 [thread overview]
Message-ID: <478CF30F.1010100@qumranet.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0801150938260.9893@schroedinger.engr.sgi.com>
Christoph Lameter wrote:
> On Tue, 15 Jan 2008, Avi Kivity wrote:
>
>
>>> Duh. Impossible. Two instances of Linux cannot share page structs. So how
>>> are you doing this? Or is this just an idea?
>>>
>> I was describing one Linux host running two guest instances. The page structs
>> are in the host, so they are shared by mmap().
>>
>
> Ahh.. Okay I was talking about a guest exporting its memory to another
> guest.
>
That's not very different, if they are on the same host?
>
>
>> kvm userspace is just an ordinary host process, it can mmap() any file it
>> likes and then assign that virtual memory range to the guest (as guest
>> physical memory).
>>
>
> But then the guest does not have its own page struct to manage the memory.
>
>
Why not? It's just a block of memory as far as the guest is concerned.
It's entirely up to it whether to create page structs or not.
Example:
qemu 1:
p = mmap("/dev/shm/blah", size, ... );
ioctl(vm_fd, KVM_CREATE_MEMORY_REGION_USER, { p, size, 0x10000000,
... });
qemu 2:
p = mmap("/dev/shm/blah", size, ... );
ioctl(vm_fd, KVM_CREATE_MEMORY_REGION_USER, { p, size, 0x10000000,
... });
Physical address 0x10000000, of both guests, would map to the same page.
Of course, ordinary Linux kernels can't do much with memory that is
shared with another guest.
I've a feeling we need a whiteboard.
--
error compiling committee.c: too many arguments to function
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-01-15 17:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-09 18:19 Andrea Arcangeli
2008-01-09 21:54 ` Christoph Lameter
2008-01-10 11:44 ` [kvm-devel] " Avi Kivity
2008-01-10 13:16 ` Robin Holt
2008-01-10 13:27 ` Avi Kivity
2008-01-10 14:50 ` Robin Holt
2008-01-10 19:06 ` Christoph Lameter
2008-01-12 19:56 ` Avi Kivity
2008-01-10 19:04 ` Christoph Lameter
2008-01-12 19:51 ` Avi Kivity
2008-01-13 12:09 ` Robin Holt
2008-01-13 12:28 ` Avi Kivity
2008-01-14 19:51 ` Christoph Lameter
2008-01-15 7:43 ` Avi Kivity
2008-01-14 19:49 ` Christoph Lameter
2008-01-15 7:38 ` Avi Kivity
2008-01-15 17:39 ` Christoph Lameter
2008-01-15 17:53 ` Avi Kivity [this message]
2008-01-15 17:57 ` Christoph Lameter
2008-01-15 18:06 ` Avi Kivity
2008-01-15 18:16 ` Christoph Lameter
2008-01-16 7:39 ` Avi Kivity
2008-01-16 18:08 ` Christoph Lameter
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=478CF30F.1010100@qumranet.com \
--to=avi@qumranet.com \
--cc=andrea@qumranet.com \
--cc=clameter@sgi.com \
--cc=daniel.blueman@quadrics.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-mm@kvack.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