xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>, Keir Fraser <keir@xen.org>,
	Tim Deegan <tim@xen.org>, Eddie Dong <eddie.dong@intel.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	Yang Z Zhang <yang.z.zhang@intel.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 3/8] x86/EPT: also dump permissions and memory types
Date: Thu, 27 Mar 2014 13:06:23 +0000	[thread overview]
Message-ID: <5334224F.2070308@citrix.com> (raw)
In-Reply-To: <5333017D02000078000027EB@nat28.tlf.novell.com>


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

On 26/03/14 15:34, Jan Beulich wrote:
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> --- a/xen/arch/x86/mm/p2m-ept.c
> +++ b/xen/arch/x86/mm/p2m-ept.c
> @@ -730,6 +730,14 @@ static void ept_dump_p2m_table(unsigned 
>      unsigned long record_counter = 0;
>      struct p2m_domain *p2m;
>      struct ept_data *ept;
> +    static const char memoryTypes[8][2] = {
> +        [0 ... 7] = "?",
> +        [MTRR_TYPE_UNCACHABLE]     = "UC",
> +        [MTRR_TYPE_WRCOMB]         = "WC",
> +        [MTRR_TYPE_WRTHROUGH]      = "WT",
> +        [MTRR_TYPE_WRPROT]         = "WP",
> +        [MTRR_TYPE_WRBACK]         = "WB",
> +    };

Dont we have an identical structure somewhere else in Xen already?

~Andrew

>  
>      for_each_domain(d)
>      {
> @@ -759,8 +767,15 @@ static void ept_dump_p2m_table(unsigned 
>                  if ( ept_entry->sa_p2mt == p2m_populate_on_demand )
>                      printk("gfn: %13lx order: %2d PoD\n", gfn, order);
>                  else
> -                    printk("gfn: %13lx order: %2d mfn: %13lx\n",
> -                           gfn, order, ept_entry->mfn + 0UL);
> +                    printk("gfn: %13lx order: %2d mfn: %13lx %c%c%c %c%c%c\n",
> +                           gfn, order, ept_entry->mfn + 0UL,
> +                           ept_entry->r ? 'r' : ' ',
> +                           ept_entry->w ? 'w' : ' ',
> +                           ept_entry->x ? 'x' : ' ',
> +                           memoryTypes[ept_entry->emt][0],
> +                           memoryTypes[ept_entry->emt][1]
> +                           ?: ept_entry->emt + '0',
> +                           ept_entry->ipat ? '!' : ' ');
>  
>                  if ( !(record_counter++ % 100) )
>                      process_pending_softirqs();
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel


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

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

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

  parent reply	other threads:[~2014-03-27 13:06 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-26 15:23 [PATCH 0/8] x86/EPT: various adjustments Jan Beulich
2014-03-26 15:31 ` [PATCH 1/8] x86/p2m: make p2m_change_type() behavior match p2m_change_entry_type_global()'s Jan Beulich
2014-03-27 12:52   ` Tim Deegan
2014-03-26 15:33 ` [PATCH 2/8] x86/EPT: simplification and cleanup Jan Beulich
2014-03-27 12:52   ` Tim Deegan
2014-03-26 15:34 ` [PATCH 3/8] x86/EPT: also dump permissions and memory types Jan Beulich
2014-03-27 12:54   ` Tim Deegan
2014-03-27 15:16     ` Jan Beulich
2014-03-27 13:06   ` Andrew Cooper [this message]
2014-03-27 15:18     ` Jan Beulich
2014-03-26 15:34 ` [PATCH 4/8] x86/EPT: relax treatment of APIC MFN Jan Beulich
2014-03-27 12:55   ` Tim Deegan
2014-03-26 15:35 ` [PATCH 5/8] x86/vMTRR: pass domain to mtrr_*_msr_set() Jan Beulich
2014-03-27 12:55   ` Tim Deegan
2014-03-26 15:36 ` [PATCH 6/8] x86/EPT: force re‑evaluation of memory type as necessary Jan Beulich
2014-03-27 13:08   ` [PATCH 6/8] x86/EPT: force re???evaluation " Tim Deegan
2014-03-27 15:23     ` Jan Beulich
2014-03-27 15:48       ` Tim Deegan
2014-03-27 16:16         ` Jan Beulich
2014-03-26 15:36 ` [PATCH 7/8] x86/EPT: split super pages upon mismatching memory types Jan Beulich
2014-03-27 15:04   ` Tim Deegan
2014-03-27 15:25     ` Jan Beulich
2014-03-26 15:37 ` [PATCH 8/8] x86/EPT: IOMMU snoop capability should not affect memory type selection Jan Beulich
2014-03-27 15:12   ` Tim Deegan
2014-03-27 15:32     ` Jan Beulich
2014-03-27 15:56       ` Tim Deegan
2014-04-04  7:30       ` Tian, Kevin
2014-04-04  8:28         ` Jan Beulich
2014-04-04  9:21           ` Tian, Kevin
2014-04-04  9:45             ` Jan Beulich
2014-04-07  0:58               ` Tian, Kevin
2014-03-26 16:25 ` [PATCH 0/8] x86/EPT: various adjustments Jan Beulich
2014-03-27 15:25   ` Tim Deegan
2014-03-27 15:43     ` Jan Beulich
2014-03-27 15:51       ` Tim Deegan
2014-03-28  9:15   ` Tian, Kevin

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=5334224F.2070308@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=eddie.dong@intel.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=yang.z.zhang@intel.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).