qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Sandhya Kumar <insatiablecuriousity07@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] On x86 MMU modes
Date: Wed, 03 Jun 2015 09:01:29 +0200	[thread overview]
Message-ID: <556EA649.3010805@redhat.com> (raw)
In-Reply-To: <CAEqbB46uMYv3heY2wxYM-GbVnhFfaF_Xo=y3QoSpa76csy23FA@mail.gmail.com>



On 03/06/2015 08:51, Sandhya Kumar wrote:
> As per my understanding (which matches versions prior to this commit),
> we generally maintain only two TLBs [one for kernel and one for user] in
> x86 ISA for caching address translations. With this commit we seem to
> have three modes of MMU, although only two will be actually used (either
> KSMAP or KNOSMAP).

This is not accurate.  If AC=0, data accesses from the kernel use
KNOSMAP, but implicit accesses (e.g. reads of the IDT) use KSMAP.

> Is my claim valid ? Why cannot those two original
> modes serve the purpose and why is the separation (of KNOMAP and KSMAP)
> needed?

Because the QEMU TLB just has a single bit for "is this page readable".
 In supervisor mode and with SMAP enabled, this changes depending on the
value of the AC bit.  Without separate TLBs for KNOSMAP/KSMAP, you would
have to flush the TLB on every CLAC or STAC instruction.

Paolo

  reply	other threads:[~2015-06-03  7:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03  6:51 [Qemu-devel] On x86 MMU modes Sandhya Kumar
2015-06-03  7:01 ` Paolo Bonzini [this message]
2015-06-03  7:41   ` Sandhya Kumar
2015-06-03  7:58     ` Paolo Bonzini
2015-06-03  8:07       ` Sandhya Kumar
2015-06-03  8:22         ` Paolo Bonzini
2015-06-03  9:24           ` Sandhya Kumar
2015-06-03  9:36             ` Peter Maydell
2015-06-06  7:36               ` Sandhya Kumar
2015-06-06 22:34                 ` Peter Maydell
2015-06-08  2:51                   ` Sandhya Kumar

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=556EA649.3010805@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=insatiablecuriousity07@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).