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

Re: [PATCH v7 4/4] x86: Allow using Linux's PAT


  • To: Demi Marie Obenour <demi@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 9 Jan 2023 12:37:34 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qeasBoJ8JVmoBzjjKM2kVe3eIn/F5S+BWSxWiQtk0UQ=; b=gFU98fARG9RCgLOc5pUIEISQMSD6hDjcp9IcipgolaoRpk8i6rsKxOb+ZQKO6ay345rBIWgNbOaKcjdGogguubZvcRWMHMVPNiOCqg0zp+2QYsT9Ph/7BVf29zCRbpBC5aXdKFFKZYIX0hEaZRLb/wV4ncdBHYtrvUayGe38c+eittMi97QM3SMgVDeb8Q5YjR+xdLPFcqM/stkVRQg58uLGFzZaHVvKMN9ha8ThScYI4gHwj98R9Fs8YQbuJtbp7rTq0J98LrtaSPcW6Ka+CVJCsV21Nkt/70VtWgHhYEYkBMKNleDqu1wtXAStpRJ/QyL5LhwEgthr/Y+bO9NREw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dX8oNcqXQ0REezT1XQaLyhmHRlRZmUcmJkqy8ZBwwIA1COjnCrIDoNXnggbF7yr4GIgwjEmzJSnc/etlxmEAokVuqXtAkyRmoNO32C+wYoEDGQnUhFW8W7VUMpaQ0+rOCqmk3iDwP6nEFzUfhbccalajIuzJUYKve/IfcPUIkh68Xh+iqz9Yx32oWdUkFL5H99S5DB+Jt6aZ9kmWbj5DlgfGCOxxG94/1gLhlgPktPwEdJx4JsgNr8ORaGV+oCNh24Eb/denaXaaz7u6Kof2/ul0h3wfkFlmbXWAn8A7qVez18WSyCd+O0VXDlEILeZEEpaIPPbJc8gWWQzETVELRw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 09 Jan 2023 11:37:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.01.2023 23:07, Demi Marie Obenour wrote:
> --- a/xen/arch/x86/Kconfig
> +++ b/xen/arch/x86/Kconfig
> @@ -227,6 +227,39 @@ config XEN_ALIGN_2M
>  
>  endchoice
>  
> +config LINUX_PAT
> +     bool "Use Linux's PAT instead of Xen's default"
> +     help
> +       Use Linux's Page Attribute Table instead of the default Xen value.
> +
> +       The Page Attribute Table (PAT) maps three bits in the page table entry
> +       to the actual cacheability used by the processor.  Many Intel
> +       integrated GPUs have errata (bugs) that cause CPU access to GPU memory
> +       to ignore the topmost bit.  When using Xen's default PAT, this results
> +       in caches not being flushed and incorrect images being displayed.  The
> +       default PAT used by Linux does not cause this problem.
> +
> +       If you say Y here, you will be able to use Intel integrated GPUs that
> +       are attached to your Linux dom0 or other Linux PV guests.  However,
> +       you will not be able to use non-Linux OSs in dom0, and attaching a PCI
> +       device to a non-Linux PV guest will result in unpredictable guest
> +       behavior.  If you say N here, you will be able to use a non-Linux
> +       dom0, and will be able to attach PCI devices to non-Linux PV guests.
> +
> +       Note that saving a PV guest with an assigned PCI device on a machine
> +       with one PAT and restoring it on a machine with a different PAT won't
> +       work: the resulting guest may boot and even appear to work, but caches
> +       will not be flushed when needed, with unpredictable results.  HVM
> +       (including PVH and PVHVM) guests and guests without assigned PCI
> +       devices do not care what PAT Xen uses, and migration (even live)
> +       between hypervisors with different PATs will work fine.  Guests using
> +       PV Shim care about the PAT used by the PV Shim firmware, not the
> +       host’s PAT.  Also, non-default PAT values are incompatible with the
> +       (deprecated) qemu-traditional stubdomain.
> +
> +       Say Y if you are building a hypervisor for a Linux distribution that
> +       supports Intel iGPUs.  Say N otherwise.

I'm not convinced we want this; if other maintainers think differently,
then I don't mean to stand in the way though. If so, however,
- the above likely wants guarding by EXPERT and/or UNSUPPORTED
- the support status of using this setting wants to be made crystal
  clear, perhaps by an addition to ./SUPPORT.md.

Jan




 


Rackspace

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