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-ia64-devel

Re: [Xen-ia64-devel] copying data to guest

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-ia64-devel] copying data to guest
From: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 2 Mar 2007 15:36:04 +0100
Delivery-date: Fri, 02 Mar 2007 06:35:04 -0800
Domainkey-signature: s=s768; d=fujitsu-siemens.com; c=nofws; q=dns; b=FN9qsAuQ1ejVoDNIzPqDflS54Y4Zu5w+VZACvxfs9tHdtrF6xB8e0EwzRdKPH+MxmN3p88Fe7tHrtH+zXXccwyaUa9ShW65PcwNg1hOGHfgkka9F9BuxF3s2wXoideLt;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <45E82D33.1070501@xxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <45E82D33.1070501@xxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.5
Am Freitag, 2. März 2007 14:57 schrieb Jes Sorensen:
> Hi,
>
> For the SAL emulator I am trying to figure out how to copy data to guest
> kernel space, based on a virtual pointer I receive from the guest.
>
> I have tried pretty much everything I can think off, using
> copy_to_guest(), xencomm_copy_to_guest() with and without this wacko
> XEN_GUEST_HANDLE() stuff.
>
> Trying to read xencomm.c it seems that xencomm_copy_to_guest() needs
> some magic handle, but I can't seem to figure out how to create this.
> I cannot change dom0 to do this differently, or at least I really don't
> want to.
>
> So before I have enough and start throwing my computers out the window
> and jump up and down the tables (and trust me, I am very close to that
> state right now), is there a kind sould who can save me and provide me
> with a simple working example?
>
> As mentioned, I basically I have have a virtual kernel pointer provided
> by dom0, I need to copy one 64 bit word to this address in dom0 space
> from Xen. How do I do it?
>
> The address was obtained by dom0 via kmalloc, in this specific case it's
> 0xe000003003837280, so the metaphysical address would be 0x3003837280
>
> Thanks,
> Jes

Hi Jes,

while porting mini-os to ia64 this took me some days too ;-))
You may have a look at extras/mini-os/include/ia64/hypercall-ia64.h.
See HYPERVISOR_console_io() for a simple jump intto the hypervisor via 
xencomm. The internal used function xencomm_vaddr_to_paddr() is implementet 
in extras/mini-os/arch/xencomm.c and translates a domU virtual address into a 
domU physical address.
I hope this helps!

Dietmar.

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