]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/i915/gvt: Error out on an attempt to shadowing an unknown GTT entry type
authorSean Christopherson <seanjc@google.com>
Sat, 29 Jul 2023 01:35:13 +0000 (18:35 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 31 Aug 2023 17:48:55 +0000 (13:48 -0400)
commit241f0aadb8577dd17fa521bf19ba7ae85dc33d41
tree8440b72cede53729093b9e44b6ba466be35fbeca
parent96b138cd23e978cd0975d1f4d5709dae2e061fd1
drm/i915/gvt: Error out on an attempt to shadowing an unknown GTT entry type

Bail from ppgtt_populate_shadow_entry() if an unexpected GTT entry type
is encountered instead of subtly falling through to the common "direct
shadow" path.  Eliminating the default/error path's reliance on the common
handling will allow hoisting intel_gvt_dma_map_guest_page() into the case
statements so that the 2MiB case can try intel_gvt_dma_map_guest_page()
and fallback to splitting the entry on failure.

Reviewed-by: Zhi Wang <zhi.a.wang@intel.com>
Tested-by: Yongwei Ma <yongwei.ma@intel.com>
Reviewed-by: Yan Zhao <yan.y.zhao@intel.com>
Link: https://lore.kernel.org/r/20230729013535.1070024-8-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
drivers/gpu/drm/i915/gvt/gtt.c