public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Chrinovic M <chrinovicmu@gmail.com>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, linux-kernel@vger.kernel.org,
	Chrinovic M <chrinovicmu@gmail.com>
Subject: [PATCH] KVM: Document next_segment() behavior
Date: Fri, 27 Mar 2026 11:50:00 +0200	[thread overview]
Message-ID: <20260327095000.134105-1-chrinovicmu@gmail.com> (raw)

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


                 reply	other threads:[~2026-03-27  9:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260327095000.134105-1-chrinovicmu@gmail.com \
    --to=chrinovicmu@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox