All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org,
	qemu-riscv@nongnu.org, qemu-s390x@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Zhao Liu" <zhao1.liu@intel.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Dr. David Alan Gilbert" <dave@treblig.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Alexandre Iooss" <erdnaxe@crans.org>,
	"Mahmoud Mandour" <ma.mandourr@gmail.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Chinmay Rath" <rathc@linux.ibm.com>,
	"Glenn Miles" <milesg@linux.ibm.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Weiwei Li" <liwei1518@gmail.com>,
	"Daniel Henrique Barboza" <daniel.barboza@oss.qualcomm.com>,
	"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
	"Chao Liu" <chao.liu.zevorn@gmail.com>,
	"Ilya Leoshkevich" <iii@linux.ibm.com>,
	"David Hildenbrand" <david@kernel.org>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	"Max Filippov" <jcmvbkbc@gmail.com>
Subject: Re: [PATCH v2 18/25] system/physmem: Use translate_for_debug() in cpu_memory_rw_debug()
Date: Wed, 6 May 2026 11:27:10 -0400	[thread overview]
Message-ID: <aftdzpB-hSjo7PEz@x1.local> (raw)
In-Reply-To: <20260430093810.2762539-19-peter.maydell@linaro.org>

On Thu, Apr 30, 2026 at 10:38:03AM +0100, Peter Maydell wrote:
> Currently cpu_memory_rw_debug() assumes page-granularity for translations,
> and it works in a loop where each iteration translates for the vaddr
> rounded down to a page boundary and then copies up to the end of the
> page boundary.
> 
> Rewrite it to use the new cpu_translate_for_debug(): we no longer want
> to round down the input address, and the boundary we copy up to is now
> determined by the lg_page_size it returns rather than being assumed
> to be page-sized.
> 
> This, together with the implementation of translate_for_debug for
> Arm targets, fixes the bug where semihosting would incorrectly
> fail to access parameter blocks that were in memory where the
> start of the 4K region they were in was inaccessible due to MPU
> region settings, even if the parameter block itself was readable.
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3292
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> Message-id: 20260417173105.1648172-18-peter.maydell@linaro.org

