[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-


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 6 Sep 2019 13:06:28 +0200
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@xxxxxxxxxx; spf=Pass smtp.mailfrom=roger.pau@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>
  • Delivery-date: Fri, 06 Sep 2019 11:06:42 +0000
  • Ironport-sdr: GP3PK3B0pta8CmfSzLvvKVrT23Um9LqF7N9EC1p58ogofoO7bA5wT0AdZDxctFf+94h+ychKKy nDZC7n+I9xHffaCDEh69l/bQqGgRQzL3SfDLYu+Y2HwumTbF9rXY+P5WuD8B53IbJ7vUlHYSmv 8+jhc0YsND3/Hq7muajt8X0C1bV2AAOhYYCbQw9ey4Xin4YMfFckegZIpjyQDt4MklV1sSO50r KnNn6k6Rf0RJh5tLfNXBmFY71uCfkBcdKXOJFbufM37wCKMl0Z0mo7aGh+zdxQahziOgQLXIzg Grg=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Sep 05, 2019 at 08:04:18PM +0100, 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-.  When booting virtualised, this range may be RAM and not a legacy
> VGA region, at which point it wants to be WB.
> 
> 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-.
> However, we still must use small pages to avoid the undefined behaviour caused
> by superpages crossing MTRRs of different cacheability.
> 
> While adjusting the pagetable construction, switch from pfn to idx for
> consistency with all the other construction logic.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Wei Liu <wl@xxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> 
> As a future optimisation, Xen could rewrite l2_identmap with a superpage if it
> finds that MTRRs are disabled.  However, this probably needs to wait until Xen
> no longer unconditionally assumes a legacy VGA region to be present in the
> e820 if it finds something other than a hole

Is that still the case? I remember dealing with it when working on the
shim, and I thought the code to unconditionally set a hole in
0xa0000-0xc0000 was removed.

Roger.

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