From: Julien Grall <julien.grall@linaro.org>
To: Tamas K Lengyel <tamas.lengyel@zentific.com>
Cc: Ian Campbell <ian.campbell@citrix.com>, Tim Deegan <tim@xen.org>,
Ian Jackson <ian.jackson@eu.citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
Stefano Stabellini <stefano.stabellini@citrix.com>,
Andres Lagar-Cavilla <andres@lagarcavilla.org>,
Jan Beulich <jbeulich@suse.com>,
Daniel De Graaf <dgdegra@tycho.nsa.gov>,
Tamas K Lengyel <tklengyel@sec.in.tum.de>
Subject: Re: [PATCH v5 09/17] xen/arm: p2m type definitions and changes
Date: Fri, 12 Sep 2014 12:23:56 -0700 [thread overview]
Message-ID: <5413484C.3010104@linaro.org> (raw)
In-Reply-To: <CAErYnsi1OSGVnbSme1weu9c2ZikdGa=qc-xXOCvbK+wXhFyEqQ@mail.gmail.com>
H Tamas,
On 12/09/14 01:15, Tamas K Lengyel wrote:
>
>
> On Thu, Sep 11, 2014 at 10:25 PM, Julien Grall <julien.grall@linaro.org
> <mailto:julien.grall@linaro.org>> wrote:
>
> Hi Tamas,
>
> You skipped my comments/questions on v4.
>
> On 10/09/14 06:28, Tamas K Lengyel wrote:
>
> diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
> index 08ce07b..b4ca86d 100644
> --- a/xen/include/asm-arm/p2m.h
> +++ b/xen/include/asm-arm/p2m.h
> @@ -2,6 +2,9 @@
>
>
> [..]
>
>
> +#include <public/memory.h>
> +#include <public/mem_event.h>
>
>
> Why do you need those 2 includes?
>
>
>
> <public/memory.h> might not be necessary in this patch yet, but it will
> be required for defining the functions that mem_access will call passing
> xenmem_access_t access. I can move the header include into the next
> patch in the series if that is cleaner. The mem_event header is not
> actually required so I'll remove it.
Yes please.
>
> #include <xen/p2m-common.h>
>
> @@ -11,6 +14,48 @@ struct domain;
>
> extern void memory_type_changed(struct domain *);
>
> +/* List of possible type for each page in the p2m entry.
> + * The number of available bit per page in the pte for this
> purpose is 4 bits.
> + * So it's possible to only have 16 fields. If we run out of
> value in the
> + * future, it's possible to use higher value for pseudo-type
> and don't store
> + * them in the p2m entry.
> + */
> +typedef enum {
> + p2m_invalid = 0, /* Nothing mapped here */
> + p2m_ram_rw, /* Normal read/write guest RAM */
> + p2m_ram_ro, /* Read-only; writes are silently
> dropped */
> + p2m_mmio_direct, /* Read/write mapping of genuine MMIO
> area */
> + p2m_map_foreign, /* Ram pages from foreign domain */
> + p2m_grant_map_rw, /* Read/write grant mapping */
> + p2m_grant_map_ro, /* Read-only grant mapping */
> + /* The types below are only used to decide the page
> attribute in the P2M */
> + p2m_iommu_map_rw, /* Read/write iommu mapping */
> + p2m_iommu_map_ro, /* Read-only iommu mapping */
> + p2m_max_real_type, /* Types after this won't be store in
> the p2m */
> +} p2m_type_t;
>
>
> Any reason to move the enum earlier? If not, I would prefer to keep
> at the same place. It will be easier with git-blame to find when a
> new type has been added.
>
>
> Stylistically it made more sense to have p2m_type_t and p2m_access_t
> together (as it is on the x86 as well). And they are defined here as the
> p2m_domain does have a field now defining default_access with p2m_access_t.
If it's only for the style I wouldn't move them.
Anyway, I'll Ian/Stefano decides about this.
>
> +/*
> + * Additional access types, which are used to further restrict
> + * the permissions given by the p2m_type_t memory type. Violations
> + * caused by p2m_access_t restrictions are sent to the mem_event
> + * interface.
> + *
> + * The access permissions are soft state: when any ambigious
> change of page
>
>
> ambiguous.
>
>
> Copy-pasta but will fix.
>
>
> [..]
>
> + /* Default P2M access type for each page in the the domain:
> new pages,
> + * swapped in pages, cleared pages, and pages that are
> ambiquously
>
>
> Did you intend to mean ambiguously rather than ambiquously?
>
>
> Copy-pasta again but will fix. Maybe in a separate patch where I fix it
> here and in the x86 side as well?
I'm OK for a separate patch fixing x86 side, but there is no reason to
fix the spelling for ARM outside this patch.
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-09-12 19:23 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 13:28 [PATCH v5 00/17] Mem_event and mem_access for ARM Tamas K Lengyel
2014-09-10 13:28 ` [PATCH v5 01/17] xen: Relocate mem_access and mem_event into common Tamas K Lengyel
2014-09-10 13:28 ` [PATCH v5 02/17] xen: Relocate p2m_mem_access_resume to mem_access common Tamas K Lengyel
2014-09-11 20:16 ` Julien Grall
2014-09-12 8:56 ` Tamas K Lengyel
2014-09-10 13:28 ` [PATCH v5 03/17] xen: Relocate struct npfec definition into common Tamas K Lengyel
2014-09-10 13:28 ` [PATCH v5 04/17] xen: Relocate mem_event_op domctl and access_op memop " Tamas K Lengyel
2014-09-10 13:44 ` Jan Beulich
2014-09-10 13:28 ` [PATCH v5 05/17] xen/mem_event: Clean out superfluous white-spaces Tamas K Lengyel
2014-09-10 13:28 ` [PATCH v5 06/17] xen/mem_event: Relax error condition on debug builds Tamas K Lengyel
2014-09-10 13:28 ` [PATCH v5 07/17] xen/mem_event: Abstract architecture specific sanity checks Tamas K Lengyel
2014-09-10 13:28 ` [PATCH v5 08/17] xen/mem_access: Abstract architecture specific sanity check Tamas K Lengyel
2014-09-10 13:28 ` [PATCH v5 09/17] xen/arm: p2m type definitions and changes Tamas K Lengyel
2014-09-11 20:25 ` Julien Grall
2014-09-12 8:15 ` Tamas K Lengyel
2014-09-12 19:23 ` Julien Grall [this message]
2014-09-12 20:25 ` Tamas K Lengyel
2014-09-11 20:49 ` Julien Grall
2014-09-12 8:31 ` Tamas K Lengyel
2014-09-12 19:41 ` Julien Grall
2014-09-12 20:20 ` Tamas K Lengyel
2014-09-10 13:28 ` [PATCH v5 10/17] xen/arm: Add set access required domctl Tamas K Lengyel
2014-09-11 20:26 ` Julien Grall
2014-09-10 13:28 ` [PATCH v5 11/17] xen/arm: Implement domain_get_maximum_gpfn Tamas K Lengyel
2014-09-11 20:28 ` Julien Grall
2014-09-12 8:58 ` Tamas K Lengyel
2014-09-10 13:28 ` [PATCH v5 12/17] xen/arm: Data abort exception (R/W) mem_events Tamas K Lengyel
2014-09-11 21:19 ` Julien Grall
2014-09-12 8:46 ` Tamas K Lengyel
2014-09-12 20:35 ` Julien Grall
2014-09-12 20:48 ` Tamas K Lengyel
2014-09-12 21:04 ` Julien Grall
2014-09-10 13:28 ` [PATCH v5 13/17] xen/arm: Instruction prefetch abort (X) mem_event handling Tamas K Lengyel
2014-09-11 21:23 ` Julien Grall
2014-09-12 8:34 ` Tamas K Lengyel
2014-09-10 13:28 ` [PATCH v5 14/17] xen/arm: Enable the compilation of mem_access and mem_event on ARM Tamas K Lengyel
2014-09-10 13:28 ` [PATCH v5 15/17] xen: Extend getdomaininfo to return the domain's max_gpfn Tamas K Lengyel
2014-09-10 13:48 ` Jan Beulich
2014-09-10 13:55 ` Tamas K Lengyel
2014-09-10 13:28 ` [PATCH v5 16/17] tools/libxc: Allocate magic page for mem access on ARM Tamas K Lengyel
2014-09-10 13:28 ` [PATCH v5 17/17] tools/tests: Enable xen-access " Tamas K Lengyel
2014-09-11 21:29 ` Julien Grall
2014-09-12 8:50 ` Tamas K Lengyel
2014-09-12 9:01 ` Tamas K Lengyel
2014-09-10 13:51 ` [PATCH v5 00/17] Mem_event and mem_access for ARM Jan Beulich
2014-09-10 14:01 ` Tamas K Lengyel
2014-09-15 22:26 ` Ian Campbell
2014-09-16 8:00 ` Jan Beulich
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=5413484C.3010104@linaro.org \
--to=julien.grall@linaro.org \
--cc=andres@lagarcavilla.org \
--cc=dgdegra@tycho.nsa.gov \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=stefano.stabellini@citrix.com \
--cc=tamas.lengyel@zentific.com \
--cc=tim@xen.org \
--cc=tklengyel@sec.in.tum.de \
--cc=xen-devel@lists.xen.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).