From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Gardner Subject: Trace buffers no longer working -- What changed? Date: Wed, 08 Mar 2006 13:16:09 -0700 Message-ID: <440F3B89.3020009@hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org It has come to my attention that Xenmon and xentrace have stopped working in the latest xen-unstable tree, but I'm not sure precisely when this happened. The problem is that both utilities are failing to map the xen trace buffers into user space. Anyone have any idea what might have changed recently that could have caused this? The trace buffer allocation code in the hypervisor is using alloc_xenheap_pages() followed by SHARE_PFN_WITH_DOMAIN(), and then the userland apps use xc_map_foreign_range() to get access to the trace buffers. xc_map_foreign_range() uses ioctl(IOCTL_PRIVCMD_MMAP) which is failing with errno 14 (bad address). In particular, the privcmd ioctl uses direct_remap_pfn_range() which is actually returning the error. I kind of suspect that there's nothing wrong at the userland side of things, but something is going wrong when the memory is allocated and "shared". Can anybody help? Rob