[PATCH] drm/i915/gvt: Replace open coded hash table definition

Zhenyu Wang zhenyuw at linux.intel.com
Mon Nov 28 09:56:45 UTC 2022


Replace open coded vgpu write protect page's internal hash table
definition with generic helper.

Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
---
 drivers/gpu/drm/i915/gvt/gvt.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gvt/gvt.h b/drivers/gpu/drm/i915/gvt/gvt.h
index dbf8d7470b2c..51aa82445ed7 100644
--- a/drivers/gpu/drm/i915/gvt/gvt.h
+++ b/drivers/gpu/drm/i915/gvt/gvt.h
@@ -230,9 +230,7 @@ struct intel_vgpu {
 	atomic_t released;
 
 	struct kvm_page_track_notifier_node track_node;
-#define NR_BKT (1 << 18)
-	struct hlist_head ptable[NR_BKT];
-#undef NR_BKT
+	DECLARE_HASHTABLE(ptable, 18);
 };
 
 /* validating GM healthy status*/
-- 
2.35.2



More information about the intel-gvt-dev mailing list