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

Re: [Xen-devel] [PATCH 3/3 Xen-4.8] x86/dom0: Fix shadowing of PV guests with 2M superpages



>>> On 09.11.18 at 16:26, <andrew.cooper3@xxxxxxxxxx> wrote:
> This is a minimal backport of pieces of:
> 
>  c/s 28d9a9a2d41759b9e5163037b759ac557aea767c
>  c/s 4c5d78a10dc89427140a50a1df5a0b8e9f073e82
> 
> to fix a PV shadowing problem which I hadn't anticipated at the time these
> fixes were first accepted.
> 
> Having opt_allow_superpage disabled causes guest_supports_superpages() to
> return false for PV guests.  Returning false causes guest_walk_tables() to
> ignore L2 superpages, and read under them.
> 
> This ignoring behaviour is correct for 2-level paging when CR4.PSE is clear,
> but isn't correct for 3- or 4-level paging.
> 
> When opt_allow_superpage is clear, PV domU's can't have superpages, but dom0
> will still have its initial P2M constructed with 2M superpages.
> 
> The end result is that, if dom0 becomes shadowed (e.g. PV-L1TF), the next
> memory access touching a P2M superpage will cause the shadow code to read
> under the P2M superpage and attempt to shadow junk.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.