From nobody Tue Dec 16 16:56:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1740065234563229.99122652095616; Thu, 20 Feb 2025 07:27:14 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id EDB962173; Thu, 20 Feb 2025 10:27:13 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id CF69F21CF; Thu, 20 Feb 2025 10:26:28 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 6ACBC1985; Thu, 20 Feb 2025 10:26:24 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id E606B1985 for ; Thu, 20 Feb 2025 10:26:23 -0500 (EST) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-692-EcpL9FeIO1KFWj_AONZCoA-1; Thu, 20 Feb 2025 10:26:21 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B0C7419783B6 for ; Thu, 20 Feb 2025 15:26:20 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3C6851800877 for ; Thu, 20 Feb 2025 15:26:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1740065183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hPLslr6TivLzNqu3znU4KnhZeg073XUk5kR9ghz5dlY=; b=c0eols2uq+Erh/5oOyzr3X70fPzQQgOTMzzGv59My3+fTAf6LtKZhpyyZUAGEuVc/AJQoh YFumQTaNZHGqkArodZ0iY1Byvk4rmOttFmRu+sdgvWXzsF2uo2orXSKKOJtBSqO9gdTtEs umRxoI0ttyqtHoG09RDzEm0gtFRD12Y= X-MC-Unique: EcpL9FeIO1KFWj_AONZCoA-1 X-Mimecast-MFC-AGG-ID: EcpL9FeIO1KFWj_AONZCoA_1740065180 From: Jiri Denemark To: devel@lists.libvirt.org Subject: [PATCH 01/13] docs: Clarify documentation of virsh hypervisor-cpu-compare Date: Thu, 20 Feb 2025 16:26:03 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: vZ0HsF1h11HV8lwO12bHvf7oi9Do_stsF_Q5Avc601Y_1740065180 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: CEAXI2C47OLCYKMJ4KWKM3ZBC2G2TUKM X-Message-ID-Hash: CEAXI2C47OLCYKMJ4KWKM3ZBC2G2TUKM X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1740065235487019000 Content-Type: text/plain; charset="utf-8" Using host CPU definition with hypervisor-cpu-compare is possible, but it provide incorrect results and thus it should not be documented the same way we describe the correct usage. Also using host-model CPU from domain capabilities was not described clearly enough. Signed-off-by: Jiri Denemark --- docs/manpages/virsh.rst | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 0eb1d6ea93..63ad619eab 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -954,15 +954,22 @@ provide on the host. (This is different from ``cpu-co= mpare`` which compares the CPU definition with the host CPU without considering any specific hypervis= or and its abilities.) =20 -The XML *FILE* may contain either a host or guest CPU definition. The host= CPU -definition is the element and its contents as printed by the -``capabilities`` command. The guest CPU definition is the element an= d its -contents from the domain XML definition or the CPU definition created from= the -host CPU model found in the domain capabilities XML (printed by the -``domcapabilities`` command). In addition to the element itself, this -command accepts full domain XML, capabilities XML, or domain capabilities = XML -containing the CPU definition. For more information on guest CPU definition -see: `https://libvirt.org/formatdomain.html#elementsCPU `__. +The XML *FILE* should contain a guest CPU definition: either the ```` +element and its contents from a domain XML definition or a CPU definition +created from the host CPU model found in the ```` +element in the domain capabilities XML (printed by the ``domcapabilities`` +command). The ```` element itself or even its +```` parent element found in domain capabilities XML is not accepted. +The element has to be transformed into an actual CPU definition. For more +information on guest CPU definition see: +`https://libvirt.org/formatdomain.html#elementsCPU `__. + +Alternatively this command will automatically extract the CPU definition w= hen +provided with a full domain or domain capabilities XML. + +For historical reasons the XML *FILE* may also contain a host CPU definiti= on, +but such usage is strongly discouraged as it will most likely provide inco= rrect +results. =20 The *virttype* option specifies the virtualization type (usable in the 'ty= pe' attribute of the top level element from the domain XML). *emulato= r* --=20 2.48.1