[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5360EF70.20202@citrix.com>
Date: Wed, 30 Apr 2014 13:41:20 +0100
From: David Vrabel <david.vrabel@...rix.com>
To: David Vrabel <david.vrabel@...rix.com>
CC: <xen-devel@...ts.xenproject.org>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
<linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, <x86@...nel.org>,
Mel Gorman <mgorman@...e.de>
Subject: Re: [PATCH 7/9] x86: skip check for spurious faults for non-present
faults
On 15/04/14 15:15, David Vrabel wrote:
> If a fault on a kernel address is due to a non-present page, then it
> cannot be the result of stale TLB entry from a protection change (RO
> to RW or NX to X). Thus the pagetable walk in spurious_fault() can be
> skipped.
>
> This avoids spurious_fault() oopsing in some cases if the pagetables
> it attempts to walk are not accessible. This obscures the location of
> the original fault.
>
> This also fixes a crash with Xen PV guests when they access entries in
> the M2P corresponding to device MMIO regions. The M2P is mapped
> (read-only) by Xen into the kernel address space of the guest and this
> mapping may contains holes for non-RAM regions. Read faults will
> result in calls to spurious_fault(), but because the page tables for
> the M2P mappings are not accessible by the guest the pagetable walk
> would fault.
>
> This was not normally a problem as MMIO mappings would not normally
> result in a M2P lookup because of the use of the _PAGE_IOMAP bit the
> PTE. However, removing the _PAGE_IOMAP bit requires M2P lookups for
> MMIO mappings as well.
>
> Signed-off-by: David Vrabel <david.vrabel@...rix.com>
> Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
> ---
> x86 maintainers, this is a prerequisite for removing Xen's usage of
> _PAGE_IOMAP so I think this is best merged via the Xen tree.
Peter, any opinion on this patch?
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists