qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "陳韋任 (Wei-Ren Chen)" <chenwj@iis.sinica.edu.tw>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Is it possible to detect guest OS modifying pte inside QEMU?
Date: Wed, 8 Aug 2012 09:05:18 +0100	[thread overview]
Message-ID: <CAFEAcA-n5M9zkS=mDHLm1HAzurWRayLtm-0TY4ZN_Ax4CEpyGQ@mail.gmail.com> (raw)
In-Reply-To: <20120808073856.GA84469@cs.nctu.edu.tw>

On 8 August 2012 08:38, 陳韋任 (Wei-Ren Chen) <chenwj@iis.sinica.edu.tw> wrote:
>   Just for research, we are studying if we can leave the guest page
> table walk to underlying hardware rather than using software emulation
> (like current approach). So, maybe (if *doable*) we can use x86 hardware
> to help us to walk guest (like ARM) page table. The rough idea is we
> have to maintain a x86-format shadow page table for the corresponding
> ARM page table, point host cr3 to the shadow page table, and let x86
> hardware do its job. The problem is, we have to aware that guest is
> modifying its guest page table entry so that we can sync its corrsponding
> shadow page table. But, we still haven't find a good way to know when
> the guest OS is modifying guest page table entry.

Make it read-only for the guest, and then when you get the exception when
the guest tries to write it, you can (a) do what you need to do and (b)
emulate the failing write insn.

-- PMM

  reply	other threads:[~2012-08-08  8:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08  7:38 [Qemu-devel] Is it possible to detect guest OS modifying pte inside QEMU? 陳韋任 (Wei-Ren Chen)
2012-08-08  8:05 ` Peter Maydell [this message]
2012-08-08  8:33   ` 陳韋任 (Wei-Ren Chen)
2012-08-08 19:10     ` Blue Swirl
2012-08-09  3:15       ` 陳韋任 (Wei-Ren Chen)
2012-08-09 17:05         ` Blue Swirl
2012-08-10  7:42   ` 陳韋任 (Wei-Ren Chen)

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='CAFEAcA-n5M9zkS=mDHLm1HAzurWRayLtm-0TY4ZN_Ax4CEpyGQ@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=chenwj@iis.sinica.edu.tw \
    --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 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).