diff options
author | Sean Christopherson <[email protected]> | 2023-07-28 18:35:15 -0700 |
---|---|---|
committer | Paolo Bonzini <[email protected]> | 2023-08-31 13:48:57 -0400 |
commit | 16735297fdce2c7952dbe23288aad0d327fc444b (patch) | |
tree | 457a43a5b39b1bc72be2a73dfe5f4cee131d918b | |
parent | ba193f62c075768b475efbaec32481a20869813f (diff) |
drm/i915/gvt: Use an "unsigned long" to iterate over memslot gfns
Use an "unsigned long" instead of an "int" when iterating over the gfns
in a memslot. The number of pages in the memslot is tracked as an
"unsigned long", e.g. KVMGT could theoretically break if a KVM memslot
larger than 16TiB were deleted (2^32 * 4KiB).
Reviewed-by: Yan Zhao <[email protected]>
Tested-by: Yongwei Ma <[email protected]>
Reviewed-by: Zhi Wang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
-rw-r--r-- | drivers/gpu/drm/i915/gvt/kvmgt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 97c6d3c53710..6f52886c4051 100644 --- a/drivers/gpu/drm/i915/gvt/kvmgt.c +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c @@ -1620,7 +1620,7 @@ static void kvmgt_page_track_flush_slot(struct kvm *kvm, struct kvm_memory_slot *slot, struct kvm_page_track_notifier_node *node) { - int i; + unsigned long i; gfn_t gfn; struct intel_vgpu *info = container_of(node, struct intel_vgpu, track_node); |