From: Richard Henderson <richard.henderson@linaro.org>
To: "Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Gregory Price" <gregory.price@memverge.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Sajjan Rao" <sajjanr@gmail.com>,
"Dimitrios Palyvos" <dimitrios.palyvos@zptcorp.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>
Cc: linux-cxl@vger.kernel.org
Subject: Re: [PATCH 2/3] target/i386: Enable page walking from MMIO memory
Date: Thu, 15 Feb 2024 09:21:50 -1000 [thread overview]
Message-ID: <cde1076c-d4bc-4e2f-9319-9eb37d24eef5@linaro.org> (raw)
In-Reply-To: <20240215150133.2088-3-Jonathan.Cameron@huawei.com>
On 2/15/24 05:01, Jonathan Cameron wrote:
> -static bool ptw_translate(PTETranslate *inout, hwaddr addr)
> +static bool ptw_translate(PTETranslate *inout, hwaddr addr, uint64_t ra)
You do not need to pass in 'ra' here...
> flags = probe_access_full(inout->env, addr, 0, MMU_DATA_STORE,
> - inout->ptw_idx, true, &inout->haddr, &full, 0);
> + inout->ptw_idx, true, &inout->haddr, &full, ra);
... because this ^^^^
indicates a non-fault probe.
A return address is only required for a faulting probe to raise an exception.
> -static inline uint32_t ptw_ldl(const PTETranslate *in)
> +static inline uint32_t ptw_ldl(const PTETranslate *in, uint64_t ra)
> {
> if (likely(in->haddr)) {
> return ldl_p(in->haddr);
> }
> - return cpu_ldl_mmuidx_ra(in->env, in->gaddr, in->ptw_idx, 0);
> + return cpu_ldl_mmuidx_ra(in->env, in->gaddr, in->ptw_idx, ra);
> }
However the loads do require 'ra' for the io_recompile, as you saw from the backtrace.
r~
next prev parent reply other threads:[~2024-02-15 19:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 15:01 [PATCH 0/3 qemu] tcg/i386: Page tables in MMIO memory fixes (CXL) Jonathan Cameron via
2024-02-15 15:01 ` [PATCH 1/3] accel/tcg: Set can_do_io at at start of lookup_tb_ptr helper Jonathan Cameron via
2024-02-15 15:11 ` Peter Maydell
2024-02-15 16:04 ` Jonathan Cameron via
2024-02-15 19:11 ` Richard Henderson
2024-02-15 15:01 ` [PATCH 2/3] target/i386: Enable page walking from MMIO memory Jonathan Cameron via
2024-02-15 15:31 ` Philippe Mathieu-Daudé
2024-02-15 15:56 ` Jonathan Cameron via
2024-02-15 19:21 ` Richard Henderson [this message]
2024-02-15 19:31 ` Richard Henderson
2024-02-15 15:01 ` [PATCH 3/3] tcg: Avoid double lock if page tables happen to be in mmio memory Jonathan Cameron via
2024-02-15 15:33 ` Philippe Mathieu-Daudé
2024-02-15 16:11 ` Jonathan Cameron via
2024-02-15 16:11 ` Peter Maydell
2024-02-15 17:34 ` Jonathan Cameron via
2024-02-15 19:30 ` Richard Henderson
2024-02-19 12:14 ` Jonathan Cameron via
2024-02-20 11:56 ` Alex Bennée
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=cde1076c-d4bc-4e2f-9319-9eb37d24eef5@linaro.org \
--to=richard.henderson@linaro.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=alex.bennee@linaro.org \
--cc=dimitrios.palyvos@zptcorp.com \
--cc=eduardo@habkost.net \
--cc=gregory.price@memverge.com \
--cc=linux-cxl@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sajjanr@gmail.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 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).