[XenPPC] Re: [Xen-devel] RFC: xencomm in common

2006-08-23 Thread Tristan Gingold
Le Lundi 21 Août 2006 11:41, Keir Fraser a écrit :
 On 21/8/06 10:20 am, Tristan Gingold [EMAIL PROTECTED] wrote:
  Fine in principle. Specific comments:
   * powerpc should be cleaned up at the same time to use the common
  infrastructure. I don't want duplicated code hanging around in
  arch/powerpc
 
  I have attached a blindly-made patch again powerpc files.
  If ppc people could check this, I'd be happy.
 
   * The code you add to common/ should obey the coding style of other
  files in that directory
   * Arguably we should have an asm-generic for the xencomm guest-access
  macros. That's a Linux-ism which I think fits well in this particular
  case.
 
  Taken into account in this updated patch.

 Looks better. I assume you'll resend with signed-off-by when you want these
 applied.
Hi,

here are the signed-off-by patches for xen.
I took the liberty to add Hollis Blanchard in signed-off-by of the first patch 
because he is the primary author of these files.

I don't know wether or not these patches should be put off beacause of the 
freeze, but they are a no-op for x86.

Tristan.
# HG changeset patch
# User [EMAIL PROTECTED]
# Node ID cbe47a6938d17983c29d6baab5b6f81b9485451a
# Parent  91169603a8e8dded9eba6cb6c3421b5d58a85a97
Xencomm in common code.

Signed-off-by: Tristan Gingold [EMAIL PROTECTED]
Signed-off-by: Hollis Blanchard [EMAIL PROTECTED]

diff -r 91169603a8e8 -r cbe47a6938d1 xen/common/Makefile
--- a/xen/common/Makefile	Tue Aug 22 14:45:49 2006 -0600
+++ b/xen/common/Makefile	Wed Aug 23 08:08:14 2006 +0200
@@ -26,6 +26,8 @@ obj-y += vsprintf.o
 obj-y += vsprintf.o
 obj-y += xmalloc.o
 
+obj-$(HAS_XENCOMM) += xencomm.o
+
 obj-$(perfc)   += perfc.o
 obj-$(crash_debug) += gdbstub.o
 
diff -r 91169603a8e8 -r cbe47a6938d1 xen/include/public/xencomm.h
--- a/xen/include/public/xencomm.h	Tue Aug 22 14:45:49 2006 -0600
+++ b/xen/include/public/xencomm.h	Wed Aug 23 08:08:14 2006 +0200
@@ -34,4 +34,15 @@ struct xencomm_desc {
 uint64_t address[0];
 };
 
+/* Inline Xencomm.
+   If the inline flag is set, the descriptor is simply a the flagged
+   physical address of the buffer which is known to be contiguous in
+   physical memory.  Because the kernels are often 1:1 mapped, this is
+   interesting for kernel issued hypercalls.  */
+/* These macros should be defined by arch-xxx.h:
+   XENCOMM_IS_INLINE(addr): true if ADDR is an inline address.
+   XENCOMM_INLINE_ADDR(addr): extract the physical address (as an unsigned).
+   XENCOMM_INLINE_MAKE(addr): flag ADDR and returns an unsigned.
+*/
+
 #endif /* _XEN_XENCOMM_H_ */
