qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Anton Johansson <anjo@rev.ng>, qemu-devel@nongnu.org
Cc: ale@rev.ng, pbonzini@redhat.com, philmd@linaro.org,
	agraf@csgraf.de, dirty@apple.com, rbolshakov@ddn.com,
	anielhb413@gmail.com, pasic@linux.ibm.com,
	borntraeger@linux.ibm.com, palmer@dabbelt.com,
	alistair.francis@wdc.com, bin.meng@windriver.com,
	ysato@users.sourceforge.jp, peter.maydell@linaro.org
Subject: Re: [PATCH 3/9] target: Use vaddr for kvm_arch_[insert|remove]_hw_breakpoint
Date: Thu, 27 Jul 2023 12:27:40 -0700	[thread overview]
Message-ID: <23d2a2d6-eb18-059a-a652-6abaac28a0dd@linaro.org> (raw)
In-Reply-To: <20230721205827.7502-4-anjo@rev.ng>

On 7/21/23 13:58, Anton Johansson wrote:
> Changes the signature of the target-defined functions for
> inserting/removing kvm hw breakpoints. The address and length arguments
> are now of vaddr type, which both matches the type used internally in
> accel/kvm/kvm-all.c and makes the api target-agnostic.
> 
> Signed-off-by: Anton Johansson <anjo@rev.ng>
> ---
>   include/sysemu/kvm.h   |  6 ++----
>   target/arm/kvm64.c     | 16 ++++++++--------
>   target/i386/kvm/kvm.c  | 15 +++++++--------
>   target/ppc/kvm.c       | 15 +++++++--------
>   target/s390x/kvm/kvm.c | 11 +++++------
>   5 files changed, 29 insertions(+), 34 deletions(-)
> 
> diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
> index 5670306dbf..19d87b20e8 100644
> --- a/include/sysemu/kvm.h
> +++ b/include/sysemu/kvm.h
> @@ -426,10 +426,8 @@ int kvm_arch_insert_sw_breakpoint(CPUState *cpu,
>                                     struct kvm_sw_breakpoint *bp);
>   int kvm_arch_remove_sw_breakpoint(CPUState *cpu,
>                                     struct kvm_sw_breakpoint *bp);
> -int kvm_arch_insert_hw_breakpoint(target_ulong addr,
> -                                  target_ulong len, int type);
> -int kvm_arch_remove_hw_breakpoint(target_ulong addr,
> -                                  target_ulong len, int type);
> +int kvm_arch_insert_hw_breakpoint(vaddr addr, vaddr len, int type);
> +int kvm_arch_remove_hw_breakpoint(vaddr addr, vaddr len, int type);
>   void kvm_arch_remove_all_hw_breakpoints(void);
>   
>   void kvm_arch_update_guest_debug(CPUState *cpu, struct kvm_guest_debug *dbg);
> diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
> index 94bbd9661f..c0750792cb 100644
> --- a/target/arm/kvm64.c
> +++ b/target/arm/kvm64.c
> @@ -49,32 +49,32 @@ void kvm_arm_init_debug(KVMState *s)
>       return;
>   }
>   
> -int kvm_arch_insert_hw_breakpoint(target_ulong addr,
> -                                  target_ulong len, int type)
> +int kvm_arch_insert_hw_breakpoint(vaddr addr, vaddr len, int type)
>   {
>       switch (type) {
>       case GDB_BREAKPOINT_HW:
> -        return insert_hw_breakpoint(addr);
> +        return insert_hw_breakpoint((target_ulong) addr);

No need for the casts.


r~


  reply	other threads:[~2023-07-27 20:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 20:58 [PATCH 0/9] Replace remaining target_ulong in system-mode accel Anton Johansson via
2023-07-21 20:58 ` [PATCH 1/9] accel/kvm: Widen pc/saved_insn for kvm_sw_breakpoint Anton Johansson via
2023-07-27 19:21   ` Richard Henderson
2023-07-21 20:58 ` [PATCH 2/9] accel/hvf: Widen pc/saved_insn for hvf_sw_breakpoint Anton Johansson via
2023-07-27 19:25   ` Richard Henderson
2023-07-21 20:58 ` [PATCH 3/9] target: Use vaddr for kvm_arch_[insert|remove]_hw_breakpoint Anton Johansson via
2023-07-27 19:27   ` Richard Henderson [this message]
2023-07-21 20:58 ` [PATCH 4/9] target: Use vaddr for hvf_arch_[insert|remove]_hw_breakpoint Anton Johansson via
2023-07-27 19:29   ` Richard Henderson
2023-07-21 20:58 ` [PATCH 5/9] Replace target_ulong with abi_ptr in cpu_[st|ld]*() Anton Johansson via
2023-07-27 23:48   ` Richard Henderson
2023-07-21 20:58 ` [PATCH 6/9] include/exec: typedef abi_ptr to vaddr in softmmu Anton Johansson via
2023-07-27 23:51   ` Richard Henderson
2023-07-21 20:58 ` [PATCH 7/9] include/exec: Widen tlb_hit/tlb_hit_page() Anton Johansson via
2023-07-27 23:52   ` Richard Henderson
2023-07-21 20:58 ` [PATCH 8/9] accel/tcg: Widen address arg. in tlb_compare_set() Anton Johansson via
2023-07-27 23:53   ` Richard Henderson
2023-07-21 20:58 ` [PATCH 9/9] accel/tcg: Update run_on_cpu_data static assert Anton Johansson via
2023-07-27 23:53   ` Richard Henderson

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=23d2a2d6-eb18-059a-a652-6abaac28a0dd@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=agraf@csgraf.de \
    --cc=ale@rev.ng \
    --cc=alistair.francis@wdc.com \
    --cc=anielhb413@gmail.com \
    --cc=anjo@rev.ng \
    --cc=bin.meng@windriver.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=dirty@apple.com \
    --cc=palmer@dabbelt.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rbolshakov@ddn.com \
    --cc=ysato@users.sourceforge.jp \
    /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;
as well as URLs for NNTP newsgroup(s).