From: Keir Fraser Subject: Re: [PATCH v2 06/25] libelf-loader: introduce elf_load_image Date: Fri, 09 Dec 2011 15:46:32 +0000 Message-ID: References: <1323445279.20077.76.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1323445279.20077.76.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell , Jan Beulich Cc: "xen-devel@lists.xensource.com" , "keir.xen@gmail.com" , "Tim Deegan (3P)" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 09/12/2011 15:41, "Ian Campbell" wrote: >> (I didn't look >> at the ARM bits, but if there things are done differently that's likely a >> mistake). > > This ARM port has no PV guests so it has no "user" in the sense that > x86's copy_to_user means, so copy_to_user and copy_to_guest are both the > same and do things the HVM way. > > Maybe the right thing to do is to not supply copy_to_user on ARM at all. > I had feared this would be a big bit of string to pull on but it seems > that copy_to_user isn't actually widely used in common code: > $ rgrep --binary-files=without-match copy_to_user xen | grep -vE > x86\|ia64\|asm > xen/common/gdbstub.c: r = gdb_arch_copy_to_user((void*)addr, > (void*)&val, 1); > xen/include/linux/gdbstub.h:unsigned int gdb_arch_copy_to_user( > xen/include/xen/gdbstub.h:unsigned int gdb_arch_copy_to_user( copy_to/from_user isn't used by and doesn't really have any meaning to common code. You can leave them out. -- Keir > Stefano, what do you think?