All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aravindh Puthiyaparambil (aravindp)" <aravindp@cisco.com>
To: Tamas Lengyel <tamas.lengyel@zentific.com>
Cc: Keir Fraser <keir@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Jan Beulich <jbeulich@suse.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH RFC 1/4] x86/mm: Shadow and p2m changes for PV mem_access
Date: Tue, 29 Apr 2014 23:36:25 +0000	[thread overview]
Message-ID: <97A500D504438F4ABC02EBA81613CC63317E7B1A@xmb-aln-x02.cisco.com> (raw)
In-Reply-To: <CAErYnsitFqBcFsGbDJgBYRA1ogO68-eaCW3fMeqbxJ4H78Nyvw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1282 bytes --]

+    /* For PV domains we only support rw, rx, rx2rw, rwx access permissions */

There is a bit of discrepancy between the comment and the code here. Also, could you briefly explain why only these permissions are supported?

I will add “r” to the comment.

Only these permissions are supported as the regular page tables unlike extended page tables (EPT) does not have an explicit R bit. It only has a present bit and hence there is no easy way to do permissions like execute only. And of course permissions like write or write-execute cannot be supported in both cases.

+    if ( unlikely(p2ma != p2m_access_r &&
+                  p2ma != p2m_access_rw &&
+                  p2ma != p2m_access_rx &&
+                  p2ma != p2m_access_rwx &&
+                  p2ma != p2m_access_rx2rw) )
+        return -EINVAL;

+    /* For PV domains we only support r, rw, rx, rwx access permissions */

Code/comment discrepancy again.

I will add “rx2rw” to the comment.

+    if ( p2m->default_access != p2m_access_r &&
+         p2m->default_access != p2m_access_rw &&
+         p2m->default_access != p2m_access_rx &&
+         p2m->default_access != p2m_access_rwx &&
+         p2m->default_access != p2m_access_rx2rw )
+        return -EINVAL;
+

[-- Attachment #1.2: Type: text/html, Size: 5411 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-04-29 23:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-29  4:45 [PATCH RFC 0/4] Add mem_access support for PV domains Aravindh Puthiyaparambil
2014-04-29  4:45 ` [PATCH RFC 1/4] x86/mm: Shadow and p2m changes for PV mem_access Aravindh Puthiyaparambil
2014-04-29  8:50   ` Jan Beulich
2014-04-29 23:10     ` Aravindh Puthiyaparambil (aravindp)
2014-04-30  6:32       ` Jan Beulich
2014-04-30 22:20         ` Aravindh Puthiyaparambil (aravindp)
2014-05-01  1:11           ` Andres Lagar-Cavilla
2014-05-01  3:18             ` Aravindh Puthiyaparambil (aravindp)
2014-05-01 14:18           ` Tim Deegan
2014-05-01 19:14             ` Aravindh Puthiyaparambil (aravindp)
2014-05-08 12:44               ` Tim Deegan
2014-05-02  8:26           ` Jan Beulich
2014-05-02 16:28             ` Aravindh Puthiyaparambil (aravindp)
2014-04-29 12:05   ` Tamas Lengyel
2014-04-29 23:36     ` Aravindh Puthiyaparambil (aravindp) [this message]
2014-05-01 14:39   ` Tim Deegan
2014-05-01 19:26     ` Aravindh Puthiyaparambil (aravindp)
2014-04-29  4:45 ` [PATCH RFC 2/4] x86/mem_access: mem_access and mem_event changes to support PV domains Aravindh Puthiyaparambil
2014-04-29  4:45 ` [PATCH RFC 3/4] tools/libxc: Add APIs to create and get the PV ring page Aravindh Puthiyaparambil
2014-05-02 12:41   ` Ian Campbell
2014-04-29  4:45 ` [PATCH RFC 4/4] tool/xen-access: Add support for PV domains Aravindh Puthiyaparambil
2014-05-02 12:43   ` Ian Campbell

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=97A500D504438F4ABC02EBA81613CC63317E7B1A@xmb-aln-x02.cisco.com \
    --to=aravindp@cisco.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=tamas.lengyel@zentific.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.