mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fuad Tabba <fuad.tabba@linux.dev>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>
Cc: kvm@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Huacai Chen <chenhuacai@kernel.org>,
	linux-mips@vger.kernel.org, Will Deacon <will@kernel.org>,
	Fuad Tabba <tabba@google.com>
Subject: [PATCH 1/7] Documentation: KVM: Fix references to non-existent identifiers
Date: Wed, 11 Nov 2026 08:54:42 +0000	[thread overview]
Message-ID: <20261111085448.1130701-2-fuad.tabba@linux.dev> (raw)
In-Reply-To: <20261111085448.1130701-1-fuad.tabba@linux.dev>

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.

Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
---
 Documentation/virt/kvm/api.rst              | 40 ++++++++++-----------
 Documentation/virt/kvm/review-checklist.rst |  2 +-
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index e95c9cda085d9..ccdc210575e25 100644
--- a/Documentation/virt/kvm/api.rst
+++ b/Documentation/virt/kvm/api.rst
@@ -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.
diff --git a/Documentation/virt/kvm/review-checklist.rst b/Documentation/virt/kvm/review-checklist.rst
index 053f00c50d669..5f8398be52472 100644
--- a/Documentation/virt/kvm/review-checklist.rst
+++ b/Documentation/virt/kvm/review-checklist.rst
@@ -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).
-- 
2.47.3


  reply	other threads:[~2026-11-11  8:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  8:54 [PATCH 0/7] KVM: Documentation and comment fixes Fuad Tabba
2026-11-11  8:54 ` Fuad Tabba [this message]
2026-11-11  8:54 ` [PATCH 2/7] Documentation: KVM: Fix lock names and a lock type in locking.rst Fuad Tabba
2026-11-11  8:54 ` [PATCH 3/7] Documentation: KVM: Fix the function that implements halt polling Fuad Tabba
2026-11-11  8:54 ` [PATCH 4/7] Documentation: KVM: Drop the stale number of vCPU request flags Fuad Tabba
2026-11-11  8:54 ` [PATCH 5/7] KVM: Fix comments that refer to non-existent identifiers Fuad Tabba
2026-11-11  8:54 ` [PATCH 6/7] KVM: Fix the range of reserved arch-independent request bits Fuad Tabba
2026-11-11  8:54 ` [PATCH 7/7] KVM: Fix typos in comments Fuad Tabba

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=20261111085448.1130701-2-fuad.tabba@linux.dev \
    --to=fuad.tabba@linux.dev \
    --cc=borntraeger@linux.ibm.com \
    --cc=chenhuacai@kernel.org \
    --cc=corbet@lwn.net \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tabba@google.com \
    --cc=will@kernel.org \
    /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

all inboxes | Powered by JetHome®