From: Xin Tong <xerox.time.tech@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] nested page table translation for non-x86 operating system
Date: Fri, 20 Jan 2012 00:12:00 -0500 [thread overview]
Message-ID: <CALKntY0ZEbVF1_dLFAAaAaeP08tOwOD3DsR+DkxgE27D9-rk5A@mail.gmail.com> (raw)
I am wondering the possibilities of using the nested page table
mechanism available on the x86 processors to do page translation for
non-x86 operating system emulation.
So, when nested page is enabled, you can control the gCR3 and hCR3.
The gCR3 can be used to point to the page table of the running process
in the guest operating system and the hCR3 can be used to point to the
page table of the QEMU process. Assuming the page table layouts of
both operating systems are exactly the same. I think this can be
done. However there are a few problems I see here. I would like to
hear some suggestions or corrections.
1. The control of gCR3 and hCR3 needs kernel access. While they can
be set with a device module as what is done in kvm. Trapping into the
kernel every time gCR3 is reseted might be too expensive.
2. After setting the gCR3 and hCR3. whatever memory references fall
within the guest memory will be done correctly. However, memory
references done by the host will be broken. Therefore, when we load
the from the CPUstates, call to helpers for exits from the code cache,
we need to change the paging mechanism back to non-nested. can this be
done ? how expensive will this be ?
3. Lastly and most importantly, the code cache is based on a host
address, what about fetching instructions from the code cache, this
has to happen in non-nested mode ?
Thanks
Xin
next reply other threads:[~2012-01-20 5:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-20 5:12 Xin Tong [this message]
2012-01-20 8:23 ` [Qemu-devel] nested page table translation for non-x86 operating system 陳韋任
2012-01-20 13:54 ` Xin Tong
2012-01-31 7:28 ` 陳韋任
2012-06-22 7:28 ` 陳韋任 (Wei-Ren Chen)
2012-06-22 9:48 ` Xin Tong
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=CALKntY0ZEbVF1_dLFAAaAaeP08tOwOD3DsR+DkxgE27D9-rk5A@mail.gmail.com \
--to=xerox.time.tech@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 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).