All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 4/4] x86/EFI: adjust EFI_MEMORY_WP handling for spec version 2.5
Date: Tue, 9 Jun 2015 10:25:06 -0400	[thread overview]
Message-ID: <20150609142505.GK15200@x230> (raw)
In-Reply-To: <20150609140856.GG15200@x230>

On Tue, Jun 09, 2015 at 10:08:56AM -0400, Konrad Rzeszutek Wilk wrote:
> .. ..snip..
> > @@ -1220,6 +1224,9 @@ void __init efi_init_memory(void)
> >              prot |= _PAGE_PAT | MAP_SMALL_PAGES;
> >          else if ( desc->Attribute & (EFI_MEMORY_UC | EFI_MEMORY_UCE) )
> >              prot |= _PAGE_PWT | _PAGE_PCD | MAP_SMALL_PAGES;
> > +        else if ( efi_bs_revision >= EFI_REVISION(2, 5) &&
> > +                  (desc->Attribute & EFI_MEMORY_WP) )
> > +            prot |= _PAGE_PAT | _PAGE_PWT | MAP_SMALL_PAGES;
> >          else
> >          {
> >              printk(XENLOG_ERR "Unknown cachability for MFNs %#lx-%#lx%s\n",
> > @@ -1229,7 +1236,8 @@ void __init efi_init_memory(void)
> >              prot |= _PAGE_PWT | _PAGE_PCD | MAP_SMALL_PAGES;
> >          }
> >  
> > -        if ( desc->Attribute & EFI_MEMORY_WP )
> > +        if ( desc->Attribute & (efi_bs_revision < EFI_REVISION(2, 5)
> > +                                ? EFI_MEMORY_WP : EFI_MEMORY_RO) )
> >              prot &= ~_PAGE_RW;
> >          if ( desc->Attribute & EFI_MEMORY_XP )
> >              prot |= _PAGE_NX;
> > --- a/xen/include/efi/efidef.h
> > +++ b/xen/include/efi/efidef.h
> > @@ -156,11 +156,15 @@ typedef enum {
> >  #define EFI_MEMORY_WT           0x0000000000000004
> >  #define EFI_MEMORY_WB           0x0000000000000008
> >  #define EFI_MEMORY_UCE          0x0000000000000010  
> > +#define EFI_MEMORY_WP           0x0000000000001000
> >  
> >  // physical memory protection on range 
> > -#define EFI_MEMORY_WP           0x0000000000001000
> 
> You delete EFI_MEMORY_WP it here, but you use it in 'efi_init_memory'?

<blushes> Please ignore that - I overlooked the movement
of the define up.

  reply	other threads:[~2015-06-09 14:25 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-09 13:49 [PATCH 0/4] misc EFI adjustments Jan Beulich
2015-06-09 13:52 ` [PATCH 1/4] x86/EFI: fix EFI_MEMORY_WP handling Jan Beulich
2015-06-09 13:57   ` Andrew Cooper
2015-06-09 13:53 ` [PATCH 2/4] EFI/early: add /mapbs to map EfiBootServices{Code, Data} Jan Beulich
2015-06-09 14:03   ` Andrew Cooper
2015-06-09 14:11     ` Konrad Rzeszutek Wilk
2015-06-09 15:26       ` Andrew Cooper
2015-06-09 15:24     ` Jan Beulich
2015-06-10  8:56   ` Ian Campbell
2015-06-10  9:15     ` Jan Beulich
2015-06-10  9:26       ` Ian Campbell
2015-06-10  9:37         ` Jan Beulich
2015-06-10 10:00           ` Ian Campbell
2015-06-10 10:00             ` Ian Campbell
2015-06-10 17:22           ` Roy Franz
2015-06-10 18:12             ` Andrew Cooper
2015-06-10 19:48               ` Konrad Rzeszutek Wilk
2015-06-10 19:55                 ` Andrew Cooper
2015-06-10 20:06               ` Roy Franz
2015-06-11  6:34             ` Jan Beulich
2015-06-11  9:48               ` Ian Campbell
2015-06-11 19:33               ` Roy Franz
2015-06-09 13:53 ` [PATCH 3/4] EFI: support default attributes to map Runtime service areas with none given Jan Beulich
2015-06-09 14:08   ` Andrew Cooper
2015-06-09 15:26     ` Jan Beulich
2015-06-09 15:30       ` Andrew Cooper
2015-06-10  8:57   ` Ian Campbell
2015-06-09 13:54 ` [PATCH 4/4] x86/EFI: adjust EFI_MEMORY_WP handling for spec version 2.5 Jan Beulich
2015-06-09 14:08   ` Konrad Rzeszutek Wilk
2015-06-09 14:25     ` Konrad Rzeszutek Wilk [this message]
2015-06-09 15:28     ` Jan Beulich
2015-06-09 15:35       ` Konrad Rzeszutek Wilk
2015-06-09 14:15   ` Andrew Cooper
2015-06-09 15:35 ` [PATCH 0/4] misc EFI adjustments Konrad Rzeszutek Wilk

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=20150609142505.GK15200@x230 \
    --to=konrad.wilk@oracle.com \
    --cc=JBeulich@suse.com \
    --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.