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/
Home Products Support Community News


Re: [Xen-devel] Legacy tty1 support in pvops kernels

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] Legacy tty1 support in pvops kernels
From: Major Hayden <major.hayden@xxxxxxxxxxxxx>
Date: Wed, 12 May 2010 11:57:23 -0500
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 12 May 2010 09:58:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BEAD943.6040104@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <3537569A-6951-4CC4-9E65-07B98D623D64@xxxxxxxxxxxxx> <4BEAD943.6040104@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hello Jeremy,

I did switch around HVC_MAJOR to 4 earlier this morning and that works - except 
the console ends up on tty0.  I spotted the following within hvc_init() (line 
853 of drivers/char/hvc_console.c in vanilla

drv->minor_start = HVC_MINOR;

I set HVC_MINOR at the top of hvc_console.c to 1 and recompiled, but the 
console still ended up on /dev/tty0.  If I adjust the domU's inittab to bring 
up a console on /dev/tty0, I can interact with the console as I normally could 
on /dev/hvc0.  However, I'm trying to avoid making changes within the domU's 
themselves as this would involve an enormous amount of work.

Do you have any ideas on how to shift the first index of the hvc console to 1 
rather than 0?  I think that'd solve my problem.  It's so close I can feel it. 

My current diffs are attached.

Major Hayden

Attachment: pvops.diff
Description: Binary data

On May 12, 2010, at 11:37, Jeremy Fitzhardinge wrote:

> On 05/11/2010 05:42 PM, Major Hayden wrote:
>> Hey there,
>> We have quite a few legacy environments that already have pre-built domU 
>> images that depend on /dev/sdX for block devices and /dev/tty1 for console 
>> access.  The /dev/xvdX -> /dev/sdX change is trivial:
>> diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
>> index b8578bb..9c8aaa4 100644
>> --- a/drivers/block/xen-blkfront.c
>> +++ b/drivers/block/xen-blkfront.c
>> @@ -117,7 +117,7 @@ static DEFINE_SPINLOCK(blkif_io_lock);
>> #define VDEV_IS_EXTENDED(dev) ((dev)&(EXTENDED))
>> #define BLKIF_MINOR_EXT(dev) ((dev)&(~EXTENDED))
>> -#define DEV_NAME       "xvd"   /* name in /dev */
>> +#define DEV_NAME       "sd"    /* name in /dev */
>> static int get_id_from_freelist(struct blkfront_info *info)
>> {
>> However, I'm struggling with the hvc0 -> tty1 change.  In short, I'm looking 
>> to bring up a domU that is pre-configured to use tty1 as its console.  I 
>> understand that the virtual terminal drivers and hvc drivers are different 
>> and that the OS will see them differently as it boots.  I made these 
>> adjustments in the hopes that something would work:
>> diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
>> index 6aad99e..cd2888d 100644
>> --- a/drivers/char/Kconfig
>> +++ b/drivers/char/Kconfig
>> @@ -5,7 +5,7 @@
>> menu "Character devices"
>> config VT
>> -       bool "Virtual terminal" if EMBEDDED
>> +       bool "Virtual terminal"
>>      depends on !S390
>>      select INPUT
>>      default y
>> diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
>> index a632f25..eff0900 100644
>> --- a/drivers/char/hvc_console.c
>> +++ b/drivers/char/hvc_console.c
>> @@ -44,7 +44,7 @@
>> #include "hvc_console.h"
>> #define HVC_MAJOR      229
> Did you try changing the major to 4 as well?  To match /dev/ttyX?
>    J

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>