From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Raz <raziebe@gmail.com>, linuxppc-dev@lists.ozlabs.org
Subject: Re: What is an address translation in powerISA jarogn ?
Date: Wed, 17 Oct 2018 11:14:15 +1100 [thread overview]
Message-ID: <cd4f6bd709b80646bad628f94724505fdb352459.camel@kernel.crashing.org> (raw)
In-Reply-To: <CAPB=Z-ospEB9cyjaqk1zKy8axVKnri4=A=wBRHB_fMM_MKgCbA@mail.gmail.com>
On Tue, 2018-10-16 at 20:58 +0300, Raz wrote:
> Section 5.7.3
> "Storage accesses in real, hypervisor real, and virtual real
> addressing modes are performed in a manner that depends on the
> contents of MSR HV , VPM, VRMASD, HRMOR, RMLS, RMOR (see Chapter 2),
> bit 0 of the
> effective address (EA0),"
>
> Hello
> 1. If MSR_IR = 0 and MSR_DR = 0, does it mean that addresses are not
> translated by the MMU ?
It depends.
If HV=1 (hypervisor mode), then they are only translated to the extent
that HRMOR is applied if the MSB is 0, and untranslated if the MSB is
1.
If HV=0 (guest mode), then they *are* translated but using a different
mechanism than what's normally used when IR/DR=1. This mechanism
depends on whether you are using the Radix or the Hash MMU, and the top
2 bits are ignored.
With hash MMU, it's using things like VRMASD etc... (RMOR is deprecated
afaik) to lookup a "Virtual real mode" area in the hash table. It's
essentially a mapping of the guest "physical" space to real physical
space. It's usually initialized (and maintained) by the HV but the
guest can extend it using things like H_ENTER afaik.
With the radix MMU, it's the guest physical space as mapped by the 2nd
level page tables maintained by the hypervisor.
> 2. If EA0 is the 63-rd bit of the effective address e address ? Does
> this mean that the translation model is
> derived from the address ? a non privileged context may access
> privileged memory.
Nope.
Cheers,
Ben.
prev parent reply other threads:[~2018-10-17 0:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-16 17:58 What is an address translation in powerISA jarogn ? Raz
2018-10-17 0:14 ` Benjamin Herrenschmidt [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=cd4f6bd709b80646bad628f94724505fdb352459.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=raziebe@gmail.com \
/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).