[PATCH] KVM: Document next_segment() behavior

Chrinovic M posted 1 patch 6 days, 5 hours ago
virt/kvm/kvm_main.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] KVM: Document next_segment() behavior
Posted by Chrinovic M 6 days, 5 hours ago
Add a brief comment describing how next_segment() computes
the number of bytes available in the current page when
handling guest memory accesses.

No functional change.

Signed-off-by: Chrinovic M <chrinovicmu@gmail.com>
---
 virt/kvm/kvm_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 9093251beb39..03ddfafe005c 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -3176,6 +3176,7 @@ void kvm_vcpu_unmap(struct kvm_vcpu *vcpu, struct kvm_host_map *map)
 }
 EXPORT_SYMBOL_FOR_KVM_INTERNAL(kvm_vcpu_unmap);
 
+/* Compute bytes available in current page for the guest memory op */ 
 static int next_segment(unsigned long len, int offset)
 {
 	if (len > PAGE_SIZE - offset)
-- 
2.39.5