diff options
| author | Yan Zhao <[email protected]> | 2025-02-24 07:10:39 +0000 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2025-03-14 18:20:58 +0000 |
| commit | 90fe64a94d5475738ca5db781cdf93ab39bf844f (patch) | |
| tree | d16de642001095a4cfc1ff1cc88cec3da7894201 /rust/helpers | |
| parent | KVM: x86: remove shadow_memtype_mask (diff) | |
| download | kernel-90fe64a94d5475738ca5db781cdf93ab39bf844f.tar.gz kernel-90fe64a94d5475738ca5db781cdf93ab39bf844f.zip | |
KVM: TDX: KVM: TDX: Always honor guest PAT on TDX enabled guests
Always honor guest PAT in KVM-managed EPTs on TDX enabled guests by
making self-snoop feature a hard dependency for TDX and making quirk
KVM_X86_QUIRK_IGNORE_GUEST_PAT not a valid quirk once TDX is enabled.
The quirk KVM_X86_QUIRK_IGNORE_GUEST_PAT only affects memory type of
KVM-managed EPTs. For the TDX-module-managed private EPT, memory type is
always forced to WB now.
Honoring guest PAT in KVM-managed EPTs ensures KVM does not invoke
kvm_zap_gfn_range() when attaching/detaching non-coherent DMA devices,
which would cause mirrored EPTs for TDs to be zapped, leading to the
TDX-module-managed private EPT being incorrectly zapped.
As a new feature, TDX always comes with support for self-snoop, and does
not have to worry about unmodifiable but buggy guests. So, simply ignore
KVM_X86_QUIRK_IGNORE_GUEST_PAT on TDX guests just like kvm-amd.ko already
does.
Suggested-by: Sean Christopherson <[email protected]>
Signed-off-by: Yan Zhao <[email protected]>
Message-ID: <[email protected]>
[Only apply to TDX guests. - Paolo]
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'rust/helpers')
0 files changed, 0 insertions, 0 deletions
