History log of /kvmtool/hw/serial.c (Results 26 – 50 of 74)
Revision Date Author Comments
# d2ea115d 10-Dec-2011 Thomas Gleixner <tglx@linutronix.de>

kvm tool: serial: Cleanup coding style

It's nice to align struct initializers, but random tab insertion into
the code flow is a horrible idea.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Si

kvm tool: serial: Cleanup coding style

It's nice to align struct initializers, but random tab insertion into
the code flow is a horrible idea.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 610a82c4 09-Dec-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Fix serial port probing

The process of probing the 8250 serial port is as follows:

1. Start detecting IRQs

2. Enable the IER register [At this point, the port is supposed to light
th

kvm tools: Fix serial port probing

The process of probing the 8250 serial port is as follows:

1. Start detecting IRQs

2. Enable the IER register [At this point, the port is supposed to light
the INTR].

3. Stop detecting IRQs [At this point, the driver detects which IRQ
belongs to that port].

4. Disable IER register.

Since we weren't enabling and disabling the IRQ based on IER writes, we
would often fail the probing since the driver couldn't detect which IRQ
is used by the port, and would just default that to 0.

This would cause slowness and may have caused hangs. For me there is a
significant increase in speed of the terminal after this patch.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
[ penberg@kernel.org: whitspace cleanup ]
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 479de16f 27-Oct-2011 Cyrill Gorcunov <gorcunov@gmail.com>

kvm tools: Use ARRAY_SIZE helper to count serial devices

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 1add4b76 16-Sep-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Allow remapping guest TTY into host PTS

This patch adds the '-tty' option to 'kvm run' which allows the user to
remap a guest TTY into a PTS on the host.

Usage:
'kvm run --tty [i

kvm tools: Allow remapping guest TTY into host PTS

This patch adds the '-tty' option to 'kvm run' which allows the user to
remap a guest TTY into a PTS on the host.

Usage:
'kvm run --tty [id]'

The tty will be mapped to a pts and will be printed on the screen:
' Info: Assigned terminal 1 to pty /dev/pts/X'

At this point, it is possible to communicate with the guest using that pty.

This is useful for debugging guest kernel using KGDB:

1. Run the guest:
'kvm run -k [vmlinuz] -p "kgdboc=ttyS1 kgdbwait" --tty 1'

And see which PTY got assigned to ttyS1.

2. Run GDB on the host:
'gdb [vmlinuz]'

3. Connect to the guest (from within GDB):
'target remote /dev/pty/X'

4. Start debugging! (enter 'continue' to continue boot).

Cc: David Evensky <evensky@dancer.ca.sandia.gov>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>

show more ...


# c9f6a037 18-Aug-2011 Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>

kvm tools: remove count in io emulation callbacks

'count' parameter in io emulation callbacks is useless, just remove it

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by:

kvm tools: remove count in io emulation callbacks

'count' parameter in io emulation callbacks is useless, just remove it

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# f3efa592 12-Aug-2011 Liming Wang <walimisdev@gmail.com>

kvm tools: unify all serials' registers with the first serial

To make all serials work well, unify value of the last three
serials' registers with the first serial. Otherwise, using ttyS1,
ttyS2, tt

kvm tools: unify all serials' registers with the first serial

To make all serials work well, unify value of the last three
serials' registers with the first serial. Otherwise, using ttyS1,
ttyS2, ttyS3 as console will slow the output.

Signed-off-by: Liming Wang <walimisdev@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 3d62dea6 26-May-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Add optional parameter used in ioport callbacks

Allow specifying an optional parameter when registering an
ioport range. The callback functions provided by the registering
module will be

kvm tools: Add optional parameter used in ioport callbacks

Allow specifying an optional parameter when registering an
ioport range. The callback functions provided by the registering
module will be called with the same parameter.

This may be used to keep context during callbacks on IO operations.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# bf459c83 21-May-2011 Pekka Enberg <penberg@kernel.org>

kvm tools, serial: Register 0x2e8 ioport

We already register ioports for 0x2f8 and 0x3e8 and mark them as inactive so
mark 0x2e8 ioport as such as well. This is a preparational step to dropping
ser

kvm tools, serial: Register 0x2e8 ioport

We already register ioports for 0x2f8 and 0x3e8 and mark them as inactive so
mark 0x2e8 ioport as such as well. This is a preparational step to dropping
serial port dummy registrations from ioport__setup_legacy().

Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# f5fc024d 18-May-2011 Pekka Enberg <penberg@kernel.org>

kvm tools: Move hardware drivers to hw directory

This patch moves hypervisor native hardware emulation drivers to "hw" directory
like we've done for virtio and disk image code.

Acked-by: Cyrill Gor

kvm tools: Move hardware drivers to hw directory

This patch moves hypervisor native hardware emulation drivers to "hw" directory
like we've done for virtio and disk image code.

Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 43835ac9 11-May-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Rename 'self' variables

Give proper names to vars named 'self'.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 3fdf659d 05-May-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Abolishment of uint*_t types

Clean uint*_t type from the code.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 4ef0f4d6 09-Apr-2011 Pekka Enberg <penberg@kernel.org>

kvm tools: Use mutex_lock() and mutex_unlock() wrappers

This patch implements less hostile mutex_lock() and mutex_lock() wrappers on
top of the pthread API equivalents as suggested by Ingo Molnar:

kvm tools: Use mutex_lock() and mutex_unlock() wrappers

This patch implements less hostile mutex_lock() and mutex_lock() wrappers on
top of the pthread API equivalents as suggested by Ingo Molnar:

glibc/pthreads mutex API semantics are pretty silly IMO.

I *think* it would be better to try to match the kernel API here, and provide
trivial wrappers around mutex_lock()/mutex_unlock(). We wont ever bring down
threads in a hostile way, so we wont actually need the error returns. CPU
threads should probably only exit once the kvm process exits, after all
cleanup has been done.

That way usage would be more obvious and more familar to kernel developers :-)

