All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kaiyuan <kaiyuanl@tju.edu.cn>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel <qemu-devel@nongnu.org>, Kaiyuan <kaiyuanl@tju.edu.cn>
Subject: Re: [Qemu-devel] How address_space_rw works?
Date: Fri, 10 Apr 2015 12:47:12 +0800 (GMT+08:00)	[thread overview]
Message-ID: <AAgAtwDlAIwL0Enoi5Dzhqo7.3.1428641232591.Hmail.2014218038@tju.edu.cn> (raw)
In-Reply-To: <CAFEAcA-pfSFrT7fnkBP2XMY2Fz5W_gsziVm54TRkiKTBgna8eg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]

> That's because we have a fast-path for RAM accesses that directs
> them to the bit of host memory we're using as guest RAM:
>  * for KVM, the guest gets the host memory directly mapped and
>    accesses it without trapping out to userspace
>  * for TCG, our TLB data structure caches the guest-virtual-address
>    to host-virtual-address mapping, and the generated TCG code
>    does a fast inline lookup in this cache; if it hits then it
>    can load or store to the host memory without ever having to
>    come out to a C helper functionThanks for your explanation about fast path. I am reviewing and debugging code related to TCG.Where is the code location that I can set breakpoint to observe the fast path for R/W requests to RAM?Whether dose Qemu provide method to disable fast path so that I can set one breakpoint to catch all requests both MMIO and RAM?
> address_space_rw is one of the functions used in the slow path,
> which is taken for IO accesses, or for other corner cases like
> accessing memory with a debug watchpoint set. Note that not
> all accesses go through it; there are other ways to access the
> address space including the ldl_phys() functions, and TCG
> slow-path accesses go directly to io_mem_read/write because
> they've already dealt with the RAM case.
By debugging Qemu, I see call stack trace that io_writeb/io_readb ->... -> io_mem_read/write ->... -> address_space_rw. Can I catch all MMIO access requests by setting single breakpoint in io_writeeb or io_readb? Thank you very much.
-Kaiyuan Liang



[-- Attachment #2: Type: text/html, Size: 1909 bytes --]

  reply	other threads:[~2015-04-10  5:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09  8:34 [Qemu-devel] How address_space_rw works? Kaiyuan
2015-04-09  8:57 ` Peter Maydell
2015-04-10  4:47   ` Kaiyuan [this message]
2015-04-10  6:34     ` Paolo Bonzini
2015-04-10  7:47 Kaiyuan
2015-04-10  8:14 ` Paolo Bonzini
2015-04-13  3:41   ` Kaiyuan

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=AAgAtwDlAIwL0Enoi5Dzhqo7.3.1428641232591.Hmail.2014218038@tju.edu.cn \
    --to=kaiyuanl@tju.edu.cn \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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.