qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] On x86 MMU modes


From: Paolo Bonzini
Subject: Re: [Qemu-devel] On x86 MMU modes
Date: Wed, 03 Jun 2015 09:01:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0


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 via email to

[Prev in Thread] Current Thread [Next in Thread]