From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tamas K Lengyel Subject: Re: [PATCH for-4.5 v7 05/21] xen: Relocate p2m_access_t into common and swap the order Date: Thu, 18 Sep 2014 12:52:31 +0200 Message-ID: References: <1410987084-11899-1-git-send-email-tklengyel@sec.in.tum.de> <1410987084-11899-6-git-send-email-tklengyel@sec.in.tum.de> <541AC0620200007800036152@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0417881322202406193==" Return-path: In-Reply-To: <541AC0620200007800036152@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Ian Campbell , Tim Deegan , Julien Grall , Ian Jackson , "xen-devel@lists.xen.org" , Stefano Stabellini , Andres Lagar-Cavilla , Daniel De Graaf , Tamas K Lengyel List-Id: xen-devel@lists.xenproject.org --===============0417881322202406193== Content-Type: multipart/alternative; boundary=001a11c2be640de237050354c84b --001a11c2be640de237050354c84b Content-Type: text/plain; charset=ISO-8859-1 On Thu, Sep 18, 2014 at 11:22 AM, Jan Beulich wrote: > >>> On 17.09.14 at 22:51, wrote: > > We swap the order of the enum of types n ... rwx, as to have rwx at 0. > This > > allows > > us to memset the permission store to 0, without having to specify rwx as > the > > default > > permission when memaccess is not in use. This also has performance > benefits > > for > > non-memaccess paths, as now comparison is to 0 when checking if > memaccess is > > in use, > > which is usually faster. > > I'd say often instead of usually here. > Ack. > > And then the description leaves open whether any dependency on > rwx now being first is getting introduced (no memset() is being added > here, yet wherever an explicit one would get added a respective > BUILD_BUG_ON() should be put along with it). > > Jan > I guess the commit message is a bit ambiguous, the paths I see all set mem_access explicitly afterwards to default_access, so there is no reliance on pure memset initializing it right now. This patch really just opens the door to have such an approach in the future (if needed). Tamas --001a11c2be640de237050354c84b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On Thu, Sep 18, 2014 at 11:22 AM, Jan Beulich <JBeulich@suse.com&g= t; wrote:
>>= ;> On 17.09.14 at 22:51, <= tklengyel@sec.in.tum.de> wrote:
> We swap the order of the enum of types n ... rwx, as to have rwx at 0.= This
> allows
> us to memset the permission store to 0, without having to specify rwx = as the
> default
> permission when memaccess is not in use. This also has performance ben= efits
> for
> non-memaccess paths, as now comparison is to 0 when checking if memacc= ess is
> in use,
> which is usually faster.

I'd say often instead of usually here.

=
Ack.
=A0

And then the description leaves open whether any dependency on
rwx now being first is getting introduced (no memset() is being added
here, yet wherever an explicit one would get added a respective
BUILD_BUG_ON() should be put along with it).

Jan

I guess the commit me= ssage is a bit ambiguous, the paths I see all set mem_access explicitly aft= erwards to default_access, so there is no reliance on pure memset initializ= ing it right now. This patch really just opens the door to have such an app= roach in the future (if needed).

Tamas

--001a11c2be640de237050354c84b-- --===============0417881322202406193== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============0417881322202406193==--