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

Re: [Xen-devel] [PATCH] x86/boot: Don't explicitly map the VGA region as UC-



On 05.09.2019 21:04, Andrew Cooper wrote:
> All 64-bit capable processors use PAT, and with PAT, it is explicitly
> permitted to have mappings with a cacheability different to MTRRs.
> 
> On a native system with a real legacy VGA region, MTRRs will cause the region
> to be UC-.

Minor correction: MTRRs can't be used to specify UC-. UC- is used in
PAT to allow WC from MTRRs to be retained, rather than becoming UC.
And hence sensible BIOSes would make this range WC in the MTRRs, not
UC.

The main question here is whether we can rely on firmware to actually
set MTRRs correctly.

>  When booting virtualised, this range may be RAM and not a legacy
> VGA region, at which point it wants to be WB.

To limit the effect of improper MTRR settings, did you consider using
WT instead? Furthermore, did you consider dynamically changing the
involved PTEs depending on whether we run virtualized ourselves?

> Use WB mapping in the pagetables, such that in systems without a legacy VGA
> region, the RAM between 0xa0000 and 0xc0000 doesn't become unnecesserily UC-.

May I suggest s/RAM/range/ ? There's no guarantee that when there's
no VGA there, that it would be RAM instead.

Jan

_______________________________________________
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®.