From: Sasha Levin <levinsasha928@gmail.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com,
gorcunov@gmail.com, David Evensky <evensky@dancer.ca.sandia.gov>
Subject: Re: [PATCH] kvm tools: Allow remapping guest TTY into host PTS
Date: Thu, 15 Sep 2011 15:28:46 +0300 [thread overview]
Message-ID: <1316089726.3743.15.camel@lappy> (raw)
In-Reply-To: <CAOJsxLGhqCX5ELkAc_CRN_NYvostVf_dvfmtz=syjZy37=MhLw@mail.gmail.com>
On Thu, 2011-09-15 at 12:32 +0300, Pekka Enberg wrote:
> On Thu, Sep 15, 2011 at 11:53 AM, Sasha Levin <levinsasha928@gmail.com> 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@dancer.ca.sandia.gov>
> > Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
>
> Neat! Would a tools/kvm/Documentation/debugging.txt be helpful for
> people who want to do kernel debugging with kvmtool?
I'll write a basic doc with the details provided above.
David, does this patch allows you to properly debug guest kernels? If
so, could you mail back any issues or hacks you had to do to set it up
so I could add it to the doc and move it into 'Documentation/'?
--
Sasha.
next prev parent reply other threads:[~2011-09-15 12:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 8:53 [PATCH] kvm tools: Allow remapping guest TTY into host PTS Sasha Levin
2011-09-15 9:32 ` Pekka Enberg
2011-09-15 12:28 ` Sasha Levin [this message]
2011-09-15 16:52 ` David Evensky
2011-09-15 17:09 ` Sasha Levin
2011-09-16 2:22 ` Asias He
2011-09-18 14:30 ` Hagen Paul Pfeifer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1316089726.3743.15.camel@lappy \
--to=levinsasha928@gmail.com \
--cc=asias.hejun@gmail.com \
--cc=evensky@dancer.ca.sandia.gov \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=penberg@cs.helsinki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox