All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Jun Koi <junkoi2004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Kernel debugging with KVM?
Date: Sat, 27 Jan 2007 10:36:29 +0200	[thread overview]
Message-ID: <45BB0F0D.7090105@qumranet.com> (raw)
In-Reply-To: <fdaac4d50701262304p56acbdaakb71b326fcb1c57eb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Jun Koi wrote:
> Hi,
>
> I am investigating the possibility of debugging guest kernel with KVM.
> Anybody may shed some lights into how KVM handles breakpoints?
>
> Suppose that we put a breakpoint (0xCC opcode in x86) into guest
> kernel. When the kernel hits the breakpoint, which one will handle the
> event?
>
> Looks like qemu will handle the breakpoint first, then next the guest
> kernel itself have a chance to process it. Is that correct?
>
> And is there any chance for the host (VMM) to get notified about the event?
>
>   

kvm supports using hardware breakpoints to debug a guest.  See the 
KVM_GUEST_DEBUG ioctl.

The modified qemu shipped with kvm allows gdb to connect and debug a kvm 
guest.  It's been a long while since I tested this, so it may or may not 
work.


-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

      parent reply	other threads:[~2007-01-27  8:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-27  7:04 Kernel debugging with KVM? Jun Koi
     [not found] ` <fdaac4d50701262304p56acbdaakb71b326fcb1c57eb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-01-27  8:36   ` Avi Kivity [this message]

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=45BB0F0D.7090105@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=junkoi2004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.