Skip to content

Make PAT handling less brittle

Demi Marie Obenour xen-devel 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest4 patches 4 repliesIn review
  2. v65 patches 8 repliesSuperseded
  3. v510 patches 17 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v410 patches6 repliesSuperseded
v312 patches8 repliesSuperseded
v214 patches6 repliesSuperseded
v18 patches27 repliesSuperseded

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86: Remove MEMORY_NUM_TYPES and NO_HARDCODE_MEM_TYPExen/arch/x86/hvm/mtrr.c xen/arch/x86/include/asm/mtrr.h xen/arch/x86/mm/shadow/multi.c+10 -120 replies
2/4x86/mm: Reject invalid cacheability in PV guests by defaultdocs/misc/xen-command-line.pandoc xen/arch/x86/include/asm/pv/domain.h xen/arch/x86/mm.c +1 more+85 -41 reply
3/4x86/mm: make code robust to future PAT changesxen/arch/x86/include/asm/page.h xen/arch/x86/mm.c+98 -01 reply
4/4x86: Allow using Linux's PATxen/arch/x86/Kconfig xen/arch/x86/include/asm/page.h xen/arch/x86/include/asm/processor.h +1 more+62 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v7 yet.

Read the v7 thread

Cover letter [PATCH v7 0/4] Make PAT handling less brittle

While working on Qubes OS Marek found out that there were some PAT hacks in the Linux i195 driver. I decided to make Xen use Linux’s PAT to see if it solved the graphics glitches that were observed; it did. This required a substantial amount of preliminary work that is useful even without using Linux’s PAT. Furthermore, it turned out that the graphics glitches were due to a hardware bug, which means that Xen's PAT is fundamentally incompatible with the use of current-generation Intel integrated GPUs assigned to a PV guest (including dom0).

Patches 1 through 3 are the preliminary work. Patch 3 does break ABI by rejecting the unused PAT entries, but this will only impact buggy PV guests and can be disabled with a Xen command-line option. Patch 4 provides a new Kconfig option (CONFIG_LINUX_PAT) to use Linux's PAT instead of Xen's default.

Only patches 3 and 4 actually change Xen’s observable behavior. Patch 1 is strictly cleanup. Patch 2 makes changing the PAT much less error-prone, as problems with the PAT or with the associated _PAGE_* constants will be detected at compile time.

Demi Marie Obenour (4):
x86: Remove MEMORY_NUM_TYPES and NO_HARDCODE_MEM_TYPE x86/mm: Reject invalid cacheability in PV guests by default x86/mm: make code robust to future PAT changes
x86: Allow using Linux's PAT

 docs/misc/xen-command-line.pandoc    |  11 ++
 xen/arch/x86/Kconfig                 |  33 ++++++
 xen/arch/x86/hvm/mtrr.c              |  18 ++--
 xen/arch/x86/include/asm/mtrr.h      |   2 -
 xen/arch/x86/include/asm/page.h      |  14 +++
 xen/arch/x86/include/asm/processor.h |  15 +++
 xen/arch/x86/include/asm/pv/domain.h |   7 ++
 xen/arch/x86/mm.c                    | 151 ++++++++++++++++++++++++++-
 xen/arch/x86/mm/shadow/multi.c       |   2 +-
 xen/arch/x86/pv/domain.c             |  18 +++-
 10 files changed, 255 insertions(+), 16 deletions(-)
Signature · 3 lines
Sincerely,
Demi Marie Obenour (she/her/hers)
Invisible Things Lab