WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [Patch] allocate_empty_lowmem_region in non-privileged domai

To: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Subject: [Xen-devel] [Patch] allocate_empty_lowmem_region in non-privileged domains
From: Ross McIlroy <ross.mcilroy@xxxxxxxxx>
Date: Tue, 2 Aug 2005 16:11:35 +0100
Cc: cwc22@xxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, Ross C Mcilroy <mcilrorc@xxxxxxxxxxxxx>
Delivery-date: Tue, 02 Aug 2005 15:10:00 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=X+IqVdxNssTDwm0HfJmveel2QJ8HSKABSyCfZXAx7CaRp418Ht17iuQd9AgFZLKxyT/KliJHXhoRDyjMomhJ325UeVLrfMJa63Pmtb5RwdqyRsob4N+8C/hDyCEVDF8sDAq88nfsMXPSlPCGVNp4u3/p0xpniMnwEZOcq3gPcac=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200508021430.22795.mark.williamson@xxxxxxxxxxxx>
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: <260002866C8EBA4EA0AD853F467EC11E04ACDB@xxxxxxxxxxxxxxxxxxxx> <200508021348.07818.mark.williamson@xxxxxxxxxxxx> <7f4e21e305080206205dd0b3b5@xxxxxxxxxxxxxx> <200508021430.22795.mark.williamson@xxxxxxxxxxxx>
Reply-to: Ross McIlroy <ross.mcilroy@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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@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>

Attachment: allocate_empty_lowmem_region.patch
Description: Text Data

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