Skip to content

Please add a configurable for disabling, or by default disable, KVM_X86_QUIRK_IGNORE_GUEST_PAT on Intel host CPU

Goal

As advised in [1] below please make it so that this quirk flag is either disabled by default or configurable by the user of QEMU.

Technical details

Following up on this exchange at: https://lore.kernel.org/all/Z%2FdTIRE3NCsSM2fH@yzhao56-desk.sh.intel.com/ [1]

Due to a long-fixed Bochs DRM driver issue on guests, the final patch which would tell KVM to unconditionally honor guest PAT on all Intel CPUs which support self-snoop was reverted.

Instead a kernel configurable has been added around the quirk flag KVM_X86_QUIRK_IGNORE_GUEST_PAT. This flag is enabled by default.

This is unnecessary and a disadvantage for most host CPUs, including Intel CPUs most of which support self-snoop, As explained in this much earlier thread: https://patchwork.kernel.org/project/dri-devel/cover/20200213213036.207625-1-olvaffe@gmail.com/

As per Mesa Venus (Vulkan encapsulation) documentation this default enablement of the quirk requires all users of Intel CPUs to patch their host kernel: https://docs.mesa3d.org/drivers/venus.html

A more user-side discussion of this issue can be read on this gist: https://gist.github.com/peppergrayxyz/fdc9042760273d137dddd3e97034385f?permalink_comment_id=5534564#gistcomment-5534564

Additional information

I am not familiar with QEMU code base or much programming in general. I did a quick grep through the latest QEMU sources pulled from this repository for the string KVM_X86_QUIRK_IGNORE_GUEST_PAT. It does not seem to occur anywhere which makes me think its existence and effect on QEMU users has gone unnoticed.

If there is a handling of this flag which I have not noticed in the QEMU source code or documentation please guide me to where I can read about and probably configure it.

Thank you.

Edited by Myrsky Lintu
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information