From: "Wu, Fei" <fei2.wu@intel.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Richard Henderson <richard.henderson@linaro.org>,
<alex.bennee@linaro.org>, <qemu-devel@nongnu.org>,
"Vanderson M. do Rosario" <vandersonmr2@gmail.com>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
"Dr. David Alan Gilbert" <dave@treblig.org>
Subject: Re: [PATCH v14 08/10] Adding info [tb-list|tb] commands to HMP (WIP)
Date: Mon, 12 Jun 2023 09:20:18 +0800 [thread overview]
Message-ID: <8b126f3d-906a-bd0b-01d7-3603f3d48568@intel.com> (raw)
In-Reply-To: <CAFEAcA8+aw0Nd7tA7667RrGg+AZDf4MsAJs+_GP4nhdpXQwnRA@mail.gmail.com>
On 6/9/2023 11:51 PM, Peter Maydell wrote:
> On Fri, 9 Jun 2023 at 15:32, Wu, Fei <fei2.wu@intel.com> wrote:
>>
>> On 6/8/2023 5:23 PM, Peter Maydell wrote:
>>> On Thu, 8 Jun 2023 at 08:44, Wu, Fei <fei2.wu@intel.com> wrote:
>>>> Is there any existing function to convert ram_addr_t to guest pa?
>>>
>>> Such a function would not be well-defined, because a block of RAM
>>> as specified by a ram_addr_t could be present at (aliased to) multiple
>>> guest physical addresses, or even currently not mapped to any guest
>>> physical address at all. And it could be present at different physical
>>> addresses for different vCPUs.
>>>
>> Thank you, Peter. What's the scenario of the last different physical
>> addresses for different vCPUs?
>
> You can have a board with two different CPUs, where one of them
> has a RAM MemoryRegion that it puts at address A in its address
> space, and the other puts it at address B. This is most likely
> with 'heterogenous' configurations where you have an application
> processor A and a board-support processor B. (I don't know if
> we actually have any board models like that currently, but it's
> logically possible.)
>
>> For this specific case, I found I don't have to convert ram_addr_t to
>> gpa, the real requirement is converting ram_addr_t to hva, this one
>> seems well defined using qemu_map_ram_ptr(0, ram_addr) ?
>
> That does work for ram_addr_t to hva, but
> but note the warning on the comment above that function:
> you need to be in an RCU critical section to avoid some other
> thread coming along and de-allocating the RAM under your feet.
>
> (Also it's tempting to remove that support for passing in 0
> as the RAMBlock, because every other use in the codebase seems
> to pass in a RAMBlock pointer.)
>
Got it, thank you very much.
Fei.
> thanks
> -- PMM
next prev parent reply other threads:[~2023-06-12 1:21 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 8:35 [PATCH v14 00/10] TCG code quality tracking Fei Wu
2023-05-30 8:35 ` [PATCH v14 01/10] accel/tcg: remove CONFIG_PROFILER Fei Wu
2023-05-30 8:35 ` [PATCH v14 02/10] accel/tcg: introduce TBStatistics structure Fei Wu
2023-05-31 23:59 ` Richard Henderson
2023-06-01 1:30 ` Wu, Fei
2023-06-01 2:48 ` Richard Henderson
2023-06-01 0:01 ` Richard Henderson
2023-06-01 3:19 ` Wu, Fei
2023-06-01 4:16 ` Richard Henderson
2023-06-01 5:36 ` Wu, Fei
2023-05-30 8:35 ` [PATCH v14 03/10] accel: collecting TB execution count Fei Wu
2023-06-01 0:05 ` Richard Henderson
2023-06-01 5:44 ` Wu, Fei
2023-06-01 14:03 ` Richard Henderson
2023-06-02 1:54 ` Wu, Fei
2023-06-02 4:02 ` Richard Henderson
2023-05-30 8:35 ` [PATCH v14 04/10] accel/tcg: add jit stats and time to TBStatistics Fei Wu
2023-05-30 9:37 ` Markus Armbruster
2023-05-31 0:54 ` Wu, Fei
2023-06-01 1:08 ` Richard Henderson
2023-06-01 6:48 ` Wu, Fei
2023-06-01 14:10 ` Richard Henderson
2023-06-01 15:10 ` Richard Henderson
2023-05-30 8:35 ` [PATCH v14 05/10] debug: add -d tb_stats to control TBStatistics collection: Fei Wu
2023-06-01 1:18 ` Richard Henderson
2023-06-01 6:59 ` Wu, Fei
2023-05-30 8:35 ` [PATCH v14 06/10] monitor: adding tb_stats hmp command Fei Wu
2023-06-01 1:23 ` Richard Henderson
2023-06-01 7:20 ` Wu, Fei
2023-06-01 14:25 ` Richard Henderson
2023-05-30 8:35 ` [PATCH v14 07/10] tb-stats: reset the tracked TBs on a tb_flush Fei Wu
2023-06-01 1:30 ` Richard Henderson
2023-06-01 7:22 ` Wu, Fei
2023-05-30 8:35 ` [PATCH v14 08/10] Adding info [tb-list|tb] commands to HMP (WIP) Fei Wu
2023-06-01 2:40 ` Richard Henderson
2023-06-01 12:12 ` Wu, Fei
2023-06-06 7:30 ` Wu, Fei
2023-06-07 12:49 ` Wu, Fei
2023-06-08 7:38 ` Wu, Fei
2023-06-08 9:23 ` Peter Maydell
2023-06-08 12:06 ` Dr. David Alan Gilbert
2023-06-08 12:22 ` Peter Maydell
2023-06-09 14:32 ` Wu, Fei
2023-06-09 15:51 ` Peter Maydell
2023-06-12 1:20 ` Wu, Fei [this message]
2023-05-30 8:35 ` [PATCH v14 09/10] tb-stats: dump hot TBs at the end of the execution Fei Wu
2023-05-30 8:35 ` [PATCH v14 10/10] docs: add tb-stats how to Fei Wu
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=8b126f3d-906a-bd0b-01d7-3603f3d48568@intel.com \
--to=fei2.wu@intel.com \
--cc=alex.bennee@linaro.org \
--cc=dave@treblig.org \
--cc=dgilbert@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=vandersonmr2@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).