From: Derek Murray <Derek.Murray@cl.cam.ac.uk>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Eduardo Habkost <ehabkost@redhat.com>,
Juan Quintela <quintela@redhat.com>,
"Stephen C. Tweedie" <sct@redhat.com>,
Jan Beulich <jbeulich@novell.com>,
Glauber de Oliveira Costa <gcosta@redhat.com>,
Chris Wright <chrisw@sous-sol.org>,
"virtualization@lists.osdl.org" <virtualization@lists.osdl.org>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: Re: Next steps with pv_ops for Xen
Date: Wed, 05 Dec 2007 18:15:49 +0000 [thread overview]
Message-ID: <4756EAD5.9050407@cl.cam.ac.uk> (raw)
In-Reply-To: <C37C979D.19732%Keir.Fraser@cl.cam.ac.uk>
[-- Attachment #1: Type: text/plain, Size: 526 bytes --]
Keir Fraser wrote:
> Yes, this would work okay I suspect. Good enough as a stop-gap measure? Are
> there any other responsibilities that you acquire if you make use of
> VM_FOREIGN (in particular, how would this affect get_user_pages)?
VM_FOREIGN is already set for the gntdev VMA (mostly because it's
directly based on the blktap code). That means that it has the array of
page_structs in its vm_private_data, which can be used to fulfill a
get_user_pages call. I've attached a patch based on this fix.
Regards,
Derek.
[-- Attachment #2: gntdev_vm_foreign.patch --]
[-- Type: text/x-patch, Size: 714 bytes --]
# HG changeset patch
# User dgm36@ise.cl.cam.ac.uk
# Date 1196878124 0
# Node ID df7d0555ec3847bd5915063d8ee79123d6ebc67a
# Parent ba918cb2cf7520604dee724dd80dad5ce4bee8a1
Changed vm_normal_page to return NULL when presented with a VMA marked
as being VM_FOREIGN.
Signed-off-by: Derek Murray <Derek.Murray@cl.cam.ac.uk>
diff -r ba918cb2cf75 -r df7d0555ec38 mm/memory.c
--- a/mm/memory.c Tue Dec 04 11:54:22 2007 +0000
+++ b/mm/memory.c Wed Dec 05 18:08:44 2007 +0000
@@ -395,6 +395,9 @@ struct page *vm_normal_page(struct vm_ar
if (!is_cow_mapping(vma->vm_flags))
return NULL;
}
+
+ if (unlikely(vma->vm_flags & VM_FOREIGN))
+ return NULL;
/*
* Add some anal sanity checks for now. Eventually,
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2007-12-05 18:15 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-21 22:05 Next steps with pv_ops for Xen Stephen C. Tweedie
2007-11-21 23:12 ` Jeremy Fitzhardinge
2007-11-26 14:02 ` Juan Quintela
2007-11-26 18:52 ` Jeremy Fitzhardinge
2007-11-27 8:30 ` Jan Beulich
2007-11-27 17:00 ` Jeremy Fitzhardinge
2007-11-27 17:14 ` Jan Beulich
2007-11-27 17:15 ` Stephen C. Tweedie
2007-12-03 12:54 ` Gerd Hoffmann
2007-12-03 13:19 ` Derek Murray
2007-12-03 14:16 ` Gerd Hoffmann
2007-12-03 14:51 ` Derek Murray
2007-12-03 17:18 ` Mark Williamson
2007-12-03 18:36 ` D.G. Murray
2007-12-03 19:08 ` Mark Williamson
2007-12-04 9:35 ` tgh
2007-12-05 3:42 ` Mark Williamson
2007-12-06 15:21 ` Gerd Hoffmann
2007-12-06 15:32 ` Derek Murray
2007-12-06 15:55 ` Gerd Hoffmann
2007-12-21 12:58 ` Gerd Hoffmann
2007-12-21 12:58 ` [Xen-devel] " Gerd Hoffmann
2007-12-03 20:38 ` Gerd Hoffmann
2007-12-04 9:40 ` Derek Murray
2007-12-04 12:01 ` Gerd Hoffmann
2007-12-04 12:39 ` Stephen C. Tweedie
2007-12-04 19:58 ` Gerd Hoffmann
2007-12-05 11:48 ` [Xen-devel] " Derek Murray
2007-12-05 11:48 ` Derek Murray
2007-12-05 14:12 ` Gerd Hoffmann
2007-12-05 14:22 ` Keir Fraser
2007-12-05 14:30 ` Derek Murray
2007-12-05 16:58 ` Keir Fraser
2007-12-05 17:17 ` Derek Murray
2007-12-05 17:22 ` Keir Fraser
2007-12-05 17:48 ` Derek Murray
2007-12-05 17:59 ` Keir Fraser
2007-12-05 18:15 ` Derek Murray [this message]
2007-12-12 8:27 ` Isaku Yamahata
2007-12-12 8:39 ` Keir Fraser
2007-12-12 8:44 ` Isaku Yamahata
2007-12-05 20:06 ` Gerd Hoffmann
2007-12-05 18:12 ` Jeremy Fitzhardinge
2007-12-05 18:29 ` Derek Murray
2007-12-05 20:15 ` Jeremy Fitzhardinge
2007-12-05 20:35 ` Geoffrey Lefebvre
2007-12-06 10:15 ` Gerd Hoffmann
2007-12-05 20:44 ` Keir Fraser
2007-12-06 10:00 ` Derek Murray
2007-12-06 19:55 ` [Xen-devel] " Jeremy Fitzhardinge
2007-12-05 13:19 ` Derek Murray
2007-12-04 21:08 ` Ian Main
2007-12-05 10:03 ` Gerd Hoffmann
2007-12-05 12:51 ` Gerd Hoffmann
2007-12-05 10:11 ` Derek Murray
2007-12-04 20:59 ` Ian Main
2007-12-05 11:54 ` Derek Murray
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=4756EAD5.9050407@cl.cam.ac.uk \
--to=derek.murray@cl.cam.ac.uk \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=chrisw@sous-sol.org \
--cc=ehabkost@redhat.com \
--cc=gcosta@redhat.com \
--cc=jbeulich@novell.com \
--cc=kraxel@redhat.com \
--cc=quintela@redhat.com \
--cc=sct@redhat.com \
--cc=virtualization@lists.osdl.org \
--cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.