From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 32C6DC77B73 for ; Tue, 2 May 2023 13:49:11 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptqMp-0005cc-Jd; Tue, 02 May 2023 09:48:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptqMn-0005cM-Vr for qemu-devel@nongnu.org; Tue, 02 May 2023 09:48:29 -0400 Received: from 3.mo548.mail-out.ovh.net ([188.165.32.156]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptqMm-00015U-0o for qemu-devel@nongnu.org; Tue, 02 May 2023 09:48:29 -0400 Received: from mxplan5.mail.ovh.net (unknown [10.108.1.108]) by mo548.mail-out.ovh.net (Postfix) with ESMTPS id E5D16211B3; Tue, 2 May 2023 13:48:23 +0000 (UTC) Received: from kaod.org (37.59.142.109) by DAG4EX2.mxp5.local (172.16.2.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 2 May 2023 15:48:22 +0200 Authentication-Results: garm.ovh; auth=pass (GARM-109S003748a7f8c-e69b-4ee6-a460-0fa02d316ab8, E090D36E4DC625C434D5D892E9869795142AB5A1) smtp.auth=clg@kaod.org X-OVh-ClientIp: 82.64.250.170 Message-ID: <00455f95-b2e2-2e3d-aeb4-e806418f1f46@kaod.org> Date: Tue, 2 May 2023 15:48:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v20 01/21] s390x/cpu topology: add s390 specifics to CPU topology Content-Language: en-US From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= To: Pierre Morel , CC: , , , , , , , , , , , , , , , , , , References: <20230425161456.21031-1-pmorel@linux.ibm.com> <20230425161456.21031-2-pmorel@linux.ibm.com> <0e575143-573f-9363-d8dc-103bb819d15b@kaod.org> In-Reply-To: <0e575143-573f-9363-d8dc-103bb819d15b@kaod.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [37.59.142.109] X-ClientProxiedBy: DAG9EX1.mxp5.local (172.16.2.81) To DAG4EX2.mxp5.local (172.16.2.32) X-Ovh-Tracer-GUID: dd42d1c5-36d7-447a-911f-1bbfc9586c04 X-Ovh-Tracer-Id: 1488158203183205331 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrfedviedgjedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfuffhvfevfhgjtgfgihesthekredttdefjeenucfhrhhomhepveorughrihgtucfnvgcuifhorghtvghruceotghlgheskhgrohgurdhorhhgqeenucggtffrrghtthgvrhhnpeegveegudfffeeigfdvteeukeefleetgeekgfefudekuedvjeduleeftdeihfdtffenucfkphepuddvjedrtddrtddruddpfeejrdehledrudegvddruddtledpkedvrdeigedrvdehtddrudejtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoegtlhhgsehkrghougdrohhrgheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepphhmohhrvghlsehlihhnuhigrdhisghmrdgtohhmpdhnshhgsehlihhnuhigrdhisghmrdgtohhmpdhnrhgssehlihhnuhigrdhisghmrdgtohhmpdhsvghiuggvnheslhhinhhugidrihgsmhdrtghomhdprghrmhgsrhhusehrvgguhhgrthdrtghomhdpvggslhgrkhgvsehrvgguhhgrthdrtghomhdpmhgrrhgtvghlrdgrphhfvghlsggruhhmsehgmhgrihhlrdgtohhmpdgvhhgrsghkohhsthesrhgvughhrghtrdgtohhmpdhkvhhmsehvgh gvrhdrkhgvrhhnvghlrdhorhhgpdhfrhgrnhhkjhgrsehlihhnuhigrdhisghmrdgtohhmpdhpsghonhiiihhnihesrhgvughhrghtrdgtohhmpdgtohhhuhgtkhesrhgvughhrghtrdgtohhmpdhthhhuthhhsehrvgguhhgrthdrtghomhdpuggrvhhiugesrhgvughhrghtrdgtohhmpdhrihgthhgrrhgurdhhvghnuggvrhhsohhnsehlihhnrghrohdrohhrghdpphgrshhitgeslhhinhhugidrihgsmhdrtghomhdpsghorhhnthhrrggvghgvrhesuggvrdhisghmrdgtohhmpdhqvghmuhdquggvvhgvlhesnhhonhhgnhhurdhorhhgpdhqvghmuhdqshefledtgiesnhhonhhgnhhurdhorhhgpdhmshhtsehrvgguhhgrthdrtghomhdpsggvrhhrrghnghgvsehrvgguhhgrthdrtghomhdpoffvtefjohhsthepmhhoheegkedpmhhouggvpehsmhhtphhouhht Received-SPF: pass client-ip=188.165.32.156; envelope-from=clg@kaod.org; helo=3.mo548.mail-out.ovh.net X-Spam_score_int: -32 X-Spam_score: -3.3 X-Spam_bar: --- X-Spam_report: (-3.3 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-1.422, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On 5/2/23 14:05, Cédric Le Goater wrote: > On 4/25/23 18:14, Pierre Morel wrote: >> S390 adds two new SMP levels, drawers and books to the CPU >> topology. >> The S390 CPU have specific topology features like dedication >> and entitlement to give to the guest indications on the host >> vCPUs scheduling and help the guest take the best decisions >> on the scheduling of threads on the vCPUs. >> >> Let us provide the SMP properties with books and drawers levels >> and S390 CPU with dedication and entitlement, > > I think CpuS390Entitlement should be introduced in a separate patch and > only under target/s390x/cpu.c. It is machine specific and doesn't belong > to the machine common definitions. > > 'books' and 'drawers' could also be considered z-specific but High End > POWER systems (16s) have similar topology concepts, at least for drawers : > a group of 4 sockets. So let's keep it that way. > > > This problably means you will have to rework the get/set property handlers > with strcmp() or simply copy the generated lookup struct : > > const QEnumLookup CpuS390Entitlement_lookup = { >     .array = (const char *const[]) { >         [S390_CPU_ENTITLEMENT_AUTO] = "auto", >         [S390_CPU_ENTITLEMENT_LOW] = "low", >         [S390_CPU_ENTITLEMENT_MEDIUM] = "medium", >         [S390_CPU_ENTITLEMENT_HIGH] = "high", >     }, >     .size = S390_CPU_ENTITLEMENT__MAX > }; > > It should be fine. The enum is required by the set-cpu-topology QMP command in patch 8. Forget my comment, it would require too much changes in your series to introduce CPU Entitlement independently. C.