[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200910011100.48087.borntraeger@de.ibm.com>
Date: Thu, 1 Oct 2009 11:00:48 +0200
From: Christian Borntraeger <borntraeger@...ibm.com>
To: Amit Shah <amit.shah@...hat.com>
Cc: Rusty Russell <rusty@...tcorp.com.au>,
Alan Cox <alan@...ux.intel.com>,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] virtio_console: Add support for multiple ports for generic guest and host communication
Am Mittwoch 30 September 2009 19:13:21 schrieb Amit Shah:
> - uses port->id instead of a static hvc_vtermno to pass on a value to
> hvc_alloc(). Motivation explained within comments in the code.
[...]
> + * The first argument of hvc_alloc() is the virtual console
> + * number. hvc_alloc() checks if a console with the same value
> + * was used in hvc_instantiate(). We may not end up passing
> + * the same value here (we use the value 0 in
> + * hvc_instantiate() but the console port may not be at id
> + * 0). This isn't a problem, though. Nothing in hvc really
> + * depends on these numbers and since this number is passed on
> + * to us when cons_get/put_chars() is called, it's preferable
> + * to pass on the port->id so that we can get the port struct
> + * via get_port_from_id().
[...]
> + port->hvc = hvc_alloc(port->id, 0, &virtio_cons, PAGE_SIZE);
I am not sure if this is going to be ok.
When I change the old code (without your patch) to use vtermno=0 in
hvc_instantiate and vtermno=1 in hvc_alloc I get
"Warning: unable to open an initial console."
It seems to me that we have to pass the same values.
Christian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists