KVM: Documentation and comment fixes
Subsystems (4)
v2 cover KVM: Documentation and comment fixes
Hi folks,
Changes since v1 [1]:
- Various fixes and rewordings. (Randy, Zenghui)
- Collected tags from Randy and Zenghui. (thanks!)
This series fixes generic KVM documentation and comments, mostly references to non-existent functions, structures and constants, plus a few other one-line fixes and typos.
Patches 1-4 are for Documentation/virt/kvm, and 5-7 for code comments.
Based on Linux 7.4-rc3 (aebb727447640).
Cheers,
/fuad
[1] https://lore.kernel.org/all/[email protected]/
Fuad Tabba (7):
Documentation: KVM: Fix references to non-existent identifiers
Documentation: KVM: Fix lock names and a lock type in locking.rst
Documentation: KVM: Fix the function that implements halt polling
Documentation: KVM: Drop the stale number of vCPU request flags
KVM: Fix comments that refer to non-existent identifiers
KVM: Fix the range of reserved arch-independent request bits
KVM: Fix typos in comments
Documentation/virt/kvm/api.rst | 40 ++++++++++----------- Documentation/virt/kvm/halt-polling.rst | 2 +- Documentation/virt/kvm/locking.rst | 10 +++--- Documentation/virt/kvm/review-checklist.rst | 2 +- Documentation/virt/kvm/vcpu-requests.rst | 3 +- include/linux/kvm_dirty_ring.h | 4 +-- include/linux/kvm_host.h | 16 ++++----- include/linux/kvm_irqfd.h | 4 +-- include/uapi/linux/kvm.h | 10 +++--- virt/kvm/binary_stats.c | 4 +-- virt/kvm/eventfd.c | 4 +-- virt/kvm/guest_memfd.c | 2 +- virt/kvm/kvm_main.c | 8 ++--- 13 files changed, 54 insertions(+), 55 deletions(-)
base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
Signature · 1 line
2.47.3
PATCH v2 1/7 Documentation: KVM: Fix references to non-existent identifiers
The KVM API documentation and the review checklist refer to non-existent ioctls, capabilities, structures, fields and constants. Use the names from the uAPI headers.
Also add spaces around each "*" in the linear histogram's bucket ranges. Otherwise, reST doesn't end the inline literal before the "*", and renders most of the two lines as one literal.
--- Documentation/virt/kvm/api.rst | 40 ++++++++++----------- Documentation/virt/kvm/review-checklist.rst | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-)
Documentation/virt/kvm/api.rst +20 -20
@@ -897,7 +897,7 @@ x86 allows the operating system to program the interrupt polarity (active-low/active-high) for level-triggered interrupts, and KVM used to consider the polarity. However, due to bitrot in the handling of active-low interrupts, the above convention is now valid on x86 too. -This is signaled by KVM_CAP_X86_IOAPIC_POLARITY_IGNORED. Userspace +This is signaled by KVM_CAP_IOAPIC_POLARITY_IGNORED. Userspace should not present interrupts to the guest as active-low unless this capability is present (or unless it is not using the in-kernel irqchip, of course).
@@ -941,7 +941,7 @@ be used for a userspace interrupt controller. struct kvm_irq_level { union { __u32 irq; /* GSI */ - __s32 status; /* not used for KVM_IRQ_LEVEL */ + __s32 status; /* not used for KVM_IRQ_LINE */ }; __u32 level; /* 0 or 1 */ };
@@ -3219,7 +3219,7 @@ With KVM_CAP_IRQFD_RESAMPLE, KVM_IRQFD supports a de-assert and notify mechanism allowing emulation of level-triggered, irqfd-based interrupts. When KVM_IRQFD_FLAG_RESAMPLE is set the user must pass an additional eventfd in the kvm_irqfd.resamplefd field. When operating -in resample mode, posting of an interrupt through kvm_irq.fd asserts +in resample mode, posting of an interrupt through kvm_irqfd.fd asserts the specified gsi in the irqchip. When the irqchip is resampled, such as from an EOI, the gsi is de-asserted and the user is notified via kvm_irqfd.resamplefd. It is the user's responsibility to re-queue
@@ -4982,8 +4982,8 @@ Errors: #define KVM_STATE_NESTED_VMX_VMCS_SIZE 0x1000 #define KVM_STATE_NESTED_SVM_VMCB_SIZE 0x1000 - #define KVM_STATE_NESTED_VMX_SMM_GUEST_MODE 0x00000001 - #define KVM_STATE_NESTED_VMX_SMM_VMXON 0x00000002 + #define KVM_STATE_NESTED_SMM_GUEST_MODE 0x00000001 + #define KVM_STATE_NESTED_SMM_VMXON 0x00000002 #define KVM_STATE_NESTED_GIF_SET 0x00000100
@@ -5448,14 +5448,14 @@ KVM_PV_DISABLE KVM_PV_ASYNC_CLEANUP_PERFORM, it will be torn down in this call together with the current protected VM. -KVM_PV_VM_SET_SEC_PARMS +KVM_PV_SET_SEC_PARMS Pass the image header from VM memory to the Ultravisor in preparation of image unpacking and verification. -KVM_PV_VM_UNPACK +KVM_PV_UNPACK Unpack (protect and decrypt) a page of the encrypted boot image. -KVM_PV_VM_VERIFY +KVM_PV_VERIFY Verify the integrity of the unpacked image. Only if this succeeds, KVM is allowed to start protected VCPUs.
@@ -5951,7 +5951,7 @@ This ioctl (when supported) replaces the KVM_SET_SREGS. 4.133 KVM_GET_STATS_FD ---------------------- -:Capability: KVM_CAP_STATS_BINARY_FD +:Capability: KVM_CAP_BINARY_STATS_FD :Architectures: all :Type: vm ioctl, vcpu ioctl :Parameters: none
@@ -6087,10 +6087,10 @@ Bits 0-3 of ``flags`` encode the type: * ``KVM_STATS_TYPE_LINEAR_HIST`` The statistic is reported as a linear histogram. The number of buckets is specified by the ``size`` field. The size of buckets is specified - by the ``hist_param`` field. The range of the Nth bucket (1 <= N < ``size``) - is [``hist_param``*(N-1), ``hist_param``*N), while the range of the last - bucket is [``hist_param``*(``size``-1), +INF). (+INF means positive infinity - value.) + by the ``bucket_size`` field. The range of the Nth bucket + (1 <= N < ``size``) is [``bucket_size`` * (N-1), ``bucket_size`` * N), while + the range of the last bucket is [``bucket_size`` * (``size``-1), +INF). + (+INF means positive infinity value.) * ``KVM_STATS_TYPE_LOG_HIST`` The statistic is reported as a logarithmic histogram. The number of buckets is specified by the ``size`` field. The range of the first bucket is
@@ -6962,8 +6962,8 @@ to the byte array. .. note:: - For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_PAPR, KVM_EXIT_XEN, - KVM_EXIT_EPR, KVM_EXIT_HYPERCALL, KVM_EXIT_TDX, + For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_PAPR_HCALL, + KVM_EXIT_XEN, KVM_EXIT_EPR, KVM_EXIT_HYPERCALL, KVM_EXIT_TDX, KVM_EXIT_X86_RDMSR and KVM_EXIT_X86_WRMSR the corresponding operations are complete (and guest state is consistent) only after userspace has re-entered the kernel with KVM_RUN. The kernel side will first finish
@@ -8607,7 +8607,7 @@ See Documentation/arch/x86/sgx.rst for more details. :Parameters: args[0] whether the feature should be enabled or not When this capability is enabled, an emulation failure will result in an exit -to userspace with KVM_INTERNAL_ERROR (except when the emulator was invoked +to userspace with KVM_EXIT_INTERNAL_ERROR (except when the emulator was invoked to handle a VMware backdoor instruction). Furthermore, KVM will now provide up to 15 instruction bytes for any exit to userspace resulting from an emulation failure. When these exits to userspace occur use the emulation_failure struct
@@ -9232,7 +9232,7 @@ utilises it. If KVM_CHECK_EXTENSION on a kvm VM handle indicates that this capability is available, it means that the VM is using full hardware assisted virtualization capabilities of the hardware. This is useful to check after creating a VM with -KVM_VM_MIPS_DEFAULT. +KVM_VM_MIPS_AUTO. The value returned by KVM_CHECK_EXTENSION should be compared against known values (see below). All other values are reserved. This is to allow for the
@@ -9541,8 +9541,8 @@ related to event channel delivery, timers, and the XENVER_version interception. The KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG flag indicates that KVM supports -the KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG attribute in the KVM_XEN_SET_ATTR -and KVM_XEN_GET_ATTR ioctls. This controls whether KVM will set the +the KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG attribute in the KVM_XEN_HVM_SET_ATTR +and KVM_XEN_HVM_GET_ATTR ioctls. This controls whether KVM will set the XEN_RUNSTATE_UPDATE flag in guest memory mapped vcpu_runstate_info during updates of the runstate information. Note that versions of KVM which support the RUNSTATE feature above, but not the RUNSTATE_UPDATE_FLAG feature, will
@@ -9750,7 +9750,7 @@ Local APIC features CPU[EAX=1]:ECX[21] (X2APIC) is reported by ``KVM_GET_SUPPORTED_CPUID``, but it can only be enabled if ``KVM_CREATE_IRQCHIP`` or -``KVM_ENABLE_CAP(KVM_CAP_IRQCHIP_SPLIT)`` are used to enable in-kernel emulation of +``KVM_ENABLE_CAP(KVM_CAP_SPLIT_IRQCHIP)`` are used to enable in-kernel emulation of the local APIC. The same is true for the ``KVM_FEATURE_PV_UNHALT`` paravirtualized feature.
Documentation/virt/kvm/review-checklist.rst +1 -1
@@ -18,7 +18,7 @@ Review checklist for kvm patches 5. New features must default to off (userspace should explicitly request them). Performance improvements can and should default to on. -6. New cpu features should be exposed via KVM_GET_SUPPORTED_CPUID2, +6. New cpu features should be exposed via KVM_GET_SUPPORTED_CPUID, or its equivalent for non-x86 architectures 7. The feature should be testable (see below).
Signature · 1 line
2.47.3
PATCH v2 2/7 Documentation: KVM: Fix lock names and a lock type in locking.rst
In reply to Fuad TabbaThe x86 lock ordering refers to kvm->arch.mmu_lock instead of kvm->mmu_lock. The entry for wakeup_vcpus_on_cpu_lock gives its type as spinlock_t instead of raw_spinlock_t, and its comment uses the list and lock names from before commit 12a8eee5686ef ("KVM: Move x86 VMX's posted interrupt list_head to vcpu_vmx").
Fix all three.
--- Documentation/virt/kvm/locking.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Documentation/virt/kvm/locking.rst +5 -5
@@ -54,9 +54,9 @@ On x86: - vcpu->mutex is taken outside kvm->arch.hyperv.hv_lock and kvm->arch.xen.xen_lock -- kvm->arch.mmu_lock is an rwlock; critical sections for +- kvm->mmu_lock is an rwlock; critical sections for kvm->arch.tdp_mmu_pages_lock and kvm->arch.mmu_unsync_pages_lock must - also take kvm->arch.mmu_lock + also take kvm->mmu_lock Everything else is a leaf: no other lock is taken inside the critical sections.
@@ -297,13 +297,13 @@ time it will be set using the Dirty tracking mechanism described above. ``wakeup_vcpus_on_cpu_lock`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -:Type: spinlock_t +:Type: raw_spinlock_t :Arch: x86 :Protects: wakeup_vcpus_on_cpu :Comment: This is a per-CPU lock and it is used for VT-d posted-interrupts. When VT-d posted-interrupts are supported and the VM has assigned - devices, we put the blocked vCPU on the list blocked_vcpu_on_cpu - protected by blocked_vcpu_on_cpu_lock. When VT-d hardware issues + devices, we put the blocked vCPU on the list wakeup_vcpus_on_cpu + protected by wakeup_vcpus_on_cpu_lock. When VT-d hardware issues wakeup notification event since external interrupts from the assigned devices happens, we will find the vCPU on the list to wakeup.
Signature · 1 line
2.47.3
PATCH v2 3/7 Documentation: KVM: Fix the function that implements halt polling
In reply to Fuad TabbaThe generic halt polling code is in kvm_vcpu_halt() since commit 91b99ea706578 ("KVM: Rename kvm_vcpu_block() => kvm_vcpu_halt()"), but halt-polling.rst still names kvm_vcpu_block().
--- Documentation/virt/kvm/halt-polling.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/virt/kvm/halt-polling.rst +1 -1
@@ -22,7 +22,7 @@ savings of not invoking the scheduler are distinguishable. The generic halt polling code is implemented in: - virt/kvm/kvm_main.c: kvm_vcpu_block() + virt/kvm/kvm_main.c: kvm_vcpu_halt() The powerpc kvm-hv specific case is implemented in:
Signature · 1 line
2.47.3
PATCH v2 4/7 Documentation: KVM: Drop the stale number of vCPU request flags
In reply to Fuad Tabbavcpu-requests.rst states that only two request flags are defined, but KVM_REQUEST_NO_ACTION is a third. Drop the number.
--- Documentation/virt/kvm/vcpu-requests.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Documentation/virt/kvm/vcpu-requests.rst +1 -2
@@ -141,8 +141,7 @@ KVM_REQUEST_MASK VCPU requests should be masked by KVM_REQUEST_MASK before using them with bitops. This is because only the lower 8 bits are used to represent the -request's number. The upper bits are used as flags. Currently only two -flags are defined. +request's number. The upper bits are used as flags. VCPU Request Flags ------------------
Signature · 1 line
2.47.3
PATCH v2 5/7 KVM: Fix comments that refer to non-existent identifiers
In reply to Fuad TabbaComments in the generic KVM code and its headers misspell the names of functions, structures, fields, capabilities, Kconfig symbols and an object file, or use names that have since changed. Use the current names.
--- include/linux/kvm_dirty_ring.h | 4 ++-- include/linux/kvm_host.h | 4 ++-- include/linux/kvm_irqfd.h | 4 ++-- include/uapi/linux/kvm.h | 2 +- virt/kvm/binary_stats.c | 2 +- virt/kvm/eventfd.c | 2 +- virt/kvm/kvm_main.c | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-)
include/linux/kvm_dirty_ring.h +2 -2
@@ -29,8 +29,8 @@ struct kvm_dirty_ring {#ifndef CONFIG_HAVE_KVM_DIRTY_RING /* -* If CONFIG_HAVE_HVM_DIRTY_RING not defined, kvm_dirty_ring.o should -* not be included as well, so define these nop functions for the arch. +* If CONFIG_HAVE_KVM_DIRTY_RING is not defined, dirty_ring.o is not built, +* so define these nop functions for the arch. */ static inline u32 kvm_dirty_ring_get_rsvd_entries (struct kvm *kvm) {
include/linux/kvm_host.h +2 -2
@@ -764,7 +764,7 @@ struct kvm {struct mutex slots_lock;/* -* Protects the arch-specific fields of struct kvm_memory_slots in +* Protects the arch-specific fields of struct kvm_memory_slot in * use by the VM. To be used under the slots_lock (above) or in a * kvm->srcu critical section where acquiring the slots_lock would * lead to deadlock with the synchronize_srcu in
@@ -802,7 +802,7 @@ struct kvm {/* * created_vcpus is protected by kvm->lock, and is incremented * at the beginning of KVM_CREATE_VCPU. online_vcpus is only -* incremented after storing the kvm_vcpu pointer in vcpus, +* incremented after storing the kvm_vcpu pointer in vcpu_array, * and is accessed atomically. */ atomic_t online_vcpus;
include/linux/kvm_irqfd.h +2 -2
@@ -23,13 +23,13 @@struct kvm_kernel_irqfd_resampler {struct kvm *kvm;/* -* List of resampling struct _irqfd objects sharing this gsi. +* List of resampling struct kvm_kernel_irqfd objects sharing this gsi. * RCU list modified under kvm->irqfds.resampler_lock */ struct list_head list;struct kvm_irq_ack_notifier notifier;/* -* Entry in list of kvm->irqfd.resampler_list. Use for sharing +* Entry in list of kvm->irqfds.resampler_list. Use for sharing * resamplers among irqfds on the same gsi. * RCU list modified under kvm->irqfds.resampler_lock */
include/uapi/linux/kvm.h +1 -1
@@ -1459,7 +1459,7 @@ struct kvm_enc_region {#define KVM_GET_NESTED_STATE _IOWR(KVMIO, 0xbe, struct kvm_nested_state)#define KVM_SET_NESTED_STATE _IOW(KVMIO, 0xbf, struct kvm_nested_state) -/* Available with KVM_CAP_MANUAL_DIRTY_LOG_PROTECT_2 */ +/* Available with KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 */ #define KVM_CLEAR_DIRTY_LOG _IOWR(KVMIO, 0xc0, struct kvm_clear_dirty_log)/* Available with KVM_CAP_HYPERV_CPUID (vcpu) / KVM_CAP_SYS_HYPERV_CPUID (system) */
virt/kvm/binary_stats.c +1 -1
@@ -116,7 +116,7 @@ ssize_t kvm_stats_read(char *id, const struct kvm_stats_header *header,* The descriptors copy would be skipped in the typical case that * userspace periodically read stats data, since the pos would be * greater than the end address of descriptors -* (header->header.desc_offset + size_desc) causing copylen <= 0. +* (header->desc_offset + size_desc) causing copylen <= 0. */ copylen = header->desc_offset + size_desc - pos; copylen =min (copylen, remain);
virt/kvm/eventfd.c +1 -1
@@ -248,7 +248,7 @@ irqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)/* * Taking irqfds.lock is safe here, as KVM holds a reference to * the eventfd when registering the irqfd, i.e. this path can't -* be reached while kvm_irqfd_add() is running. +* be reached while kvm_irqfd_register() is running. */ spin_lock_irqsave (&kvm->irqfds.lock, iflags);
virt/kvm/kvm_main.c +1 -1
@@ -4338,7 +4338,7 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, unsigned long id)/* * Pairs with smp_rmb() in kvm_get_vcpu. Store the vcpu -* pointer before kvm->online_vcpu's incremented value. +* pointer before incrementing kvm->online_vcpus. */ smp_wmb ();atomic_inc (&kvm->online_vcpus);
Signature · 1 line
2.47.3
PATCH v2 6/7 KVM: Fix the range of reserved arch-independent request bits
In reply to Fuad TabbaKVM_REQ_DIRTY_RING_SOFT_FULL is bit 3, so the bits reserved for more architecture-independent requests are 4-7. Fix the comment.
--- include/linux/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/kvm_host.h +1 -1
@@ -165,7 +165,7 @@ static inline bool kvm_is_error_gpa(gpa_t gpa)#define KVM_REQUEST_NO_ACTION BIT(10)/* * Architecture-independent vcpu->requests bit members -* Bits 3-7 are reserved for more arch-independent bits. +* Bits 4-7 are reserved for more arch-independent bits. */ #define KVM_REQ_TLB_FLUSH (0 | KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP)#define KVM_REQ_VM_DEAD (1 | KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP)
Signature · 1 line
2.47.3
PATCH v2 7/7 KVM: Fix typos in comments
In reply to Fuad TabbaFix typos in comments in the generic KVM code and in the KVM uAPI header.
--- include/linux/kvm_host.h | 10 +++++----- include/uapi/linux/kvm.h | 8 ++++---- virt/kvm/binary_stats.c | 2 +- virt/kvm/eventfd.c | 2 +- virt/kvm/guest_memfd.c | 2 +- virt/kvm/kvm_main.c | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-)
include/linux/kvm_host.h +5 -5
@@ -105,7 +105,7 @@#define KVM_PFN_ERR_NEEDS_IO (KVM_PFN_ERR_MASK + 4)/* -* error pfns indicate that the gfn is in slot but faild to +* error pfns indicate that the gfn is in slot but failed to * translate it to pfn on host. */ static inline bool is_error_pfn (kvm_pfn_t pfn)
@@ -174,7 +174,7 @@ static inline bool kvm_is_error_gpa(gpa_t gpa)#define KVM_REQUEST_ARCH_BASE 8/* -* KVM_REQ_OUTSIDE_GUEST_MODE exists is purely as way to force the vCPU to +* KVM_REQ_OUTSIDE_GUEST_MODE exists purely as a way to force the vCPU to * OUTSIDE_GUEST_MODE. KVM_REQ_OUTSIDE_GUEST_MODE differs from a vCPU "kick" * in that it ensures the vCPU has reached OUTSIDE_GUEST_MODE before continuing * on. A kick only guarantees that the vCPU is on its way out, e.g. a previous
@@ -2185,7 +2185,7 @@ static inline int mmu_invalidate_retry_gfn(struct kvm *kvm,* If mmu_invalidate_in_progress is non-zero, then the range maintained * by kvm_mmu_notifier_invalidate_range_start contains all addresses * that might be being invalidated. Note that it may include some false -* positives, due to shortcuts when handing concurrent invalidations. +* positives, due to shortcuts when handling concurrent invalidations. */ if (unlikely (kvm->mmu_invalidate_in_progress)) {/*
@@ -2471,7 +2471,7 @@ void kvm_arch_update_irqfd_routing(struct kvm_kernel_irqfd *irqfd,#endif /* CONFIG_HAVE_KVM_IRQ_BYPASS */ #ifdef __KVM_HAVE_INVALID_WAKEUPS -/* If we wakeup during the poll time, was it a sucessful poll? */ +/* If we wakeup during the poll time, was it a successful poll? */ static inline bool vcpu_valid_wakeup (struct kvm_vcpu *vcpu) {return vcpu->valid_wakeup;
@@ -2526,7 +2526,7 @@ static inline int kvm_xfer_to_guest_mode_handle_work(struct kvm_vcpu *vcpu)/* * If more than one page is being (un)accounted, @virt must be the address of -* the first page of a block of pages what were allocated together (i.e +* the first page of a block of pages that were allocated together (i.e. * accounted together). * * kvm_account_pgtable_pages() is thread-safe because mod_lruvec_page_state()
include/uapi/linux/kvm.h +4 -4
@@ -508,7 +508,7 @@ struct kvm_run {/* * shared registers between kvm and userspace. * kvm_valid_regs specifies the register classes set by the host -* kvm_dirty_regs specified the register classes dirtied by userspace +* kvm_dirty_regs specifies the register classes dirtied by userspace * struct kvm_sync_regs is architecture specific, as well as the * bits for kvm_valid_regs and kvm_dirty_regs */
@@ -698,7 +698,7 @@ struct kvm_enable_cap {/* * On arm64, machine type can be used to request the physical * address size for the VM. Bits[7-0] are reserved for the guest -* PA size shift (i.e, log2(PA_Size)). For backward compatibility, +* PA size shift (i.e., log2(PA_Size)). For backward compatibility, * value 0 implies the default IPA size, 40bits. */ #define KVM_VM_TYPE_ARM_IPA_SIZE_MASK 0xffULL
@@ -1556,12 +1556,12 @@ struct kvm_dirty_gfn {* @flags: Some extra information for header, always 0 for now. * @name_size: The size in bytes of the memory which contains statistics * name string including trailing '\0'. The memory is allocated -* at the send of statistics descriptor. +* at the end of statistics descriptor. * @num_desc: The number of statistics the vm or vcpu has. * @id_offset: The offset of the vm/vcpu stats' id string in the file pointed * by vm/vcpu stats fd. * @desc_offset: The offset of the vm/vcpu stats' descriptor block in the file -* pointd by vm/vcpu stats fd. +* pointed by vm/vcpu stats fd. * @data_offset: The offset of the vm/vcpu stats' data block in the file * pointed by vm/vcpu stats fd. *
virt/kvm/binary_stats.c +1 -1
@@ -22,7 +22,7 @@* @user_buffer: start address of userspace buffer * @size: requested read size from userspace * @offset: the start position from which the content will be read for the -* corresponding vm or vcp file descriptor +* corresponding vm or vcpu file descriptor * * The file content of a vm/vcpu file descriptor is now defined as below: * +-------------+
virt/kvm/eventfd.c +1 -1
@@ -470,7 +470,7 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)/* * Register the irqfd with the eventfd by polling on the eventfd, and -* simultaneously and the irqfd to KVM's list. If there was en event +* simultaneously add the irqfd to KVM's list. If there was an event * pending on the eventfd prior to registering, manually trigger IRQ * injection. */
virt/kvm/guest_memfd.c +1 -1
@@ -376,7 +376,7 @@ static int kvm_gmem_release(struct inode *inode, struct file *file)* CPU0 CPU1 * kvm_gmem_get_pfn() * slot->gmem.file == A -* kvm_gmem_release()) +* kvm_gmem_release() * slot->gmem.file = NULL * * kvm_set_memory_region()
virt/kvm/kvm_main.c +3 -3
@@ -1628,7 +1628,7 @@ static void kvm_swap_active_memslots(struct kvm *kvm, int as_id) {struct kvm_memslots *slots =kvm_get_inactive_memslots (kvm, as_id); -/* Grab the generation from the activate memslots. */ +/* Grab the generation from the active memslots. */ u64 gen =__kvm_memslots (kvm, as_id)->generation;WARN_ON (gen &KVM_MEMSLOT_GEN_UPDATE_IN_PROGRESS );
@@ -3044,7 +3044,7 @@ static int hva_to_pfn_remapped(struct vm_area_struct *vma,/* * Remapped memory cannot be pinned in any meaningful sense. Bail if * the caller wants to pin the page, i.e. access the page outside of -* MMU notifier protection, and unsafe umappings are disallowed. +* MMU notifier protection, and unsafe mappings are disallowed. */ if (kfp->pin && !allow_unsafe_mappings)return -EINVAL ;
@@ -4044,7 +4044,7 @@ static bool vcpu_dy_runnable(struct kvm_vcpu *vcpu)/* * By default, simply query the target vCPU's current mode when checking if a * vCPU was preempted in kernel mode. All architectures except x86 (or more -* specifical, except VMX) allow querying whether or not a vCPU is in kernel +* specifically, except VMX) allow querying whether or not a vCPU is in kernel * mode even if the vCPU is NOT loaded, i.e. using kvm_arch_vcpu_in_kernel() * directly for cross-vCPU checks is functionally correct and accurate. */
Signature · 1 line
2.47.3