[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Re: [Patch] allocate_empty_lowmem_region in non-privileged domains



> Below is a patch to the enable allocate_empty_lowmem_region in
> on-privileged domains, so that backend drivers can map granted foreign
> pages even if they are running in an unprivileged domain. (as per the
> "allocate_empty_lowmem_region hypervisor function" thread discussion)

I see you're adding an export so that it's usable by modules; I think that 
makes sense.  Although the current backends must be statically compiled 
there's no reason not to export this for other backends to use.  Harry tells 
me the 2.6 USB backend is fully modularised, for instance (he also pointed 
out there's no way to deallocate the empty lowmem region on unload, which'll 
need to be addressed at some stage).

I did wonder if we ought to tweak the name if we're exporting to the rest of 
the kernel (e.g. prefix xen_) but I don't think we have a convention for 
that.

Basically, +1 from me.  I like it.

Cheers,
Mark

> Thanks
>
> Ross
>
>
> # HG changeset patch
> # User rcmcilro@xxxxxxxxxxxxxxxxxxxxx
> # Node ID b235cde45efbb903d3e0e9626df6a90adde20577
> # Parent  2f743309f21afdc6adaef01421da40f7ff1e8b0d
> Add allocate_empty_lowmem_region() for unprivileged domains
>
> diff -r 2f743309f21a -r b235cde45efb
> linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c
> --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c      Tue Aug  2
> 12:37:37 2005
> +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c      Tue Aug  2
> 13:58:30 2005
> @@ -35,6 +35,7 @@
>  #include <asm/pgtable.h>
>  #include <asm-xen/hypervisor.h>
>  #include <asm-xen/balloon.h>
> +#include <linux/module.h>
>  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
>  #include <linux/percpu.h>
>  #include <asm/tlbflush.h>
> @@ -312,7 +313,6 @@
>      balloon_unlock(flags);
>  }
>
> -#ifdef CONFIG_XEN_PHYSDEV_ACCESS
>
>  unsigned long allocate_empty_lowmem_region(unsigned long pages)
>  {
> @@ -360,4 +360,4 @@
>      return vstart;
>  }
>
> -#endif /* CONFIG_XEN_PHYSDEV_ACCESS */
> +EXPORT_SYMBOL(allocate_empty_lowmem_region);
> diff -r 2f743309f21a -r b235cde45efb
> linux-2.6-xen-sparse/include/asm-xen/hypervisor.h
> --- a/linux-2.6-xen-sparse/include/asm-xen/hypervisor.h       Tue Aug  2 
> 12:37:37
> 2005 +++ b/linux-2.6-xen-sparse/include/asm-xen/hypervisor.h  Tue Aug  2
> 13:58:30 2005 @@ -136,10 +136,8 @@
>
>  void xen_contig_memory(unsigned long vstart, unsigned int order);
>
> -#ifdef CONFIG_XEN_PHYSDEV_ACCESS
>  /* Allocate a contiguous empty region of low memory. Return virtual start.
> */ unsigned long allocate_empty_lowmem_region(unsigned long pages);
> -#endif
>
>  #include <asm/hypercall.h>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.