From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [PATCH] xencons missing string allocation Date: Sat, 10 Dec 2005 09:27:20 -0700 Message-ID: <1134232041.23367.21.camel@localhost.localdomain> References: <1134153451.6136.14.camel@tdi> <20051209185448.GD9830@granada.merseine.nu> <1134160653.6463.6.camel@tdi> <1134172824.6952.6.camel@tdi> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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 On Sat, 2005-12-10 at 15:06 +0000, Keir Fraser wrote: > On 10 Dec 2005, at 00:00, Alex Williamson wrote: > > > Ok, disregard that previous attempt, it was definitely chasing a > > false positive. I'm not sure this one is correct either, but I'll toss > > it out in case anyone else is interested in chasing this problem too. > > I > > believe the problem is that kcons_device() is incorrectly calculating > > the index when xc_num != 0 on serial devices. If I subtract xc_num > > from > > the console index, which should always give me 0, things work perfectly > > for all ttyS console values (that I've tested). I don't know if > > something similar needs to be done for tty devices. Patch attached, > > comments/suggestions welcome. Thanks, > > This seems a very bizarre thing to have to do! What does this index > value mean?? The index is effectively the index into the array of ttyS devices. For example, ttyS[1] == ttyS1. When I specify console=ttyS1, this value gets separated into driver "ttyS", index 1 in the console data structure. The xen console driver only knows how to deal with index 0. The patch I sent confines the namespace translation to one place, but I think a similar change could be done in places like the open function where it specifically checks for index == 0. Then again, it may even work as is if the user specifies "xencons=ttyS1 console=ttyS0" where ttyS0 would automatically become index 0 in the xen console driver. This of course seems far from intuitive and may break again if the kernel 8250 driver is loaded. My goal is to be able to include both the 8250 driver and the xen console driver and have them work together by specifying a xencons= value above the range of ports the 8250 driver claims. From Ian's commit log, I think this is supposed to work, but it currently doesn't. Thanks, Alex