[ It would also open up the possibility, in the far future, to bring lockdep to
user-space ;-) ]

Cc: Asias He <asias.hejun@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 04d76d86 09-Apr-2011 Pekka Enberg <penberg@kernel.org>

kvm tools: Fix pthread mutex error checks

The pthread_mutex_{lock|unlock} functions return non-zero, not negative number
upon error. Fix that wrong assumption in the code.

Cc: Asias He <asias.hejun

kvm tools: Fix pthread mutex error checks

The pthread_mutex_{lock|unlock} functions return non-zero, not negative number
upon error. Fix that wrong assumption in the code.

Cc: Asias He <asias.hejun@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 2932c9eb 09-Apr-2011 Pekka Enberg <penberg@kernel.org>

kvm tools: Make 8250 code thread-safe

In preparation for threaded execution, make 8250 code thread safe by
introducing a per-device mutex.

Cc: Asias He <asias.hejun@gmail.com>
Cc: Cyrill Gorcunov <

kvm tools: Make 8250 code thread-safe

In preparation for threaded execution, make 8250 code thread safe by
introducing a per-device mutex.

Cc: Asias He <asias.hejun@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 0ea58e5b 08-Apr-2011 Pekka Enberg <penberg@kernel.org>

kvm tools: Make code mostly checkpatch clean

This patch fixes code style issues pointed out by scripts/checkpatch. However,
some reported errors are false positives. In particular, the warning:

W

kvm tools: Make code mostly checkpatch clean

This patch fixes code style issues pointed out by scripts/checkpatch. However,
some reported errors are false positives. In particular, the warning:

WARNING: line over 80 characters

is too strict for our code and thus needs to action to be taken.

Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# a428f72e 08-Apr-2011 Pekka Enberg <penberg@kernel.org>

kvm tools: Send SysRq-P to guest kernel on SIGQUIT

This patch makes SIGQUIT to the host hypervisor send 'SysRq-P' to the guest
kernel via 8250 serial console to make debugging stuck guests easier.