diff -r 91169603a8e8 -r cbe47a6938d1 xen/common/xencomm.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +
+++ b/xen/common/xencomm.c	Wed Aug 23 08:08:14 2006 +0200
@@ -0,0 +1,348 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * Copyright (C) IBM Corp. 2006
+ *
+ * Authors: Hollis Blanchard [EMAIL PROTECTED]
+ *  Tristan Gingold [EMAIL PROTECTED]
+ */
+
+#include xen/config.h
+#include xen/mm.h
+#include xen/sched.h
+#include asm/current.h
+#include asm-generic/xencomm_access.h
+#include public/xen.h
+#include public/xencomm.h
+#include xen/errno.h
+
+#undef DEBUG
+#ifdef DEBUG
+static int xencomm_debug = 1; /* extremely verbose */
+#else
+#define xencomm_debug 0
+#endif
+
+/**
+ * xencomm_copy_from_guest: Copy a block of data from domain space.
+ * @to:   Machine address.
+ * @from: Physical address to a xencomm buffer descriptor.
+ * @n:Number of bytes to copy.
+ * @skip: Number of bytes from the start to skip.
+ *
+ * Copy data from domain to hypervisor.
+ *
+ * Returns number of bytes that could not be copied.
+ * On success, this will be zero.
+ */
+unsigned long
+xencomm_copy_from_guest(
+void *to,
+const void   *from,
+unsigned int n,
+unsigned int skip)
+{
+struct xencomm_desc *desc;
+unsigned long desc_addr;
+unsigned int from_pos = 0;
+unsigned int to_pos = 0;
+unsigned int i = 0;
+
+if ( xencomm_debug )
+printf(xencomm_copy_from_guest: from=%lx+%u n=%u\n,
+   (unsigned long)from, skip, n);
+
+if ( XENCOMM_IS_INLINE (from) )
+{
+unsigned long src_paddr = XENCOMM_INLINE_ADDR(from);
+
+src_paddr += skip;
+
+while ( n  0 )
+{
+unsigned int chunksz;
+ 

[XenPPC] xend, bridgeutils and nfsroot

2006-08-23 Thread Jimi Xenidis
Since xend brings down the NIC to setup the bridging it makes an  
nfsroot impossible.

so..
 1) Am I correct?
 2) Any good workarounds?

-JX


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


[XenPPC] [xenppc-unstable] [POWERPC] add show_backtrace()

2006-08-23 Thread Xen patchbot-xenppc-unstable
# HG changeset patch
# User Jimi Xenidis [EMAIL PROTECTED]
# Node ID 877560e56eabbc7f05f650fba912fd0611b930f6
# Parent  e06e2cca9f39d56344ec96b90ad4a2405b247996
[POWERPC] add show_backtrace()

Total rip off of xmon_show_stack() from Linux:arch/powerpc/xmon/xmon.c.
This will allow a numeric only stack traceback of Xen exectution.
Currently only triggered by BUG() et.al.

Signed-off-by: Jimi Xenidis [EMAIL PROTECTED]
---
 xen/arch/powerpc/Makefile   |1 
 xen/arch/powerpc/backtrace.c|  194 
 xen/arch/powerpc/exceptions.c   |2 
 xen/arch/powerpc/memory.c   |3 
 xen/arch/powerpc/setup.c|3 
 xen/include/asm-powerpc/processor.h |1 
 6 files changed, 201 insertions(+), 3 deletions(-)

diff -r e06e2cca9f39 -r 877560e56eab xen/arch/powerpc/Makefile
--- a/xen/arch/powerpc/Makefile Tue Aug 22 17:26:36 2006 -0400
+++ b/xen/arch/powerpc/Makefile Wed Aug 23 04:59:10 2006 -0400
@@ -6,6 +6,7 @@ subdir-y += papr
 subdir-y += papr
 
 obj-y += audit.o
+obj-y += backtrace.o
 obj-y += bitops.o
 obj-y += boot_of.o
 obj-y += dart.o
diff -r e06e2cca9f39 -r 877560e56eab xen/arch/powerpc/exceptions.c
--- a/xen/arch/powerpc/exceptions.c Tue Aug 22 17:26:36 2006 -0400
+++ b/xen/arch/powerpc/exceptions.c Wed Aug 23 04:59:10 2006 -0400
@@ -82,6 +82,8 @@ void program_exception(struct cpu_user_r
 show_registers(regs);
 printk(dar 0x%016lx, dsisr 0x%08x\n, mfdar(), mfdsisr());
 printk(hid4 0x%016lx\n, regs-hid4);
+printk(---[ backtrace ]---\n);
+show_backtrace(regs-gprs[1], regs-lr, regs-pc);
 panic(%s: 0x%lx\n, __func__, cookie);
 #endif /* CRASH_DEBUG */
 }
diff -r e06e2cca9f39 -r 877560e56eab xen/arch/powerpc/memory.c
--- a/xen/arch/powerpc/memory.c Tue Aug 22 17:26:36 2006 -0400
+++ b/xen/arch/powerpc/memory.c Wed Aug 23 04:59:10 2006 -0400
@@ -176,9 +176,6 @@ void memory_init(module_t *mod, int mcou
   for heap (0x%lx)\n, _start, heap_start);
 }
 
