All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Sarah Harris" <S.E.Harris@kent.ac.uk>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Sagar Karandikar" <sagark@eecs.berkeley.edu>,
	"David Hildenbrand" <david@redhat.com>,
	"Anthony Green" <green@moxielogic.com>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Thomas Huth" <thuth@redhat.com>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Taylor Simpson" <tsimpson@quicinc.com>,
	"Alistair Francis" <Alistair.Francis@wdc.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Guan Xuetao" <gxt@mprc.pku.edu.cn>,
	"Marek Vasut" <marex@denx.de>,
	"Yoshinori Sato" <ysato@users.sourceforge.jp>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Claudio Fontana" <cfontana@suse.de>,
	qemu-ppc@nongnu.org, "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	"Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Greg Kurz" <groug@kaod.org>,
	qemu-s390x@nongnu.org, qemu-arm@nongnu.org,
	"Michael Rolnik" <mrolnik@gmail.com>,
	"Stafford Horne" <shorne@gmail.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	qemu-riscv@nongnu.org,
	"Bastian Koppelmann" <kbastian@mail.uni-paderborn.de>,
	"Chris Wulff" <crwulff@gmail.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [PATCH v3 17/27] linux-user: Remove dead code
Date: Wed, 3 Mar 2021 16:17:25 +0100	[thread overview]
Message-ID: <0872e9eb-3fe1-8f93-d863-c5f39129b03e@vivier.eu> (raw)
In-Reply-To: <20210302145818.1161461-18-f4bug@amsat.org>

Le 02/03/2021 à 15:58, Philippe Mathieu-Daudé a écrit :
> We can not use watchpoints in user-mode emulation because we
> need the softmmu slow path to detect accesses to watchpointed
> memory. This code is expanded as empty stub in "hw/core/cpu.h"
> anyway, so we can drop it.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  linux-user/main.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/linux-user/main.c b/linux-user/main.c
> index 81f48ff54ed..d7af3ffbc22 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -200,7 +200,6 @@ CPUArchState *cpu_copy(CPUArchState *env)
>      CPUState *new_cpu = cpu_create(cpu_type);
>      CPUArchState *new_env = new_cpu->env_ptr;
>      CPUBreakpoint *bp;
> -    CPUWatchpoint *wp;
>  
>      /* Reset non arch specific state */
>      cpu_reset(new_cpu);
> @@ -211,13 +210,9 @@ CPUArchState *cpu_copy(CPUArchState *env)
>         Note: Once we support ptrace with hw-debug register access, make sure
>         BP_CPU break/watchpoints are handled correctly on clone. */
>      QTAILQ_INIT(&new_cpu->breakpoints);
> -    QTAILQ_INIT(&new_cpu->watchpoints);
>      QTAILQ_FOREACH(bp, &cpu->breakpoints, entry) {
>          cpu_breakpoint_insert(new_cpu, bp->pc, bp->flags, NULL);
>      }
> -    QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) {
> -        cpu_watchpoint_insert(new_cpu, wp->vaddr, wp->len, wp->flags, NULL);
> -    }
>  
>      return new_env;
>  }
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>


WARNING: multiple messages have this Message-ID (diff)
From: Laurent Vivier <laurent@vivier.eu>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Sarah Harris" <S.E.Harris@kent.ac.uk>,
	"Chris Wulff" <crwulff@gmail.com>,
	"Sagar Karandikar" <sagark@eecs.berkeley.edu>,
	"David Hildenbrand" <david@redhat.com>,
	"Anthony Green" <green@moxielogic.com>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Taylor Simpson" <tsimpson@quicinc.com>,
	"Alistair Francis" <Alistair.Francis@wdc.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Guan Xuetao" <gxt@mprc.pku.edu.cn>,
	"Marek Vasut" <marex@denx.de>,
	"Yoshinori Sato" <ysato@users.sourceforge.jp>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Claudio Fontana" <cfontana@suse.de>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Greg Kurz" <groug@kaod.org>,
	qemu-s390x@nongnu.org, qemu-arm@nongnu.org,
	"Michael Rolnik" <mrolnik@gmail.com>,
	"Stafford Horne" <shorne@gmail.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	qemu-riscv@nongnu.org,
	"Bastian Koppelmann" <kbastian@mail.uni-paderborn.de>,
	"Cornelia Huck" <cohuck@redhat.com>,
	qemu-ppc@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [PATCH v3 17/27] linux-user: Remove dead code
