qemu-devel
[Top][All Lists]
Advanced

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

Re: [PULL 034/126] softmmu: Extract watchpoint API from physmem.c


From: David Hildenbrand
Subject: Re: [PULL 034/126] softmmu: Extract watchpoint API from physmem.c
Date: Thu, 23 Mar 2023 10:00:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0

On 23.03.23 09:54, Philippe Mathieu-Daudé wrote:
On 27/2/23 15:00, Philippe Mathieu-Daudé wrote:
The watchpoint API is specific to TCG system emulation.

I'm seeing CPUWatchpoint being used by KVM:

$ git grep CPUWatchpoint|fgrep kvm
target/arm/kvm64.c:1558:        CPUWatchpoint *wp =
find_hw_watchpoint(cs, debug_exit->far);
target/i386/kvm/kvm.c:5216:static CPUWatchpoint hw_watchpoint;
target/ppc/kvm.c:443:static CPUWatchpoint hw_watchpoint;
target/s390x/kvm/kvm.c:139:static CPUWatchpoint hw_watchpoint;

Scrolling a bit in git-history:

commit e4482ab7e3849fb5e01ccacfc13f424cc6acb8d5
Author: Alex Bennée <alex.bennee@linaro.org>
Date:   Thu Dec 17 13:37:15 2015 +0000

      target-arm: kvm - add support for HW assisted debug

      This adds basic support for HW assisted debug. The ioctl interface
      to KVM allows us to pass an implementation defined number of break
      and watch point registers. When KVM_GUESTDBG_USE_HW is specified
      these debug registers will be installed in place on the world switch
      into the guest.

So it seems I missed something big.


Looks like :)

Yes, s390x also uses CPUWatchpoint to translate between a watch-point hit in kvm to a watchpoint hit in QEMU on KVM debug exits.

--
Thanks,

David / dhildenb




reply via email to

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