From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABFD71EB56 for ; Mon, 22 Jul 2024 11:56:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721649385; cv=none; b=aa3WlLcDRqsVV/cyRvG4c+28datcTSY8uesDAbuEpj+Mhd59KXIuJ1u75AR7+6dW+ThzXDl8iSRPCTioJ/GX/4aCwnaHc1Vw5BMr3DbgFKjORX30cAn2HBsqNCYWegWHz0OgIEIDQxZweWsfc4NP5jG5ePeDDYYxtXU3LcT8Bfg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721649385; c=relaxed/simple; bh=evCGxNNKtGdd7+zzHvIPxEQwKZ1xpY5z3XB/p5lEbz0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=jXwe/OeaKAYr/vxttuiiditXjvlg3IqL9T4C9b19Ah7gJZ1gZmKTdTf3aH5UBchLPxuEr8KeL9rn+Wz/+RhIHRK6OMsRgNPqc0Irp7Imyym7gNuSucKBxF6nHFOiTICl6/70CjL2r8V9FzFKcRlxaYvWlACOCH/lOX1NPYMS49c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=KUkq69JQ; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KUkq69JQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721649382; 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=lYDl5sIhPvDgTfoHlN8PA/tdUOLQIuS/j96hYp8nn7w=; b=KUkq69JQU2szA9aAAiHzzVLSc4iR0hkNeJGHXyt5RD2m2JSJDarSGFEmZMlcFJEBqNlRrb /ScGNDXLRSCF74IqyWb8yfFYzHIqA8ZOqsIJGj161pfwLoNM27MILtx7TQpO9XE1RDI5eB 59UWnYNmi6J8Wtbca8oLFDoKsUtahXg= Received: from mx-prod-mc-04.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-665-aZ5uOBE9M22_s-WhrSY-7w-1; Mon, 22 Jul 2024 07:56:15 -0400 X-MC-Unique: aZ5uOBE9M22_s-WhrSY-7w-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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1ECAE1944B29; Mon, 22 Jul 2024 11:56:12 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.65]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 669573000188; Mon, 22 Jul 2024 11:56:10 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 67E0E21E668F; Mon, 22 Jul 2024 13:56:08 +0200 (CEST) From: Markus Armbruster To: Zhao Liu Cc: Daniel P . =?utf-8?Q?Berrang=C3=A9?= , Eduardo Habkost , Marcel Apfelbaum , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Yanan Wang , "Michael S . Tsirkin" , Paolo Bonzini , Richard Henderson , Eric Blake , Marcelo Tosatti , Alex =?utf-8?Q?Benn=C3=A9e?= , Peter Maydell , Jonathan Cameron , Sia Jee Heng , qemu-devel@nongnu.org, kvm@vger.kernel.org, qemu-riscv@nongnu.org, qemu-arm@nongnu.org, Zhenyu Wang , Dapeng Mi , Yongwei Ma Subject: Re: [PATCH 1/8] hw/core: Make CPU topology enumeration arch-agnostic In-Reply-To: <20240704031603.1744546-2-zhao1.liu@intel.com> (Zhao Liu's message of "Thu, 4 Jul 2024 11:15:56 +0800") References: <20240704031603.1744546-1-zhao1.liu@intel.com> <20240704031603.1744546-2-zhao1.liu@intel.com> Date: Mon, 22 Jul 2024 13:56:08 +0200 Message-ID: <87wmld4p47.fsf@pond.sub.org> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Zhao Liu writes: > Cache topology needs to be defined based on CPU topology levels. Thus, > define CPU topology enumeration in qapi/machine.json to make it generic > for all architectures. > > To match the general topology naming style, rename CPU_TOPO_LEVEL_SMT > and CPU_TOPO_LEVEL_PACKAGE to CPU_TOPO_LEVEL_THREAD and > CPU_TOPO_LEVEL_SOCKET. > > Also, enumerate additional topology levels for non-i386 arches, and add > a CPU_TOPO_LEVEL_DEFAULT to help future smp-cache object de-compatibilize > arch-specific cache topology settings. > > Signed-off-by: Zhao Liu QAPI schema Acked-by: Markus Armbruster > --- > Changes since RFC v2: > * Dropped cpu-topology.h and cpu-topology.c since QAPI has the helper > (CpuTopologyLevel_str) to convert enum to string. (Markus) > * Fixed text format in machine.json (CpuTopologyLevel naming, 2 spaces > between sentences). (Markus) > * Added a new level "default" to de-compatibilize some arch-specific > topo settings. (Daniel) > * Moved CpuTopologyLevel to qapi/machine-common.json, at where the > cache enumeration and smp-cache object would be added. > - If smp-cache object is defined in qapi/machine.json, storage-daemon > will complain about the qmp cmds in qapi/machine.json during > compiling. At some point, we may have to rethink the split between machine.json, machine-target.json, and machine-common.json. Not this patch's problem.