Acked-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu



  parent reply	other threads:[~2026-05-06 15:27 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30  9:37 [PATCH v2 00/25] Handle sub-page granularity in cpu_memory_rw_debug() Peter Maydell
2026-04-30  9:37 ` [PATCH v2 01/25] hw/i386/vapic: Cope with non-page-aligned return from cpu_get_phys_page_debug() Peter Maydell
2026-04-30 13:33   ` Philippe Mathieu-Daudé
2026-05-01  9:53   ` Richard Henderson
2026-05-07 16:44   ` Alex Bennée
2026-04-30  9:37 ` [PATCH v2 02/25] target/riscv: Make get_phys_page_debug handle non-page-aligned addrs Peter Maydell
2026-04-30  9:37 ` [PATCH v2 03/25] target/alpha: " Peter Maydell
2026-04-30  9:37 ` [PATCH v2 04/25] target/microblaze: Make get_phys_page_attrs_debug " Peter Maydell
2026-05-07 16:49   ` Alex Bennée
2026-04-30  9:37 ` [PATCH v2 05/25] target/sparc: Make get_phys_page_debug " Peter Maydell
2026-04-30  9:37 ` [PATCH v2 06/25] target/x86: Make get_phys_page_attrs_debug " Peter Maydell
2026-04-30  9:37 ` [PATCH v2 07/25] target/s390x: Make get_phys_page_debug " Peter Maydell
2026-05-07  9:59   ` Philippe Mathieu-Daudé
2026-04-30  9:37 ` [PATCH v2 08/25] target/ppc: " Peter Maydell
2026-04-30 15:02   ` Miles Glenn
2026-04-30  9:37 ` [PATCH v2 09/25] target: Rename get_phys_page_debug to get_phys_addr_debug Peter Maydell
2026-04-30  9:37 ` [PATCH v2 10/25] target: Rename cpu_get_phys_page_{,attrs_}debug Peter Maydell
2026-04-30  9:37 ` [PATCH v2 11/25] hw/core: Update docs for get_phys_addr_{attrs_, }debug Peter Maydell
2026-04-30  9:37 ` [PATCH v2 12/25] target/arm: Rename arm_cpu_get_phys_page() Peter Maydell
2026-04-30  9:37 ` [PATCH v2 13/25] monitor: hmp_gva2gpa: Don't page-align cpu_get_phys_addr_debug() arg and return Peter Maydell
2026-04-30  9:37 ` [PATCH v2 14/25] plugins/api.c: Trust cpu_get_phys_addr_debug() return address Peter Maydell
2026-04-30  9:38 ` [PATCH v2 15/25] hw/core: Implement new cpu_translate_for_debug() Peter Maydell
2026-05-01  9:56   ` Richard Henderson
2026-04-30  9:38 ` [PATCH v2 16/25] hw/core: Implement cpu_get_phys_addr_attrs_debug() with cpu_translate_for_debug() Peter Maydell
2026-05-07 13:28   ` Philippe Mathieu-Daudé
2026-04-30  9:38 ` [PATCH v2 17/25] target/arm: Implement translate_for_debug Peter Maydell
2026-05-01  9:57   ` Richard Henderson
2026-04-30  9:38 ` [PATCH v2 18/25] system/physmem: Use translate_for_debug() in cpu_memory_rw_debug() Peter Maydell
2026-05-01  9:58   ` Richard Henderson
2026-05-06 15:27   ` Peter Xu [this message]
2026-04-30  9:38 ` [PATCH v2 19/25] hw/i386/vapic.c: Use cpu_translate_for_debug() Peter Maydell
2026-04-30 14:31   ` Philippe Mathieu-Daudé
2026-04-30  9:38 ` [PATCH v2 20/25] target/sparc: " Peter Maydell
2026-05-01 10:00   ` Richard Henderson
2026-04-30  9:38 ` [PATCH v2 21/25] hw/xtensa: " Peter Maydell
2026-04-30 14:37   ` Philippe Mathieu-Daudé
2026-05-01 10:00   ` Richard Henderson
2026-04-30  9:38 ` [PATCH v2 22/25] target/xtensa/xtensa-semi: " Peter Maydell
2026-04-30 14:38   ` Philippe Mathieu-Daudé
2026-05-01 10:01   ` Richard Henderson
2026-04-30  9:38 ` [PATCH v2 23/25] monitor/hmp-cmds: " Peter Maydell
2026-04-30 14:39   ` Philippe Mathieu-Daudé
2026-05-01 10:01   ` Richard Henderson
2026-04-30  9:38 ` [PATCH v2 24/25] plugins/api.c: " Peter Maydell
2026-04-30 14:39   ` Philippe Mathieu-Daudé
2026-05-01 10:02   ` Richard Henderson
2026-04-30  9:38 ` [PATCH v2 25/25] Remove cpu_get_phys_addr_debug() and cpu_get_phys_addr_attrs_debug() Peter Maydell
2026-04-30 14:39   ` Philippe Mathieu-Daudé
2026-05-01 10:03   ` Richard Henderson
2026-05-07 17:08 ` [PATCH v2 00/25] Handle sub-page granularity in cpu_memory_rw_debug() 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=aftdzpB-hSjo7PEz@x1.local \
    --to=peterx@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=atar4qemu@gmail.com \
    --cc=chao.liu.zevorn@gmail.com \
    --cc=daniel.barboza@oss.qualcomm.com \
    --cc=dave@treblig.org \
    --cc=david@kernel.org \
    --cc=edgar.iglesias@gmail.com \
    --cc=erdnaxe@crans.org \
    --cc=iii@linux.ibm.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=liwei1518@gmail.com \
    --cc=ma.mandourr@gmail.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=milesg@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --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=rathc@linux.ibm.com \
    --cc=richard.henderson@linaro.org \
    --cc=wangyanan55@huawei.com \
    --cc=zhao1.liu@intel.com \
    --cc=zhiwei_liu@linux.alibaba.com \
    /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.