From: Atsushi SAKAI Subject: [PATCH] Fix xc_tbuf_enable assumption. Date: Wed, 24 May 2006 21:36:02 +0900 Message-ID: <200605241236.k4OCaJIR009397@fjmscan501.ms.jp.fujitsu.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Den8_4474532b4010" Return-path: Content-Description: "Mail with base64 encoded attachment" 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@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a MIME multipart message. --Den8_4474532b4010 Content-Type: text/plain; charset=iso-2022-jp Hi, All! This is a patch which needs discussion. Currently xc_tbuf_enable assumed tb_init_done = 0. But Sometimes already on For example(xenmon.py(xenbaked) and xentrace). These two programs assues tb_init_done =0 at start time. Currently xenbaked care the problem by setting tb_init_done=0 at exit time. But xentrace does not care the problem. Then error occured!(Cannot see the trace buffer.) I added a code in xc_tbuf_enable to permit tb_init_done=1. And I added to check trace buffer region is already allocated or not by using xc_tbuf_get_size. But This solution problem remains, 1) It cannot change the trace buffer size by using xc_tbuf_enable If we do, we need to add more code to freeing xen buffer. As other option.(at application layer) Adding previous command tbctl. This command switches tb_init_done =0 and 1. Comments are appreciated. This problem occured in following steps. 1)xentrace tb_init_done = 1 2)xentrace (problem occured at xc_tbuf_enable see above) After xentrace work, this problem occured. Signed-off-by: Atsushi SAKAI Thanks, Atsushi Sakai --Den8_4474532b4010 Content-Type: application/octet-stream; name="xc_enable.patch" Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename="xc_enable.patch" ZGlmZiAtciBmMGY4OGQ5YzRjOWUgdG9vbHMvbGlieGMveGNfdGJ1Zi5jCi0tLSBhL3Rvb2xzL2xp YnhjL3hjX3RidWYuYwlUdWUgTWF5IDIzIDA5OjE3OjU3IDIwMDYgLTA2MDAKKysrIGIvdG9vbHMv bGlieGMveGNfdGJ1Zi5jCVdlZCBNYXkgMjQgMjA6NTA6NDkgMjAwNiArMDkwMApAQCAtNjMsOCAr NjMsOCBAQCBpbnQgeGNfdGJ1Zl9lbmFibGUoaW50IHhjX2hhbmRsZSwgc2l6ZV90CiAgICAgREVD TEFSRV9ET00wX09QOwogICAgIGludCByYzsKIAotICAgIGlmICggeGNfdGJ1Zl9zZXRfc2l6ZSh4 Y19oYW5kbGUsIGNudCkgIT0gMCApCi0gICAgICAgIHJldHVybiAtMTsKKyAgICBpZiAoIHhjX3Ri dWZfZ2V0X3NpemUoeGNfaGFuZGxlLCBzaXplKSAhPSAwICkKKyAgICAgICAgeGNfdGJ1Zl9zZXRf c2l6ZSh4Y19oYW5kbGUsIGNudCk7CiAKICAgICBpZiAoIHRidWZfZW5hYmxlKHhjX2hhbmRsZSwg MSkgIT0gMCApCiAgICAgICAgIHJldHVybiAtMTsK --Den8_4474532b4010 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 --Den8_4474532b4010--