All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Alrae <leon.alrae@imgtec.com>
To: Igor R <boost.lists@gmail.com>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] cpu_memory_rw_debug doesn't work on MIPS?
Date: Fri, 26 Feb 2016 10:54:53 +0000	[thread overview]
Message-ID: <56D02EFD.6080909@imgtec.com> (raw)
In-Reply-To: <CAPnv1PLx34rBHiodN10kNgbFxLdWOTYcULE2JuU1X0dk+fj3wg@mail.gmail.com>

On 25/02/16 18:56, Igor R wrote:
> If I understand correctly, the most advanced MMU that QEMU emulates
> for MIPS is "R4000-style" MMU - i.e. a "software-managed" TLB, where
> on TLB miss QEMU just emulates exception that should be handled by the
> guest OS. So, QEMU doesn't walk through the page directory, like it
> does when emulating e.g. x86.

Yes, most of QEMU MIPS CPUs support R4000-style MMU. MIPS Hardware Table
Walker was introduced in release 5 of MIPS Architecture, and implemented
in P5600. However, HTW isn't present in QEMU yet.

> While this approach works for the guest code, it results in inability
> to read guest virtual memory "externally" - from within a monitor
> command, for debugging purposes etc. That is, cpu_memory_rw_debug()
> doesn't work reliably for mapped segments - it fails because of TLB
> miss, but no one tries to fill the TLB.

Indeed, given virtual address (belonging to mapped segments like kseg2)
without mapping is quite useless without involving guest's TLB-miss handler.

> If all the above correct, is there any work-around that can be used to
> read the guest memory in qemu-system-mips?

QEMU monitor provides also physical memory dump but obviously you need
to know the physical address. Otherwise - if you want to use virtual
address from mapped segment - you need to read the memory while there's
valid TLB entry.

Leon

> 
> Thanks.
> 

      reply	other threads:[~2016-02-26 10:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 18:56 [Qemu-devel] cpu_memory_rw_debug doesn't work on MIPS? Igor R
2016-02-26 10:54 ` Leon Alrae [this message]

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=56D02EFD.6080909@imgtec.com \
    --to=leon.alrae@imgtec.com \
    --cc=boost.lists@gmail.com \
    --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.