From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Avi Kivity <avi@qumranet.com>
Cc: Christian Ehrhardt <EHRHARDT@de.ibm.com>,
hollisb@us.ibm.com, arnd@arndb.de, carsteno@de.ibm.com,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Dave Hansen <haveblue@us.ibm.com>,
jeroney@us.ibm.com, borntrae@linux.vnet.ibm.com,
virtualization@lists.linux-foundation.org,
Linux Memory Management List <linux-mm@kvack.org>,
mschwid2@linux.vnet.ibm.com, heicars2@linux.vnet.ibm.com,
rvdheij@gmail.com, Olaf Schnapper <os@de.ibm.com>,
jblunck@suse.de, "Zhang, Xiantao" <xiantao.zhang@intel.com>,
kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-devel] [RFC/PATCH 01/15] preparation: provide hook to enable pgstes in user pagetable
Date: Sun, 23 Mar 2008 19:23:29 +0100 [thread overview]
Message-ID: <1206296609.10233.5.camel@localhost> (raw)
In-Reply-To: <47E62DBA.4050102@qumranet.com>
On Sun, 2008-03-23 at 12:15 +0200, Avi Kivity wrote:
> >> Can you convert the page tables at a later time without doing a
> >> wholesale replacement of the mm? It should be a bit easier to keep
> >> people off the pagetables than keep their grubby mitts off the mm
> >> itself.
> >>
> >
> > Yes, as far as I can see you're right. And whatever we do in arch code,
> > after all it's just a work around to avoid a new clone flag.
> > If something like clone() with CLONE_KVM would be useful for more
> > architectures than just s390 then maybe we should try to get a flag.
> >
> > Oh... there are just two unused clone flag bits left. Looks like the
> > namespace changes ate up a lot of them lately.
> >
> > Well, we could still play dirty tricks like setting a bit in current
> > via whatever mechanism which indicates child-wants-extended-page-tables
> > and then just fork and be happy.
> >
>
> How about taking mmap_sem for write and converting all page tables
> in-place? I'd rather avoid the need to fork() when creating a VM.
That was my initial approach as well. If all the page table allocations
can be fullfilled the code is not too complicated. To handle allocation
failures gets tricky. At this point I realized that dup_mmap already
does what we want to do. It walks all the page tables, allocates new
page tables and copies the ptes. In principle I would reinvent the wheel
if we can not use dup_mmap.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2008-03-23 18:23 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1206028710.6690.21.camel@cotte.boeblingen.de.ibm.com>
2008-03-20 16:24 ` [RFC/PATCH 01/15] preparation: provide hook to enable pgstes in user pagetable Carsten Otte
2008-03-20 16:24 ` [RFC/PATCH 02/15] preparation: host memory management changes for s390 kvm Carsten Otte
2008-03-20 16:24 ` [RFC/PATCH 03/15] preparation: address of the 64bit extint parm in lowcore Carsten Otte
2008-03-20 16:24 ` [RFC/PATCH 04/15] preparation: split sysinfo defintions for kvm use Carsten Otte
2008-03-20 16:24 ` [RFC/PATCH 05/15] kvm-s390: s390 arch backend for the kvm kernel module Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 06/15] kvm-s390: sie intercept handling Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 07/15] kvm-s390: interrupt subsystem, cpu timer, waitpsw Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 08/15] kvm-s390: intercepts for privileged instructions Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 09/15] kvm-s390: interprocessor communication via sigp Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 10/15] kvm-s390: intercepts for diagnose instructions Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 11/15] kvm-s390: add kvm to kconfig on s390 Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 12/15] kvm-s390: API documentation Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 13/15] kvm-s390: update maintainers Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 14/15] guest: detect when running on kvm Carsten Otte
2008-03-20 16:25 ` [RFC/PATCH 15/15] guest: virtio device support, and kvm hypercalls Carsten Otte
[not found] ` <1206030298.6690.56.camel@cotte.boeblingen.de.ibm.com>
2008-03-20 16:43 ` [RFC/PATCH 05/15] KVM_MAX_VCPUS Hollis Blanchard
[not found] ` <1206031383.6356.13.camel@basalt>
2008-03-20 16:48 ` Carsten Otte
[not found] ` <47E2954B.7090903@de.ibm.com>
2008-03-21 10:41 ` [kvm-devel] " Avi Kivity
2008-03-21 11:13 ` Carsten Otte
[not found] ` <1206030320.6690.63.camel@cotte.boeblingen.de.ibm.com>
2008-03-20 17:22 ` [RFC/PATCH 12/15] kvm-s390: API documentation Randy Dunlap
[not found] ` <20080320102200.3718e573.randy.dunlap@oracle.com>
2008-03-21 10:33 ` [kvm-devel] " Carsten Otte
[not found] ` <1206030278.6690.52.camel@cotte.boeblingen.de.ibm.com>
2008-03-20 17:28 ` [RFC/PATCH 01/15] preparation: provide hook to enable pgstes in user pagetable Jeremy Fitzhardinge
[not found] ` <47E29EC6.5050403@goop.org>
2008-03-20 19:13 ` Dave Hansen
[not found] ` <1206040405.8232.24.camel@nimitz.home.sr71.net>
2008-03-20 20:35 ` [kvm-devel] " Carsten Otte
[not found] ` <47E2CAAC.6020903@de.ibm.com>
2008-03-21 18:29 ` Dave Hansen
2008-03-21 19:03 ` Carsten Otte
2008-03-22 17:57 ` Heiko Carstens
[not found] ` <20080322175705.GD6367@osiris.boeblingen.de.ibm.com>
2008-03-23 10:15 ` Avi Kivity
[not found] ` <47E62DBA.4050102@qumranet.com>
2008-03-23 18:23 ` Martin Schwidefsky [this message]
2008-03-24 6:57 ` Avi Kivity
[not found] ` <47E750ED.7060509@qumranet.com>
2008-03-25 6:08 ` Carsten Otte
[not found] ` <47E896EA.5060309@de.ibm.com>
2008-03-25 6:12 ` Avi Kivity
2008-03-25 15:37 ` Carsten Otte
[not found] ` <1206030326.6690.65.camel@cotte.boeblingen.de.ibm.com>
2008-03-20 17:16 ` [RFC/PATCH 14/15] guest: detect when running on kvm Randy Dunlap
[not found] ` <20080320101602.f2737c94.randy.dunlap@oracle.com>
2008-03-20 17:27 ` Carsten Otte
2008-03-20 17:53 ` [kvm-devel] " Christoph Hellwig
[not found] ` <20080320175357.GA30959@infradead.org>
[not found] ` <47E2CAFF.3070203@de.ibm.com>
2008-03-20 19:41 ` Christoph Hellwig
[not found] ` <20080320194137.GA9975@infradead.org>
2008-03-20 20:59 ` Carsten Otte
[not found] ` <47E2D034.4090600@de.ibm.com>
2008-03-20 21:22 ` Heiko Carstens
[not found] ` <20080320212255.GA4225@osiris.boeblingen.de.ibm.com>
2008-03-21 11:12 ` Carsten Otte
[not found] ` <47E39804.4030605@de.ibm.com>
2008-03-21 14:06 ` Heiko Carstens
[not found] ` <20080321140603.GC4128@osiris.boeblingen.de.ibm.com>
2008-03-21 14:33 ` Carsten Otte
[not found] ` <1206110009.8363.3.camel@cotte.boeblingen.de.ibm.com>
2008-03-22 17:25 ` Heiko Carstens
2008-03-20 20:37 ` Carsten Otte
[not found] ` <1206030328.6690.66.camel@cotte.boeblingen.de.ibm.com>
2008-03-21 0:24 ` [RFC/PATCH 15/15] guest: virtio device support, and kvm hypercalls Rusty Russell
[not found] ` <200803211124.49829.rusty@rustcorp.com.au>
2008-03-21 7:12 ` [kvm-devel] " Carsten Otte
2008-03-21 8:15 ` Christian Borntraeger
[not found] ` <200803210915.48029.borntraeger@de.ibm.com>
2008-03-21 23:30 ` Rusty Russell
[not found] ` <200803221030.49457.rusty@rustcorp.com.au>
2008-03-22 7:36 ` Carsten Otte
2008-03-21 10:44 ` Avi Kivity
[not found] ` <1206030302.6690.57.camel@cotte.boeblingen.de.ibm.com>
2008-03-21 10:53 ` [kvm-devel] [RFC/PATCH 06/15] kvm-s390: sie intercept handling Avi Kivity
2008-03-21 11:26 ` Carsten Otte
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=1206296609.10233.5.camel@localhost \
--to=schwidefsky@de.ibm.com \
--cc=EHRHARDT@de.ibm.com \
--cc=arnd@arndb.de \
--cc=avi@qumranet.com \
--cc=borntrae@linux.vnet.ibm.com \
--cc=carsteno@de.ibm.com \
--cc=haveblue@us.ibm.com \
--cc=heicars2@linux.vnet.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=hollisb@us.ibm.com \
--cc=jblunck@suse.de \
--cc=jeroney@us.ibm.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-mm@kvack.org \
--cc=mschwid2@linux.vnet.ibm.com \
--cc=os@de.ibm.com \
--cc=rvdheij@gmail.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=xiantao.zhang@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).