|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [patch 12/21] Xen-paravirt: Allocate and free vmalloc ar
To: |
Jeremy Fitzhardinge <jeremy@xxxxxxxx> |
Subject: |
[Xen-devel] Re: [patch 12/21] Xen-paravirt: Allocate and free vmalloc areas |
From: |
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> |
Date: |
Thu, 15 Feb 2007 22:43:22 -0800 |
Cc: |
Zachary Amsden <zach@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Jan Beulich <JBeulich@xxxxxxxxxx>, Chris Wright <chrisw@xxxxxxxxxxxx>, Andi Kleen <ak@xxxxxx>, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx> |
Delivery-date: |
Fri, 16 Feb 2007 05:31:27 -0800 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxx |
In-reply-to: |
<20070216022531.417300365@xxxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<20070216022449.739760547@xxxxxxxx> <20070216022531.417300365@xxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
On Thu, 15 Feb 2007 18:25:01 -0800 Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
> +void lock_vm_area(struct vm_struct *area)
> +{
> + unsigned long i;
> + char c;
> +
> + /*
> + * Prevent context switch to a lazy mm that doesn't have this area
> + * mapped into its page tables.
> + */
> + preempt_disable();
> +
> + /*
> + * Ensure that the page tables are mapped into the current mm. The
> + * page-fault path will copy the page directory pointers from init_mm.
> + */
> + for (i = 0; i < area->size; i += PAGE_SIZE)
> + (void)__get_user(c, (char __user *)area->addr + i);
> +}
> +EXPORT_SYMBOL_GPL(lock_vm_area);
This won't work when CONFIG_PREEMPT=y. The pagefault handler will see
in_atomic() and will scram.
(pet-peeve-from-someone-who-remembers-fortran: the reader expects the
variable `i' to be signed. signed int really)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [patch 19/21] Xen-paravirt: Add the Xenbus sysfs and virtual device hotplug driver., (continued)
- [Xen-devel] [patch 19/21] Xen-paravirt: Add the Xenbus sysfs and virtual device hotplug driver., Jeremy Fitzhardinge
- [Xen-devel] [patch 00/21] Xen-paravirt: Xen guest implementation for paravirt_ops interface, Jeremy Fitzhardinge
- [Xen-devel] [patch 02/21] Xen-paravirt: ignore vgacon if hardware not present, Jeremy Fitzhardinge
- [Xen-devel] [patch 03/21] Xen-paravirt: Add pagetable accessors to pack and unpack pagetable entries, Jeremy Fitzhardinge
- [Xen-devel] [patch 01/21] Xen-paravirt: Fix typo in sync_constant_test_bit()s name., Jeremy Fitzhardinge
- [Xen-devel] [patch 09/21] Xen-paravirt: Allow paravirt backend to select PGD allocation alignment, Jeremy Fitzhardinge
- [Xen-devel] [patch 12/21] Xen-paravirt: Allocate and free vmalloc areas, Jeremy Fitzhardinge
- [Xen-devel] Re: [patch 12/21] Xen-paravirt: Allocate and free vmalloc areas, Jeremy Fitzhardinge
- Re: [Xen-devel] Re: [patch 12/21] Xen-paravirt: Allocate and free vmalloc areas, Keir Fraser
- Re: [Xen-devel] Re: [patch 12/21] Xen-paravirt: Allocate and free vmalloc areas, Keir Fraser
- Re: [Xen-devel] Re: [patch 12/21] Xen-paravirt: Allocate and free vmalloc areas, Jeremy Fitzhardinge
|
|
|
|
|