Re: [PATCH] kvm tools: Allow remapping guest TTY into host PTS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 15, 2011 at 11:53 AM, Sasha Levin <levinsasha928@xxxxxxxxx> wrote:
> 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] [other options]'
>
> 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 "kdbgoc=ttyS1 kdbgwait" --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@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>

Neat! Would a tools/kvm/Documentation/debugging.txt be helpful for
people who want to do kernel debugging with kvmtool?
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux