All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross McIlroy <ross.mcilroy@gmail.com>
To: Mark Williamson <mark.williamson@cl.cam.ac.uk>
Cc: cwc22@cam.ac.uk, xen-devel@lists.xensource.com,
	Ross C Mcilroy <mcilrorc@dcs.gla.ac.uk>
Subject: [Patch] allocate_empty_lowmem_region in non-privileged domains
Date: Tue, 2 Aug 2005 16:11:35 +0100	[thread overview]
Message-ID: <7f4e21e3050802081163cf5fa3@mail.gmail.com> (raw)
In-Reply-To: <200508021430.22795.mark.williamson@cl.cam.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 1905 bytes --]

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)

Thanks

Ross


# HG changeset patch
# User rcmcilro@localhost.localdomain
# 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>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: allocate_empty_lowmem_region.patch --]
[-- Type: text/x-patch; name="allocate_empty_lowmem_region.patch", Size: 1559 bytes --]

# HG changeset patch
# User rcmcilro@localhost.localdomain
# 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>
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

  reply	other threads:[~2005-08-02 15:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <260002866C8EBA4EA0AD853F467EC11E04ACDB@EX2.ad.dcs.gla.ac.uk>
2005-08-02 12:48 ` allocate_empty_lowmem_region hypervisor function Mark Williamson
2005-08-02 13:20   ` Ross McIlroy
2005-08-02 13:30     ` Mark Williamson
2005-08-02 15:11       ` Ross McIlroy [this message]
2005-08-02 15:58         ` [Patch] allocate_empty_lowmem_region in non-privileged domains Mark Williamson

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=7f4e21e3050802081163cf5fa3@mail.gmail.com \
    --to=ross.mcilroy@gmail.com \
    --cc=cwc22@cam.ac.uk \
    --cc=mark.williamson@cl.cam.ac.uk \
    --cc=mcilrorc@dcs.gla.ac.uk \
    --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.