From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: [PATCH]: Fix xentrace buffer allocation Date: Mon, 16 Aug 2010 13:23:01 +0200 Message-ID: <4C691F95.4020606@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080608050001040304070504" 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: Keir Fraser Cc: xen-devel List-Id: xen-devel@lists.xenproject.org --------------080608050001040304070504 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Hi, during experiments with xentrace we found that the t_info buffer allocation does not match the constants describing the buffer size. Attached patch fixes this, so changes of the buffer size only requires a single line change in the future. Thanks to Uwe for reporting this. Regards, Andre. Signed-off-by: Andre Przywara -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 448-3567-12 --------------080608050001040304070504 Content-Type: text/x-patch; name="fix_tinfo_allocation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fix_tinfo_allocation.patch" diff -r 774dfc178c39 xen/common/trace.c --- a/xen/common/trace.c Thu Aug 12 17:06:21 2010 +0100 +++ b/xen/common/trace.c Mon Aug 16 13:22:47 2010 +0200 @@ -321,9 +321,9 @@ /* Calculate offset in u32 of first mfn */ calc_tinfo_first_offset(); - /* t_info size fixed at 2 pages for now. That should be big enough / small enough - * until it's worth making it dynamic. */ - t_info = alloc_xenheap_pages(1, 0); + /* t_info size is fixed for now. Currently this works great, so there + * seems to be no need to make it dynamic. */ + t_info = alloc_xenheap_pages(get_order_from_pages(T_INFO_PAGES), 0); if ( t_info == NULL ) { --------------080608050001040304070504 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------080608050001040304070504--