Re: [PATCH] GHES: correct page protection flags in ghes_ioremap_pfn_...()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 07, 2012 at 07:40:31AM +0100, Jan Beulich wrote:
> Date:	Fri, 07 Sep 2012 07:40:31 +0100
> From: Jan Beulich <JBeulich@xxxxxxxx>
> To: Len Brown <lenb@xxxxxxxxxx>
> Cc: ying.huang@xxxxxxxxx, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>,
>  linux-acpi@xxxxxxxxxxxxxxx
> Subject: [PATCH] GHES: correct page protection flags in
>  ghes_ioremap_pfn_...()
> X-Mailer: Novell GroupWise Internet Agent 12.0.0 
> 
> At least for Xen Dom0 it is very relevant to set the _PAGE_IO bit when
> ioremap-ing (non-RAM) areas, as that flag suppresses the PFN -> MFN
> translation otherwise done in PV guests. (The offending commit was
> 81e88fdc432a1552401d6e91a984dcccce72b8dc.)
>

Oh, right. In virtual environment, physical address is virtualized, too.
We need to tell *ioremap* to map in proper address space. But I want
to do if you can update all related mappings for APEI tables? I'm not sure
if all APEI tables are affected by this issue.

> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> Cc: Huang Ying <ying.huang@xxxxxxxxx>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> 
> ---
>  drivers/acpi/apei/ghes.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- 3.6-rc4/drivers/acpi/apei/ghes.c
> +++ 3.6-rc4-ghes-ioremap-prot/drivers/acpi/apei/ghes.c
> @@ -206,7 +206,7 @@ static void __iomem *ghes_ioremap_pfn_nm
>  
>  	vaddr = (unsigned long)GHES_IOREMAP_NMI_PAGE(ghes_ioremap_area->addr);
>  	ioremap_page_range(vaddr, vaddr + PAGE_SIZE,
> -			   pfn << PAGE_SHIFT, PAGE_KERNEL);
> +			   pfn << PAGE_SHIFT, PAGE_KERNEL_IO);
>  
>  	return (void __iomem *)vaddr;
>  }
> @@ -217,7 +217,7 @@ static void __iomem *ghes_ioremap_pfn_ir
>  
>  	vaddr = (unsigned long)GHES_IOREMAP_IRQ_PAGE(ghes_ioremap_area->addr);
>  	ioremap_page_range(vaddr, vaddr + PAGE_SIZE,
> -			   pfn << PAGE_SHIFT, PAGE_KERNEL);
> +			   pfn << PAGE_SHIFT, PAGE_KERNEL_IO);
>  
>  	return (void __iomem *)vaddr;
>  }
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux