qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH v3 1/2] Guest debugging support for KVM


From: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH v3 1/2] Guest debugging support for KVM
Date: Tue, 10 Mar 2009 17:51:24 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Blue Swirl wrote:
> On 3/8/09, Jan Kiszka <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]