aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
diff options
context:
space:
mode:
authorSean Christopherson <[email protected]>2025-04-30 22:09:54 +0000
committerSean Christopherson <[email protected]>2025-05-02 20:39:34 +0000
commit9129633d568edd36aa22bf703b12835153cec985 (patch)
tree87f6ed8cc79bfd4a88a83d341b4288d10ae1ba42 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parentKVM: SVM: Update dump_ghcb() to use the GHCB snapshot fields (diff)
downloadkernel-9129633d568edd36aa22bf703b12835153cec985.tar.gz
kernel-9129633d568edd36aa22bf703b12835153cec985.zip
KVM: x86/mmu: Prevent installing hugepages when mem attributes are changing
When changing memory attributes on a subset of a potential hugepage, add the hugepage to the invalidation range tracking to prevent installing a hugepage until the attributes are fully updated. Like the actual hugepage tracking updates in kvm_arch_post_set_memory_attributes(), process only the head and tail pages, as any potential hugepages that are entirely covered by the range will already be tracked. Note, only hugepage chunks whose current attributes are NOT mixed need to be added to the invalidation set, as mixed attributes already prevent installing a hugepage, and it's perfectly safe to install a smaller mapping for a gfn whose attributes aren't changing. Fixes: 8dd2eee9d526 ("KVM: x86/mmu: Handle page fault for private memory") Cc: [email protected] Reported-by: Michael Roth <[email protected]> Tested-by: Michael Roth <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
0 files changed, 0 insertions, 0 deletions