Date: Wed, 3 Mar 2021 16:17:25 +0100	[thread overview]
Message-ID: <0872e9eb-3fe1-8f93-d863-c5f39129b03e@vivier.eu> (raw)
In-Reply-To: <20210302145818.1161461-18-f4bug@amsat.org>

Le 02/03/2021 à 15:58, Philippe Mathieu-Daudé a écrit :
> We can not use watchpoints in user-mode emulation because we
> need the softmmu slow path to detect accesses to watchpointed
> memory. This code is expanded as empty stub in "hw/core/cpu.h"
> anyway, so we can drop it.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  linux-user/main.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/linux-user/main.c b/linux-user/main.c
> index 81f48ff54ed..d7af3ffbc22 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -200,7 +200,6 @@ CPUArchState *cpu_copy(CPUArchState *env)
>      CPUState *new_cpu = cpu_create(cpu_type);
>      CPUArchState *new_env = new_cpu->env_ptr;
>      CPUBreakpoint *bp;
> -    CPUWatchpoint *wp;
>  
>      /* Reset non arch specific state */
>      cpu_reset(new_cpu);
> @@ -211,13 +210,9 @@ CPUArchState *cpu_copy(CPUArchState *env)
>         Note: Once we support ptrace with hw-debug register access, make sure
>         BP_CPU break/watchpoints are handled correctly on clone. */
>      QTAILQ_INIT(&new_cpu->breakpoints);
> -    QTAILQ_INIT(&new_cpu->watchpoints);
>      QTAILQ_FOREACH(bp, &cpu->breakpoints, entry) {
>          cpu_breakpoint_insert(new_cpu, bp->pc, bp->flags, NULL);
>      }
> -    QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) {
> -        cpu_watchpoint_insert(new_cpu, wp->vaddr, wp->len, wp->flags, NULL);
> -    }
>  
>      return new_env;
>  }
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>


  reply	other threads:[~2021-03-03 15:19 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 14:57 [PATCH v3 00/27] cpu: Introduce SysemuCPUOps structure, remove watchpoints from usermode Philippe Mathieu-Daudé
2021-03-02 14:57 ` Philippe Mathieu-Daudé
2021-03-02 14:57 ` [PATCH v3 01/27] target: Set CPUClass::vmsd instead of DeviceClass::vmsd Philippe Mathieu-Daudé
2021-03-02 14:57   ` Philippe Mathieu-Daudé
2021-04-21 22:03   ` Eduardo Habkost
2021-04-21 22:03     ` Eduardo Habkost
2021-04-22  9:55     ` Philippe Mathieu-Daudé
2021-04-22  9:55       ` Philippe Mathieu-Daudé
2021-04-22 10:28       ` Peter Maydell
2021-04-22 10:28         ` Peter Maydell
2021-04-22 11:01         ` Philippe Mathieu-Daudé
2021-04-22 11:01           ` Philippe Mathieu-Daudé
2021-04-22 15:41           ` Philippe Mathieu-Daudé
2021-04-22 15:41             ` Philippe Mathieu-Daudé
2021-04-22 15:53             ` Peter Maydell
2021-04-22 15:53               ` Peter Maydell
2021-04-22 16:05               ` Philippe Mathieu-Daudé
2021-04-22 16:05                 ` Philippe Mathieu-Daudé
2021-03-02 14:57 ` [PATCH v3 02/27] cpu: Un-inline cpu_get_phys_page_debug and cpu_asidx_from_attrs Philippe Mathieu-Daudé
2021-03-02 14:57   ` Philippe Mathieu-Daudé
2021-03-02 14:57 ` [PATCH v3 03/27] cpu: Introduce cpu_virtio_is_big_endian() Philippe Mathieu-Daudé
2021-03-02 14:57   ` Philippe Mathieu-Daudé
2021-03-02 14:57 ` [PATCH v3 04/27] cpu: Directly use cpu_write_elf*() fallback handlers in place Philippe Mathieu-Daudé
2021-03-02 14:57   ` Philippe Mathieu-Daudé
2021-03-02 14:57 ` [PATCH v3 05/27] cpu: Directly use get_paging_enabled() " Philippe Mathieu-Daudé
2021-03-02 14:57   ` Philippe Mathieu-Daudé
2021-03-02 14:57 ` [PATCH v3 06/27] cpu: Directly use get_memory_mapping() " Philippe Mathieu-Daudé
2021-03-02 14:57   ` Philippe Mathieu-Daudé
2021-03-02 14:57 ` [PATCH v3 07/27] cpu: Introduce SysemuCPUOps structure Philippe Mathieu-Daudé
2021-03-02 14:57   ` Philippe Mathieu-Daudé
2021-03-03  5:18   ` Richard Henderson
2021-03-03  5:18     ` Richard Henderson
2021-03-02 14:57 ` [PATCH v3 08/27] cpu: Move CPUClass::vmsd to SysemuCPUOps Philippe Mathieu-Daudé
2021-03-02 14:57   ` Philippe Mathieu-Daudé
2021-03-02 14:58 ` [PATCH v3 09/27] cpu: Move CPUClass::virtio_is_big_endian " Philippe Mathieu-Daudé
2021-03-02 14:58   ` Philippe Mathieu-Daudé
2021-03-02 14:58 ` [PATCH v3 10/27] cpu: Move CPUClass::get_crash_info " Philippe Mathieu-Daudé
2021-03-02 14:58   ` Philippe Mathieu-Daudé
2021-03-02 14:58 ` [PATCH v3 11/27] cpu: Move CPUClass::write_elf* " Philippe Mathieu-Daudé
2021-03-02 14:58   ` Philippe Mathieu-Daudé
2021-03-02 14:58 ` [PATCH v3 12/27] cpu: Move CPUClass::asidx_from_attrs " Philippe Mathieu-Daudé
2021-03-02 14:58   ` Philippe Mathieu-Daudé
2021-03-02 14:58 ` [PATCH v3 13/27] cpu: Move CPUClass::get_phys_page_debug " Philippe Mathieu-Daudé
2021-03-02 14:58   ` Philippe Mathieu-Daudé
2021-03-02 14:58 ` [PATCH v3 14/27] cpu: Move CPUClass::get_memory_mapping " Philippe Mathieu-Daudé
2021-03-02 14:58   ` Philippe Mathieu-Daudé
2021-03-02 14:58 ` [PATCH v3 15/27] cpu: Move CPUClass::get_paging_enabled " Philippe Mathieu-Daudé
2021-03-02 14:58   ` Philippe Mathieu-Daudé
2021-03-02 14:58 ` [PATCH v3 16/27] cpu: Restrict "hw/core/sysemu-cpu-ops.h" to target/cpu.c Philippe Mathieu-Daudé
2021-03-02 14:58   ` Philippe Mathieu-Daudé
2021-03-02 14:58 ` [PATCH v3 17/27] linux-user: Remove dead code Philippe Mathieu-Daudé
2021-03-02 14:58   ` Philippe Mathieu-Daudé
2021-03-03 15:17   ` Laurent Vivier [this message]
2021-03-03 15:17     ` Laurent Vivier
2021-03-02 14:58 ` [PATCH v3 18/27] gdbstub: Remove watchpoint dead code in gdbserver_fork() Philippe Mathieu-Daudé
2021-03-02 14:58   ` Philippe Mathieu-Daudé

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=0872e9eb-3fe1-8f93-d863-c5f39129b03e@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=Alistair.Francis@wdc.com \
    --cc=S.E.Harris@kent.ac.uk \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=alex.bennee@linaro.org \
    --cc=atar4qemu@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=cfontana@suse.de \
    --cc=cohuck@redhat.com \
    --cc=crwulff@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=david@redhat.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=green@moxielogic.com \
    --cc=groug@kaod.org \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=jcmvbkbc@gmail.com \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=marex@denx.de \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mrolnik@gmail.com \
    --cc=mst@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sagark@eecs.berkeley.edu \
    --cc=shorne@gmail.com \
    --cc=thuth@redhat.com \
    --cc=tsimpson@quicinc.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 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.