Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7157547ybi; Mon, 8 Jul 2019 15:49:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3jH0mrtx4y/RATf425hGTviFivpd+Dr5ziUoJrY9MNExJcDYSdu8ys82yBy7F/M7nFO7w X-Received: by 2002:a17:902:2be8:: with SMTP id l95mr26121716plb.231.1562626147072; Mon, 08 Jul 2019 15:49:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562626147; cv=none; d=google.com; s=arc-20160816; b=LGHilxLd+BlmIbzU/CiuBGhWFn294iuL4BxnZhjMyRhp3IH0GAv4es52sgTYIXB03Z 7yJUoO8B5sRyALz/SJ/hciwvK1EVsawGvI3PlOoo4wqicuSdX+rh+cYr3TtJfwEAGvJO fc1utEjQWRBO5jUzhSxfiUeGv/O7Jd8bUEa+nMYYovFPrOMa5bUQFzM9FdSBVTRi9Lqr 5e5twFY0CTq0K5Iyain2IuMDXVCpH4YHFGYXV9HRBqbKtMA7//rd0QhFqbslSK4gV144 RcSRdtLekX1MFI7g4+U47s9VHUqoJ0eN1tIk1BAdC37W6H66gRhOrRAeX1ibAfXUi4at 7GAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=v5XLjLHVb1HfIxxirKX1s9e4GKJKAzghzNgL7STEgxA=; b=pJ/VUFdSSoIenSlbAyaGdyRvo/1VzPu6aL0rRFjcw1VP8IKGfOECPZ7Kq56o1j/Pa9 wJjwFgD4Bq9v/m4eRvaGei+LONchG6B6eLLBYIzH5nqXDF7z1kkuUljJ41GkmgJ3xsju OBiyIKzZOL1hPEWMUelRCrLqec3rkvnNeFAHR13CO/WNe9ZF9LBjGNMdF0+XhM6gRUgt H1XJooP2NXycTfIXH5GjH8hxBfMURVNs3yWFhS+6VlMI6DC893VrqcLbgpNCkwxmx5ES zCsJAyDtBKSYNF4mzSghXUzwgDbIf1bjL41O3rQVwxL0cBn3KVuzcrffDzqgobMNISJ8 pPTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r19si20467748pfh.50.2019.07.08.15.48.51; Mon, 08 Jul 2019 15:49:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404811AbfGHUAZ (ORCPT + 99 others); Mon, 8 Jul 2019 16:00:25 -0400 Received: from ms.lwn.net ([45.79.88.28]:53258 "EHLO ms.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729108AbfGHUAZ (ORCPT ); Mon, 8 Jul 2019 16:00:25 -0400 Received: from lwn.net (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id 02B172EF; Mon, 8 Jul 2019 20:00:23 +0000 (UTC) Date: Mon, 8 Jul 2019 14:00:22 -0600 From: Jonathan Corbet To: Luke Nowakowski-Krijger Cc: linux-kernel-mentees@lists.linuxfoundation.org, pbonzini@redhat.com, rkrcmar@redhat.com, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] Documentation: kvm: Convert cpuid.txt to .rst Message-ID: <20190708140022.5fa9d01f@lwn.net> In-Reply-To: References: Organization: LWN.net MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 6 Jul 2019 14:38:14 -0700 Luke Nowakowski-Krijger wrote: > From: Luke Nowakowski-Krijger > > Convert cpuid.txt to .rst format to be parsable by sphinx. > > Change format and spacing to make function definitions and return values > much more clear. Also added a table that is parsable by sphinx and makes > the information much more clean. > > Signed-off-by: Luke Nowakowski-Krijger > --- > Documentation/virtual/kvm/cpuid.rst | 99 +++++++++++++++++++++++++++++ > Documentation/virtual/kvm/cpuid.txt | 83 ------------------------ > 2 files changed, 99 insertions(+), 83 deletions(-) > create mode 100644 Documentation/virtual/kvm/cpuid.rst > delete mode 100644 Documentation/virtual/kvm/cpuid.txt > > diff --git a/Documentation/virtual/kvm/cpuid.rst b/Documentation/virtual/kvm/cpuid.rst > new file mode 100644 > index 000000000000..1a03336a500e > --- /dev/null > +++ b/Documentation/virtual/kvm/cpuid.rst > @@ -0,0 +1,99 @@ > +.. SPDX-License-Identifier: GPL-2.0 Do you know that this is the appropriate license for this file? If so, you should say how you know that. I appreciate that you thought to add the SPDX line, but we have to be sure that it actually matches the intent of the creator of this file. > +============== > +KVM CPUID bits > +============== > + > +:Author: Glauber Costa , Red Hat Inc, 2010 I rather suspect that email address doesn't work these days. > +A guest running on a kvm host, can check some of its features using > +cpuid. This is not always guaranteed to work, since userspace can > +mask-out some, or even all KVM-related cpuid features before launching > +a guest. > + > +KVM cpuid functions are: > + > +function: **KVM_CPUID_SIGNATURE (0x40000000)** I wouldn't add the **markup** here, it doesn't really help. > + > +returns:: > + > + eax = 0x40000001 > + ebx = 0x4b4d564b > + ecx = 0x564b4d56 > + edx = 0x4d > + > +Note that this value in ebx, ecx and edx corresponds to the string "KVMKVMKVM". > +The value in eax corresponds to the maximum cpuid function present in this leaf, > +and will be updated if more functions are added in the future. > +Note also that old hosts set eax value to 0x0. This should > +be interpreted as if the value was 0x40000001. > +This function queries the presence of KVM cpuid leafs. > + > +function: **define KVM_CPUID_FEATURES (0x40000001)** > + > +returns:: > + > + ebx, ecx > + eax = an OR'ed group of (1 << flag) > + > +where ``flag`` is defined as below: > + > ++--------------------------------+------------+---------------------------------+ > +| flag | value | meaning | > ++================================+============+=================================+ > +| KVM_FEATURE_CLOCKSOURCE | 0 | kvmclock available at msrs | > +| | | 0x11 and 0x12 | You might consider using the ======= ===== ====== simpler table format ======= ===== ====== here, it might be a bit easier to read and maintain. Thanks, jon