[PATCH 01/10] virtio: console: Add a __send_control_msg() that can send messages without a valid port

2010-04-05 Thread Amit Shah
We will introduce control messages that operate on the device as a whole rather than just ports. Make send_control_msg() a wrapper around __send_control_msg() which does not need a valid port. Signed-off-by: Amit Shah amit.s...@redhat.com --- drivers/char/virtio_console.c | 16 +++-

[PATCH 05/10] virtio: console: Remove config work handler

2010-04-05 Thread Amit Shah
We're going to switch to using control messages for port hot-plug and initial port discovery. Remove the config work handler which handled port hot-plug so far. Signed-off-by: Amit Shah amit.s...@redhat.com --- drivers/char/virtio_console.c | 64 + 1

[PATCH 04/10] virtio: console: Don't call hvc_remove() on unplugging console ports

2010-04-05 Thread Amit Shah
hvc_remove() has some bug which freezes other active hvc ports when one port is removed. So disable calling of hvc_remove() which deregisters a port with the hvc_console. If the hvc_console code calls into our get_chars() routine as a result of a poll operation, we will return -EPIPE and the

[PATCH 10/10] virtio: console: Add support for nonblocking write()s

2010-04-05 Thread Amit Shah
If the host port is not open, a write() should either just return if the file is opened in non-blocking mode, or block till the host port is opened. Also, don't spin till host consumes data for nonblocking ports. For non-blocking ports, we can do away with the spinning and reclaim the buffers

[PATCH 09/10] virtio: console: Rename wait_is_over() to will_read_block()

2010-04-05 Thread Amit Shah
We'll introduce a function that checks if write will block. Have function names that are similar for the two cases. Signed-off-by: Amit Shah amit.s...@redhat.com --- drivers/char/virtio_console.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 07/10] virtio: console: Use a control message to add ports

2010-04-05 Thread Amit Shah
Instead of the host and guest independently enumerating ports, switch to a control message to add ports where the host supplies the port number so there's no ambiguity or a possibility of a race between the host and the guest port numbers. We now no longer need the 'nr_ports' config value. Since

[PATCH 08/10] virtio: console: Don't always create a port 0 if using multiport

2010-04-05 Thread Amit Shah
If we're using multiport, there's no point in always creating a console port. Create the console port only if the host doesn't support multiport. Signed-off-by: Amit Shah amit.s...@redhat.com --- drivers/char/virtio_console.c | 33 +++-- 1 files changed, 15

A clocksource driver for HyperV

2010-04-05 Thread Ky Srinivasan
I am attaching a clocksource driver for HyperV. Signed-off-by: K. Y. Srinivasan ksriniva...@novell.com From: K. Y. Srinivasan ksriniva...@novell.com Subject: A clocksource for Linux guests hosted on HyperV. References: None Patch-mainline: This patch is a clocksource implementation suitable

A clocksource driver for HyperV

2010-04-05 Thread Ky Srinivasan
I am attaching a clocksource driver for HyperV. Signed-off-by: K. Y. Srinivasan ksriniva...@novell.com From: K. Y. Srinivasan ksriniva...@novell.com Subject: A clocksource for Linux guests hosted on HyperV. References: None Patch-mainline: This patch is a clocksource implementation suitable

Re: A clocksource driver for HyperV

2010-04-05 Thread Jeremy Fitzhardinge
On 04/05/2010 01:30 PM, Ky Srinivasan wrote: +static cycle_t read_hv_clock(struct clocksource *arg) +{ + cycle_t current_tick; + /* + * Read the partition counter to get the current tick count. This count + * is set to 0 when the partition is created and is incremented in

Re: [PATCH 07/10] virtio: console: Use a control message to add ports

2010-04-05 Thread Rusty Russell
On Mon, 5 Apr 2010 11:24:11 pm Amit Shah wrote: @@ -1431,13 +1414,20 @@ static int __devinit virtcons_probe(struct virtio_device *vdev) err = -ENOMEM; goto free_vqs; } + } Minor nit: gratuitous whitespace addition. Cheers,