From nobody Tue Sep 9 21:32:36 2025 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21CEC3191DB; Fri, 5 Sep 2025 17:47:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757094468; cv=none; b=OeKDufHxyjZvun0v/wgjyyaFzLzKDSrAMcTAmRtezw7CMEzMiRTvSbH958a+P+owxStqisjf/uxOPNYeSqQwp9T+sJyFbcAac4Plz0KF3u4VPuiIjVXiLV8K8VCyALO0zFVWW6CmL67W+b9eWUT92f8YWxYa5hCSvf/RMG9n6Bk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757094468; c=relaxed/simple; bh=8+IcFoGRnR++LETo8qNriEg45mSVU48yABzZX0ErpGs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=JC/D/SRtM5rA8VHk/nGVmBhf47+xiKBcuRtKyceDBMjznCkmt3aXbEWrLqpfugJOdoDXM6+BIVB6vpAk4Z3Vd8UXGjdWvosK6iTnwfvh3p7k6/X1k1DOyEkHAyB/Oph6xiG7z4+VMTuuSXA+kthLBM6ij7SkY0dchXwefXSWYws= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=GbwekWp+; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GbwekWp+" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-24af8cd99ddso31044135ad.0; Fri, 05 Sep 2025 10:47:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757094466; x=1757699266; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pzeYsrA3usK5M9dOJfOGC+Kh4M1puYf0AR/8PeWCkKU=; b=GbwekWp+FOHxATZKBnS1gWCG3s6Dm/sNcRvvPfur2XwU8AeiL1Y3e3z3dplVFMNg8Z AQtqnX0umrskqUCgdTRtrekf9Zx55dgyIE2P2Ce9X6pixZuwtLUXs43zepWsQtXa9jr0 YFe4ylZ1yZmSA0v2BtkYJzp9OBGH10OYTWG8T27KEwc+xg86Wwtn6Q8/w8VUk4yLeQEE 2M3JAfQalrCyfRN7/vdD6chQ+hdq8Ev7zxOuI2t8PkIGxGXNATd5ZTTtKySMzYU/PXOm 7Gm5QihzpjAAGM8uq0d8Ax2+GyI6ChKsVZwfQZtGK1RI3cWdkgNZXOb7PMuitsFZ+LjR CsFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757094466; x=1757699266; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pzeYsrA3usK5M9dOJfOGC+Kh4M1puYf0AR/8PeWCkKU=; b=FHq83/9dk21MjTTpDE/t8qeSCBiRMXncaqqmYl3LSg+MSqdyDBSmSGW0lam1hfIQiN R1a1cN3mR77jLVfELhhL2ks/uKsPmK1WV607rNUalHRYBxJdpOACpsre38uHa7YGrYtx YpzBaDO1+2MulquJZcCognkwVfs0XH880jQCz44yb9IGTbKUlCzuorH4fpzdqoy4axsv C1hPnUBL6T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Received: by 2002:a17:902:f707:b0:24b:1d30:5b09 with SMTP id d9443c01a7336-24b1d3076f8mr154186075ad.13.1757094465610; Fri, 05 Sep 2025 10:47:45 -0700 (PDT) Received: from ustb520lab-MS-7E07.. ([115.25.44.221]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-24ccfc56f60sm44482715ad.60.2025.09.05.10.47.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Sep 2025 10:47:45 -0700 (PDT) From: Jiaming Zhang To: rdunlap@infradead.org Cc: corbet@lwn.net, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com, r772577952@gmail.com, seanjc@google.com Subject: [PATCH v2] Documentation: KVM: Add reference specs for PIT and LAPIC ioctls Date: Sat, 6 Sep 2025 01:47:36 +0800 Message-Id: <20250905174736.260694-1-r772577952@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <00378f4c-ac64-459d-a990-6246a29c0ced@infradead.org> References: <00378f4c-ac64-459d-a990-6246a29c0ced@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Randy, Thanks for your feedback! I have fixed the grammar and put the full URL on = a single line. Please let me know if any other changes are needed. Thanks, Jiaming Zhang Reviewed-by: Randy Dunlap --- The behavior of KVM_SET_PIT2 and KVM_SET_LAPIC conforms to their respective hardware specifications. Add references to the Intel 8254 PIT datasheet and the Software Developer's Manual (SDM) to ensure users can rely on the official datasheets for behavioral details. Signed-off-by: Jiaming Zhang --- Documentation/virt/kvm/api.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index 6aa40ee05a4a..f55e1b7562db 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -2083,6 +2083,11 @@ The format of the APIC ID register (bytes 32-35 of s= truct kvm_lapic_state's regs field) depends on the state of the KVM_CAP_X2APIC_API capability. See the note in KVM_GET_LAPIC. =20 +.. Tip:: + ``KVM_SET_LAPIC`` ioctl strictly adheres to Intel=C2=AE 64 and IA-32 Arc= hitectures + Software Developer's Manual (SDM). Refer to volume 3A of the `Intel SDM + `_. + =20 4.59 KVM_IOEVENTFD ------------------ @@ -3075,6 +3080,13 @@ This IOCTL replaces the obsolete KVM_GET_PIT. Sets the state of the in-kernel PIT model. Only valid after KVM_CREATE_PIT= 2. See KVM_GET_PIT2 for details on struct kvm_pit_state2. =20 +.. Tip:: + + ``KVM_SET_PIT2`` ioctl strictly adheres to the spec of Intel 8254 PIT. + For example, a ``count`` value of 0 in ``struct kvm_pit_channel_state`` = is + interpreted as 65536, which is the maximum count value. Refer to `Intel = 8254 + programmable interval timer `_. + This IOCTL replaces the obsolete KVM_SET_PIT. =20 =20 --=20 2.34.1