All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH v3 1/2] Guest debugging support for KVM
Date: Tue, 10 Mar 2009 17:51:24 +0100	[thread overview]
Message-ID: <49B69A8C.7050403@siemens.com> (raw)
In-Reply-To: <f43fc5580903100919l17cfc578ne0f5e0d1353fd513@mail.gmail.com>

Blue Swirl wrote:
> On 3/8/09, Jan Kiszka <jan.kiszka@web.de> wrote:
>> This is a backport of the guest debugging support for the KVM
>>  accelerator that is now part of the KVM tree. It implements the reworked
>>  KVM kernel API for guest debugging (KVM_CAP_SET_GUEST_DEBUG) which is
>>  not yet part of any mainline kernel but will probably be 2.6.30 stuff.
>>  So far supported is x86, but PPC is expected to catch up soon.
>>
>>  Core features are:
>>   - unlimited soft-breakpoints via code patching
>>   - hardware-assisted x86 breakpoints and watchpoints
> 
> The statically dimensioned arrays (hw_breakpoint[4], single
> hw_watchpoint) make me wonder what would happen in the SMP case. Or is
> only one CPU ever targeted at a time for debugging?
> 

We have 4 hardware watch- or breakpoint on x86. KVM is able to set them
per VCPU, that's why all relevant functions take a CPUState as argument.
So that API is highly flexible.

But, and that's the "famous" :) topic discussed here before /wrt plain
qemu: gdb has no multicore or SMP model yet so that per-CPU breakpoints
could be assigned and properly managed. Therefore qemu applies break-
and watchpoints to all virtual CPUs, and with this patch also in kvm
mode. That covers most of today's use cases, and with some care you can
even apply it to systems which run different memory mappings and
different code on their CPUs.

[ Reminds me that I should repost my vCont patch... ]

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

  reply	other threads:[~2009-03-10 16:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-08 21:09 [Qemu-devel] [PATCH v3 1/2] Guest debugging support for KVM Jan Kiszka
2009-03-10 16:19 ` Blue Swirl
2009-03-10 16:51   ` Jan Kiszka [this message]
2009-03-12 20:13 ` [Qemu-devel] " Anthony Liguori

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=49B69A8C.7050403@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.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.