diff options
author | Anish Moorthy <amoorthy@google.com> | 2024-02-15 23:53:53 +0000 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-04-09 14:00:48 -0700 |
commit | a3bd2f7ead6d915290c4895ca52f8ee3887cd1ab (patch) | |
tree | 8407a230523b8efbaeb9963681e032570c759cd9 /virt/kvm | |
parent | ed2f049fc1445116317c97abb1f2870fb9a14d83 (diff) | |
download | linux-stable-a3bd2f7ead6d915290c4895ca52f8ee3887cd1ab.tar.gz linux-stable-a3bd2f7ead6d915290c4895ca52f8ee3887cd1ab.tar.bz2 linux-stable-a3bd2f7ead6d915290c4895ca52f8ee3887cd1ab.zip |
KVM: Add function comments for __kvm_read/write_guest_page()
The (gfn, data, offset, len) order of parameters is a little strange
since "offset" applies to "gfn" rather than to "data". Add function
comments to make things perfectly clear.
Signed-off-by: Anish Moorthy <amoorthy@google.com>
Link: https://lore.kernel.org/r/20240215235405.368539-3-amoorthy@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/kvm_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index b1054d6a14ab..2fad1a5c377a 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -3308,6 +3308,7 @@ static int next_segment(unsigned long len, int offset) return len; } +/* Copy @len bytes from guest memory at '(@gfn * PAGE_SIZE) + @offset' to @data */ static int __kvm_read_guest_page(struct kvm_memory_slot *slot, gfn_t gfn, void *data, int offset, int len) { @@ -3409,6 +3410,7 @@ int kvm_vcpu_read_guest_atomic(struct kvm_vcpu *vcpu, gpa_t gpa, } EXPORT_SYMBOL_GPL(kvm_vcpu_read_guest_atomic); +/* Copy @len bytes from @data into guest memory at '(@gfn * PAGE_SIZE) + @offset' */ static int __kvm_write_guest_page(struct kvm *kvm, struct kvm_memory_slot *memslot, gfn_t gfn, const void *data, int offset, int len) |