kvm tools: Send SysRq-P to guest kernel on SIGQUIT

This patch makes SIGQUIT to the host hypervisor send 'SysRq-P' to the guest
kernel via 8250 serial console to make debugging stuck guests easier.

Cc: Asias He <asias.hejun@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 05d1a2a6 08-Apr-2011 Asias He <asias.hejun@gmail.com>

kvm tools: Make 8250 serial use infrastructure provided by term.c

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 8eb47d29 06-Apr-2011 Sasha Levin <levinsasha928@gmail.com>

kvm tools: Fix input hang when compiling without optimization

When compiling without optimizations (-O0) input would hang.
This was caused by poll() returning there was data to read but read()
faili

kvm tools: Fix input hang when compiling without optimization

When compiling without optimizations (-O0) input would hang.
This was caused by poll() returning there was data to read but read()
failing.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# b4068fdf 06-Apr-2011 Pekka Enberg <penberg@kernel.org>

kvm tools: Use STDIN_FILENO instead of fileno(stdin)

To cleanup the serial console emulation code, use STDIN_FILENO which is POSIX
API instead of fileno(stdin) which is libc API.

Signed-off-by: Pek

kvm tools: Use STDIN_FILENO instead of fileno(stdin)

To cleanup the serial console emulation code, use STDIN_FILENO which is POSIX
API instead of fileno(stdin) which is libc API.

Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# db34045c 24-Mar-2011 Pekka Enberg <penberg@kernel.org>

kvm tools, 8250: Don't set the UART_LSR_OE bit

User input is buffered anyway, so it's pointless to set the UART_LSR_OE bit.
Instead, wait for the guest kernel to consume the current input and send a

kvm tools, 8250: Don't set the UART_LSR_OE bit

User input is buffered anyway, so it's pointless to set the UART_LSR_OE bit.
Instead, wait for the guest kernel to consume the current input and send a new
character when the guest is ready.

This fixes the following warnings in guest kernels:

[ 207.485000] ttyS0: 1 input overrun(s)

Reported-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# bc4b0ffe 23-Jan-2011 Pekka Enberg <penberg@kernel.org>

kvm,8250: Fix device initial state

This patch fixes 8250 device initial state for registers and IRQ based on what
Qemu does.

Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 369c01c0 11-Jan-2011 Pekka Enberg <penberg@kernel.org>

kvm,serial: Implement 16550A FIFO support

This patch implements 16550A FIFO support to the serial console emulation
layer. There's still a bug lurking somewhere which the hypervisor in some busy
loo

kvm,serial: Implement 16550A FIFO support

This patch implements 16550A FIFO support to the serial console emulation
layer. There's still a bug lurking somewhere which the hypervisor in some busy
loop taking up 100% of CPU. However, this patch is a definite improvement over
the previous hacks.

Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 19a2bb7d 11-Jan-2011 Pekka Enberg <penberg@kernel.org>

kvm,8250: Implement missing register emulation

This patch implements missing register emulation as per "UART register to port
conversion table" here:

http://www.lammertbies.nl/comm/info/serial-ua

kvm,8250: Implement missing register emulation

This patch implements missing register emulation as per "UART register to port
conversion table" here:

http://www.lammertbies.nl/comm/info/serial-uart.html

Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


# 855a6371 11-Jan-2011 Cyrill Gorcunov <gorcunov@gmail.com>

8250-serial: Emulate 8250 behaviour on autoprobing

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>


# 251cf9a6 10-Jan-2011 Pekka Enberg <penberg@kernel.org>

kvm,8250: Cleanup receive emulation

This patch cleans up receive emulation by separating the stdin polling and
reading logic from the interrupt logic. The patch also fixes the interrupt
injection co

kvm,8250: Cleanup receive emulation

This patch cleans up receive emulation by separating the stdin polling and
reading logic from the interrupt logic. The patch also fixes the interrupt
injection code to inject one type of interrupt at a time.

Signed-off-by: Pekka Enberg <penberg@kernel.org>

show more ...


123