-/* we give the first RMA to the hypervisor */
-xenheap_phys_end = rma_size(cpu_rma_order());
-
 /* allow everything else to be allocated */
 total_pages = 0;
 ofd_walk_mem((void *)oftree, heap_init);
diff -r e06e2cca9f39 -r 877560e56eab xen/arch/powerpc/setup.c
--- a/xen/arch/powerpc/setup.c  Tue Aug 22 17:26:36 2006 -0400
+++ b/xen/arch/powerpc/setup.c  Wed Aug 23 04:59:10 2006 -0400
@@ -296,6 +296,9 @@ static void __init __start_xen(multiboot
 console_start_sync();
 #endif
 
+/* we give the first RMA to the hypervisor */
+xenheap_phys_end = rma_size(cpu_rma_order());
+
 /* Check that we have at least one Multiboot module. */
 if (!(mbi-flags  MBI_MODULES) || (mbi-mods_count == 0)) {
 panic(FATAL ERROR: Require at least one Multiboot module.\n);
diff -r e06e2cca9f39 -r 877560e56eab xen/include/asm-powerpc/processor.h
--- a/xen/include/asm-powerpc/processor.h   Tue Aug 22 17:26:36 2006 -0400
+++ b/xen/include/asm-powerpc/processor.h   Wed Aug 23 04:59:10 2006 -0400
@@ -39,6 +39,7 @@ struct cpu_user_regs;
 struct cpu_user_regs;
 extern void show_registers(struct cpu_user_regs *);
 extern void show_execution_state(struct cpu_user_regs *);
+extern void show_backtrace(ulong sp, ulong lr, ulong pc);
 extern unsigned int cpu_rma_order(void);
 extern void cpu_initialize(int cpuid);
 extern void cpu_init_vcpu(struct vcpu *);
diff -r e06e2cca9f39 -r 877560e56eab xen/arch/powerpc/backtrace.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/xen/arch/powerpc/backtrace.c  Wed Aug 23 04:59:10 2006 -0400
@@ -0,0 +1,194 @@
+/*
+ * Routines providing a simple monitor for use on the PowerMac.
+ *
+ * Copyright (C) 1996-2005 Paul Mackerras.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License
+ *  as published by the Free Software Foundation; either version
+ *  2 of the License, or (at your option) any later version.
+ */
+
+#include xen/config.h
+#include xen/lib.h
+#include xen/console.h
+#include xen/sched.h
+
+/* Shamelessly lifted from Linux Xmon try to keep pristene */
+#ifdef __powerpc64__
+#define LRSAVE_OFFSET  0x10
+#define REG_FRAME_MARKER   0x7265677368657265ul/* regshere */
+#define MARKER_OFFSET  0x60
+#define REGS_OFFSET0x70
+#define REG %016lX
+#else
+#define LRSAVE_OFFSET  4
+#define REG_FRAME_MARKER   0x72656773
+#define MARKER_OFFSET  8
+#define REGS_OFFSET16
+#define REG %08lX
+#endif
+
+#define TRAP(regs) ((regs)-entry_vector  ~0xF)
+static int xmon_depth_to_print = 64;
+
+/* Very cheap human name for vector lookup. */
+static
+const char *getvecname(unsigned long vec)
+{
+   char *ret;
+
+   switch (vec) {
+   case 0x100: ret = (System Reset); break;
+   case 0x200: ret = (Machine Check); break;
+   case 0x300: ret = (Data Access); break;
+   case 0x380: ret = (Data SLB Access); 

[XenPPC] Re: [Xen-devel] xend, bridgeutils and nfsroot

2006-08-23 Thread Jan De Landtsheer
run with 2 nics, where eth1 would be used for your nfsroot?
On Wed, 2006-08-23 at 06:35 -0400, Jimi Xenidis wrote:
 Since xend brings down the NIC to setup the bridging it makes an  
 nfsroot impossible.
 so..
   1) Am I correct?
   2) Any good workarounds?
 
 -JX
 
 
 ___
 Xen-devel mailing list
 [EMAIL PROTECTED]
 http://lists.xensource.com/xen-devel


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


[XenPPC] PATCH: xencomm - kernel side

2006-08-23 Thread Tristan Gingold
Hi,

taking into account Hollis comments I now submit this patch.

IA64 specific stuff will be posted to xen-ia64-unstable after merge.

Tristan.
# HG changeset patch
# User [EMAIL PROTECTED]
# Node ID ba96f5f81464dc3db80af0454fb05c73de620637
# Parent  cc7a78171c811b9caa5587a0141d8c8477d10ce8
Xencomm support in linux kernel:
* descriptor creation and destruction
* transformation of kernels hypercalls
* transformation of privcmd issued hypercalls.

It must be enabled by architecture config.

Signed-off-by: Tristan Gingold [EMAIL PROTECTED]
Signed-off-by: Hollis Blanchard [EMAIL PROTECTED]

diff -r cc7a78171c81 -r ba96f5f81464 linux-2.6-xen-sparse/drivers/xen/Kconfig
--- a/linux-2.6-xen-sparse/drivers/xen/Kconfig	Wed Aug 23 12:23:05 2006 +0200
+++ b/linux-2.6-xen-sparse/drivers/xen/Kconfig	Wed Aug 23 12:28:12 2006 +0200
@@ -257,4 +257,7 @@ config XEN_SMPBOOT
 	default y
 	depends on SMP
 
+config XEN_XENCOMM
+	bool
+	default n
 endif
diff -r cc7a78171c81 -r ba96f5f81464 linux-2.6-xen-sparse/drivers/xen/core/Makefile
--- a/linux-2.6-xen-sparse/drivers/xen/core/Makefile	Wed Aug 23 12:23:05 2006 +0200
+++ b/linux-2.6-xen-sparse/drivers/xen/core/Makefile	Wed Aug 23 12:28:12 2006 +0200
@@ -11,3 +11,4 @@ obj-$(CONFIG_XEN_SKBUFF)	+= skbuff.o
 obj-$(CONFIG_XEN_SKBUFF)	+= skbuff.o
 obj-$(CONFIG_XEN_REBOOT)	+= reboot.o
 obj-$(CONFIG_XEN_SMPBOOT)	+= smpboot.o
+obj-$(CONFIG_XEN_XENCOMM)	+= xencomm.o xencomm_hcall.o
diff -r cc7a78171c81 -r ba96f5f81464 linux-2.6-xen-sparse/drivers/xen/privcmd/Makefile
--- a/linux-2.6-xen-sparse/drivers/xen/privcmd/Makefile	Wed Aug 23 12:23:05 2006 +0200
+++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/Makefile	Wed Aug 23 12:28:12 2006 +0200
@@ -1,1 +1,3 @@ obj-y:= privcmd.o
 obj-y:= privcmd.o
+
+obj-$(CONFIG_XEN_XENCOMM)	+= xencomm.o
diff -r cc7a78171c81 -r ba96f5f81464 linux-2.6-xen-sparse/drivers/xen/core/xencomm.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +
+++ b/linux-2.6-xen-sparse/drivers/xen/core/xencomm.c	Wed Aug 23 12:28:12 2006 +0200
@@ -0,0 +1,163 @@
+/*
+ * Copyright (C) 2006 Hollis Blanchard [EMAIL PROTECTED], IBM Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+#include linux/gfp.h
+#include linux/mm.h
+#include asm/page.h
+#include xen/xencomm.h
+#include xen/interface/xen.h
+#include asm/xen/xencomm.h
+
+static int xencomm_debug;
+
+/* translate virtual address to physical address.
+   This is the generic version.  Architectures must declare
+   xen_vaddr_to_paddr in asm/xen/xencomm.h, which may be a macro.
+*/
+static unsigned long xen_generic_vaddr_to_paddr(unsigned long vaddr)
+{
+	struct page *page;
+	struct vm_area_struct *vma;
+
+	if (vaddr  TASK_SIZE) {
+		/* kernel address */
+		return __pa(vaddr);
+	}
+
+	/* XXX double-check (lack of) locking */
+	vma = find_extend_vma(current-mm, vaddr);
+	if (!vma)
+		return ~0UL;
+
+	page = follow_page(vma, vaddr, 0);
+	if (!page)
+		return ~0UL;
+
+	return (page_to_pfn(page)  PAGE_SHIFT) | (vaddr  ~PAGE_MASK);
+}
+
+static int xencomm_init(struct xencomm_desc *desc,
+			void *buffer, unsigned long bytes)
+{
+	unsigned long recorded = 0;
+	int i = 0;
+
+	BUG_ON((buffer == NULL)  (bytes  0));
+
+	/* record the physical pages used */
+	if (buffer == NULL)
+		desc-nr_addrs = 0;
+
+	while ((recorded  bytes)  (i  desc-nr_addrs)) {
+		unsigned long vaddr = (unsigned long)buffer + recorded;
+		unsigned long paddr;
+		int offset;
+		int chunksz;
+
+		offset = vaddr % PAGE_SIZE; /* handle partial pages */
+		chunksz = min(PAGE_SIZE - offset, bytes - recorded);
+
+		paddr = xen_vaddr_to_paddr(vaddr);
+		if (paddr == ~0UL) {
+			printk(%s: couldn't translate vaddr %lx\n,
+			   __func__, vaddr);
+			return -EINVAL;
+		}
+
+		desc-address[i++] = paddr;
+		recorded += chunksz;
+	}
+
+	if (recorded  bytes) {
+		printk(%s: could only translate %ld of %ld bytes\n,
+		   __func__, recorded, bytes);
+		return -ENOSPC;
+	}
+
+	/* mark remaining addresses invalid (just for safety) */
+	while (i  desc-nr_addrs)
+		desc-address[i++] = XENCOMM_INVALID;
+
+	desc-magic = XENCOMM_MAGIC;
+
+	return 0;
+}
+
+static struct xencomm_desc *xencomm_alloc(gfp_t gfp_mask)
+{
+	struct xencomm_desc *desc;
+
+	/* XXX could we call this from irq context? */
+	desc = (struct xencomm_desc *)__get_free_page(gfp_mask);
+	if (desc == NULL) {
+		panic(%s: page 

Re: [XenPPC] PATCH: xencomm - kernel side

2006-08-23 Thread Hollis Blanchard
On Wed, 2006-08-23 at 14:31 +0200, Tristan Gingold wrote:
 
 taking into account Hollis comments I now submit this patch.
 
 IA64 specific stuff will be posted to xen-ia64-unstable after merge.

NAK pending outcome of other comments.

Also, please let me add my own Signed-off-by line -- that way we'll know
that I agree the patch is in fact final (which I don't right now).

There is at least a /* XXX could we call this from irq context? */
comment that needs removal. I didn't check the rest of the patch to see
if you'd followed all my other suggestions.

-- 
Hollis Blanchard
IBM Linux Technology Center


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


Re: Danger! [XenPPC] correct shadow2 merge conflict

2006-08-23 Thread Hollis Blanchard
On Wed, 2006-08-23 at 06:21 -0400, Jimi Xenidis wrote:
 the push below does breaks domain building, unless there are  
 additional instructions missing somewhere.

Yup, a Linux change is needed. I'll push shortly; sorry about that.

 If you happened to pull/update, you can back out this patch with:
$ hg log -p -r 8fa42dd4c92a | patch -p1 -R

Since we're talking about committed changesets, there is no need for
this. Just 'hg update 5ec3af32d347', which is the last working
changeset. Later you can 'hg update' to get back to the tip. Using
changesets instead of the manual patching above ensures you don't get
diff or committ accidents.

-- 
Hollis Blanchard
IBM Linux Technology Center


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


[XenPPC] Re: [Xen-devel] [PATCH] [XEND] abstract architecture-specific bits in image.py

2006-08-23 Thread Hollis Blanchard
On Tue, 2006-08-22 at 16:50 -0500, Hollis Blanchard wrote:
 Since this patch wasn't committed, the shadow2 changes created
 conflicts. Here is the respin. Note that I have not tested with shadow2,
 but as you can see below the math doesn't need to be so complicated.

Tim, could you confirm this doesn't break the shadow code please?

-- 
Hollis Blanchard
IBM Linux Technology Center


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


[XenPPC] [linux-ppc-2.6] [LINUX] support DOM0_SHADOW_CONTROL dom0 hcall

2006-08-23 Thread Xen patchbot-linux-ppc-2 . 6
# HG changeset patch
# User Hollis Blanchard [EMAIL PROTECTED]
# Node ID 49765c9a9eb4554f884c4c730438cf872fae9d9c
# Parent  8f36901a3c1599e6c326b1a6f6b017dd5f285b0a
[LINUX] support DOM0_SHADOW_CONTROL dom0 hcall
Signed-off-by: Hollis Blanchard [EMAIL PROTECTED]
---
 arch/powerpc/platforms/xen/hcall.c |   10 +-
 1 files changed, 9 insertions(+), 1 deletion(-)

diff -r 8f36901a3c15 -r 49765c9a9eb4 arch/powerpc/platforms/xen/hcall.c
--- a/arch/powerpc/platforms/xen/hcall.cFri Aug 11 12:49:08 2006 -0400
+++ b/arch/powerpc/platforms/xen/hcall.cWed Aug 23 13:19:06 2006 -0500
@@ -286,6 +286,14 @@ static int xenppc_privcmd_dom0_op(privcm
kern_op.u.readconsole.count,
desc, GFP_KERNEL);
set_xen_guest_handle(kern_op.u.readconsole.buffer,
+(void *)__pa(desc));
+   break;
+   case DOM0_SHADOW_CONTROL:
+   ret = xencomm_create(
+   xen_guest_handle(kern_op.u.shadow_control.dirty_bitmap),
+   kern_op.u.shadow_control.pages * sizeof(unsigned long),
+   desc, GFP_KERNEL);
+   set_xen_guest_handle(kern_op.u.shadow_control.dirty_bitmap,
 (void *)__pa(desc));
break;
case DOM0_GETPAGEFRAMEINFO2:
@@ -509,7 +517,7 @@ int arch_privcmd_hypercall(privcmd_hyper
printk(%s: unknown hcall (%ld)\n, __func__, hypercall-op);
/* fallthru */
/* below are the hcalls we know will fail and its ok */
-case __HYPERVISOR_acm_op:
+   case __HYPERVISOR_acm_op:
return plpar_hcall_norets(XEN_MARK(hypercall-op),
hypercall-arg[0],
hypercall-arg[1],

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


[XenPPC] Re: [Xen-devel] RFC: xencomm in common

2006-08-23 Thread Isaku Yamahata

Hi Tristan.
Since I looked the patch very roughly, I might be wrong and parania though.

xencomm_copy_from_guest(), xencomm_copy_to_guest() converts
address, then acessses a page.
The Xen/IA64 P2M table is lockless so that the page can be freed 
by another cpu and used for other purpose at the same time.
(Actually such a guest behaviour doesn't make sense, but possible.)
get_page()/put_page() are necessary to prevent such a situation.
Actually Xen/IA64's vcpu_get_domain_bundle() and
efi_translate_domain_addr() do it.


On Wed, Aug 23, 2006 at 10:15:41AM +0200, Tristan Gingold wrote:
 Le Lundi 21 Août 2006 11:41, Keir Fraser a écrit :
  On 21/8/06 10:20 am, Tristan Gingold [EMAIL PROTECTED] wrote:
   Fine in principle. Specific comments:
* powerpc should be cleaned up at the same time to use the common
   infrastructure. I don't want duplicated code hanging around in
   arch/powerpc
  
   I have attached a blindly-made patch again powerpc files.
   If ppc people could check this, I'd be happy.
  
* The code you add to common/ should obey the coding style of other
   files in that directory
* Arguably we should have an asm-generic for the xencomm guest-access
   macros. That's a Linux-ism which I think fits well in this particular
   case.
  
   Taken into account in this updated patch.
 
  Looks better. I assume you'll resend with signed-off-by when you want these
  applied.
 Hi,
 
 here are the signed-off-by patches for xen.
 I took the liberty to add Hollis Blanchard in signed-off-by of the first 
 patch 
 because he is the primary author of these files.
 
 I don't know wether or not these patches should be put off beacause of the 
 freeze, but they are a no-op for x86.
 
 Tristan.



 ___
 Xen-devel mailing list
 [EMAIL PROTECTED]
 http://lists.xensource.com/xen-devel


-- 
yamahata

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