Received: by 2002:a17:504:5682:b0:1be9:327d:8ee3 with SMTP id r2csp1112912njx; Fri, 25 Oct 2024 07:51:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXvDBqtPOywd2RE12vHg96v7+TTH7DHloi639W9yyYc4NJwq9LhPNLB4VSMRX/X/l3nB0B+sRVkmJ2f3g==@linaro.org X-Google-Smtp-Source: AGHT+IEdB2gL91c4ILvxA7E/BQiwNX2NqnWvbd0ekDo77YOss16R0PHGeKB6HGHNhGZBS04+OU7U X-Received: by 2002:a05:620a:4441:b0:7b1:4f5c:6e86 with SMTP id af79cd13be357-7b17e566ce0mr1338074185a.17.1729867896408; Fri, 25 Oct 2024 07:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729867896; cv=none; d=google.com; s=arc-20240605; b=W4tW7WXPapi3adm7NtZSqWNQE69zBnbXhyZxNHvM3roxEqI2Rfvdwk+/QvnwmdsQkC cGYHVWjCyv6A+GGSgAV/41zXWS7JMjZg7RdjGDXc06PHq8IFgcdAWNoqpLKgjFgz2BZk pzxIc4KfczKZRhhblGLloFHzBUBEOjSR95dxWCeJ3XQ2lOLk/U4WWfFNl+YFY5BYYIbV vzZ/Nngqc4p9y9lYsF+mow0AOx3L8wlnTRAHgEca9uyIqPpoauc9j+EbUd/pzYCo+fuc FZiC9vaEbxk8ApRYBot2Q86TMbVJGwbz6V1NOF5XDt56cRrOt//2H2fLnyjdFIhUWAlD Lr+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:dkim-signature; bh=oCATtNYUN/GH6SdVzjWLD+NRphY1brBLxdU6nbHifzE=; fh=j8iu9gnKkyKRCdyssngZ40t6wHCC1TYvXQdL2AD/0bI=; b=Q1mVsIqo7UCzL4i4wEv9qy0vuhkwDxm3S7ZmiS7ZJ3d0pOiXTCv2aGEoKNt2fy7uDc F24PLPhwmLmuwls2W1BLHtstNYbWvixi3H41ZVkKbxu/nYQmt/Snm3R2yMkrO4uznHqe U7PjG6v7sB2PMol5c94+PVCRMzYfWQTyDQ4jWJZYHaIoMAq43HYvR9I7wLordYZA1sCb XFYiHo4P41eQ16v55Dcz72zCqRri5baEc78Uml5ZYex6qLxyJDs2IDhKRhO9pJiz1L88 oUtLgOeNrXG3UP+QOteIEogkJ/P3C3UZLHfRexWsv+osh7q2IpZfnq3NUQjTeEN+XpTe j0xQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Pq19XceS; spf=pass (google.com: domain of kchamart@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=kchamart@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com. [170.10.129.124]) by mx.google.com with ESMTPS id af79cd13be357-7b18d361fa4si163616085a.646.2024.10.25.07.51.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 07:51:36 -0700 (PDT) Received-SPF: pass (google.com: domain of kchamart@redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Pq19XceS; spf=pass (google.com: domain of kchamart@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=kchamart@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729867896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oCATtNYUN/GH6SdVzjWLD+NRphY1brBLxdU6nbHifzE=; b=Pq19XceSrxuA3mOMmghXSh32ox0SWsPXgGEKvzlkSqsQbA8OnWWVZC6D26smoPQ3sHXBes Rn9WclrTi4R8uOXXPTKjZGiM+V2N1T440Zjt2mw92Pp0U0yMu/bem3LHlPi9xQLd2s9r7s 1PTeoygRQcBojW6OYnbK8HWXio2DyvI= 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-149-vvtCLRQwPH6-Gn7xQefQPA-1; Fri, 25 Oct 2024 10:51:32 -0400 X-MC-Unique: vvtCLRQwPH6-Gn7xQefQPA-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 BA9EC19560A6; Fri, 25 Oct 2024 14:51:30 +0000 (UTC) Received: from pinwheel (unknown [10.39.208.23]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 09383300018D; Fri, 25 Oct 2024 14:51:22 +0000 (UTC) Date: Fri, 25 Oct 2024 16:51:19 +0200 From: Kashyap Chamarthy To: Eric Auger Cc: eric.auger.pro@gmail.com, cohuck@redhat.com, qemu-devel@nongnu.org, qemu-arm@nongnu.org, kvmarm@lists.linux.dev, peter.maydell@linaro.org, richard.henderson@linaro.org, alex.bennee@linaro.org, maz@kernel.org, oliver.upton@linux.dev, sebott@redhat.com, shameerali.kolothum.thodi@huawei.com, armbru@redhat.com, berrange@redhat.com, abologna@redhat.com, jdenemar@redhat.com, shahuang@redhat.com, mark.rutland@arm.com, philmd@linaro.org, pbonzini@redhat.com Subject: Re: [RFC 00/21] kvm/arm: Introduce a customizable aarch64 KVM host model Message-ID: References: <20241025101959.601048-1-eric.auger@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241025101959.601048-1-eric.auger@redhat.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-TUID: QUwmWA5ROZEB On Fri, Oct 25, 2024 at 12:17:19PM +0200, Eric Auger wrote: Hi Eric, I'm new to Arm, so please bear with my questions :) > This RFC series introduces a KVM host "custom" model. (a) On terminology: as we know, in the x86 world, QEMU uses these terms[1]: - Host passthrough - Named CPU models - Then there's the libvirt abstraction, "host-model", that aims to provide the best of 'host-passthrough' + named CPU models. Now I see the term "host 'custom' model" here. Most management-layer tools and libvirt users are familiar with the classic terms "host-model" or "custom". If we now say "host 'custom' model", it can create confusion. I hope we can settle on one of the existing terms, or create a new term if need be. (I'll share one more thought on how layers above libvirt tend to use the term "custom", as a reply to patch 21/21, "arm/cpu-features: Document custom vcpu model".) (b) The current CPU features doc[2] for Arm doesn't mention "host passthrough" at all. It is only implied by the last part of this paragraph, from the section titled "A note about CPU models and KVM"[3]: "Named CPU models generally do not work with KVM. There are a few cases that do work [...] but mostly if KVM is enabled the 'host' CPU type must be used." Related: in your reply[4] to Dan in this series, you write: "Having named models is the next thing". So named CPU models will be a thing in Arm, too? Then the above statement in the Arm 'cpu-features' will need updating :-) [...] > - the QEMU layer does not take care of IDREG field value consistency. > The kernel neither. I imagine this could be the role of the upper > layer to implement a vcpu profile that makes sure settings are > consistent. Here we come to "named" models. What should they look > like on ARM? Are there reasons why they can't be similar to how x86 reports in `qemu-system-x86 -cpu help`? E.g. If it's an NVIDIA "Grace A02" (Neoverse-V2) host, it can report: [gracehopper] $> qemu-kvm -cpu help Available CPUs: gracehopper-neoverse-v2 cortex-a57 (deprecated) host max Or whatever is the preferred nomenclature for ARM. It also gives users of both x86 and ARM deployments a consistent expectation. Currently on a "Grace A02" ("Neoverse-V2") machine, it reports: [gracehopper] $> qemu-kvm -cpu help Available CPUs: cortex-a57 (deprecated) host max I see it's because there are no named models yet on ARM :-) [...] [1] https://www.qemu.org/docs/master/system/i386/cpu.html [2] https://www.qemu.org/docs/master/system/arm/cpu-features.html [3] https://www.qemu.org/docs/master/system/arm/cpu-features.html#a-note-about-cpu-models-and-kvm [4] https://lists.nongnu.org/archive/html/qemu-arm/2024-10/msg00891.html -- /kashyap