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

Re: [XenPPC] getdomaininfo_list() and xm top

To: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
Subject: Re: [XenPPC] getdomaininfo_list() and xm top
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Tue, 05 Sep 2006 10:58:51 -0500
Cc: XenPPC-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 05 Sep 2006 08:58:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060905042322.GF27551@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <20060905042322.GF27551@xxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Tony, are you familiar with how the xencomm stuff works? It's pretty
straightforward: the kernel constructs a scatter/gather list containing
physical addresses to map virtual-contiguous userspace buffers. Those
lists are created in arch/powerpc/platforms/xen/hcall.c .

At first glance, it appears the DOM0_GETDOMAININFOLIST dom0 op is being
handled correctly, so it looks like you'll need to dig in to that a
little more.

On Tue, 2006-09-05 at 14:23 +1000, Tony Breeds wrote:
> Hi All,
>       I've been looking at the "xm top" command.  Currently this fails
> with "Failed to retrieve statistics from libxenstat".  libxenstat makes
> a getdomaininfo_list hypercall.  Doing a little digging it seems the
> copy_to_guest_offset() call (dom0_ops.c:437) is returning -EFAULT.
> 
> If I compare getdomaininfo with getdomaininfo_list it looks to me that
> the main difference is the destination for of the results.
> getdomaininfo(), overwrites the u_dom0_op of the hypercall
> getdomaininfolist(), places the results into a userspace buffer, whose
> address comes in via the u_dom0_op.
> 
> I've poked around in xencomm_copy_to_guest and it seems that all the
> addresses[] are XENCOMM_INVALID.  When makes be think that the address
> we're trying to write to is bogus for some reason.

*All* of them? You might see how many bytes xencomm_create() is
handling, since it only marks *unused* addresses as INVALID.

> I'm not really sure I know what my question is other than to ask for
> pointers on how narrow down what's missing on the ppc side to make this
> type of hypercall work.
> 
> I'm not sure I'm on the right track here but I don't think that we're
> passing copy_to_guest_offset(), a pointer that can successfully be cast
> as a xencomm_desc.

Try this to start:

diff -r 199b457c4325 drivers/xen/core/xencomm.c
--- a/drivers/xen/core/xencomm.c        Mon Aug 28 18:43:52 2006 -0500
+++ b/drivers/xen/core/xencomm.c        Tue Sep 05 10:51:02 2006 -0500
@@ -21,7 +21,7 @@
 #include <asm/page.h>
 #include <xen/xencomm.h>

-int xencomm_debug;
+int xencomm_debug = 1;

 /* translate virtual address to physical address */
 static unsigned long xen_vaddr_to_paddr(unsigned long vaddr)

(Hmm, looks like all those printks are missing log levels. Patch would
be happily accepted. :)

-- 
Hollis Blanchard
IBM Linux Technology Center


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

<Prev in Thread] Current Thread [Next in Thread>