Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1752713pxb; Fri, 18 Feb 2022 14:50:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIkSEwWCh7bpSPnSoXyltssU5dTruqkj85LsJzzHkamdvtZQonGG+Um6vZ4jrKqJ45NZuX X-Received: by 2002:a63:ff14:0:b0:373:fe56:b97a with SMTP id k20-20020a63ff14000000b00373fe56b97amr1355032pgi.201.1645224624888; Fri, 18 Feb 2022 14:50:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645224624; cv=none; d=google.com; s=arc-20160816; b=owj/7P31KMs/mE3uqAqMW8FbQ/ACHOoJ56iu03DpxKED5fg+fdUY8swIXQ7522EhYJ oVN5XXiJqVlBDStX308kNeZXHbD1yU7VlFap+6UXoePV6ZNUNE+mkrqip1Iac0+YaKVA xbfOVf6bV36kVWCLk4jkpApFDjSUTfOiBXo3nn/V3S6kojqO4yDRNLjih9pmLkJiOTq7 uGqAS9kFdGKFAuY4EFmn7G8XEhHO06HtDjOj0UvXPynWjG1yxr9rQ8mbvtyDWRnZKR3g 0czRIGBhPk2LrWgjdXCl+Ntv7+BvvRYm0vYDtWTnJKY68hDPjmKYDxa+ua9MozBXhxjB s6cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=uyireqeUxx+W1eVB2rdg/kA4tqDlfRnSBxG00YgQGz8=; b=LSf/pehiDff6B84mSLWY4Ua8zg8KOC3ItToTZh3q0jmrRXlccgGMz59vxEqqYxbbqT +5EAEYdDDHGtBYqLrgyHy359EB1dgwb9Kmu3G/h8vmRTWd/zx9nsumfDYbVeagyGHHcL /MNhYG7WnYjGee9Qaf/f4j1NMjD1paySRd1jpPRFAEiBxhjMp3ixzCXdS59RaV4jRUSn lLe75L5LQFWgh4j3QMExcl145yjkNRbXWnVbdLzWu54DRIjf9qSxI9EBt4dVV16sTIJQ 7vkhlhOO7d4Md2jMbVgX/2lKGe1eCsCOCFl16sm7yKvvSERsVL9wKdhqpxZRWaXHHNXZ WKJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=XcxmcJSt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w8si3374500pfc.168.2022.02.18.14.50.07; Fri, 18 Feb 2022 14:50:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=XcxmcJSt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238155AbiBRRGt (ORCPT + 99 others); Fri, 18 Feb 2022 12:06:49 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:40392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238148AbiBRRGr (ORCPT ); Fri, 18 Feb 2022 12:06:47 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9544F54; Fri, 18 Feb 2022 09:06:25 -0800 (PST) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 21IGcTtv036408; Fri, 18 Feb 2022 17:06:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=uyireqeUxx+W1eVB2rdg/kA4tqDlfRnSBxG00YgQGz8=; b=XcxmcJStXwjoyTg5Hnr4tfbppqolTmzKLrOXo8MSW748JGsX6xQV7dRjAY2zdZ7xcnqg aw0tScSJfhsmcp1jYfiw11qCQGEGgSGFQ+4zm504V79aVEK2aPmdmkC/yADTr6GFUHw8 +nxACHWwZW94VbMkNeprZjgaxGKx4dU+Icr1i/VFPC6wh/SyNAbannCX2XMEIDB30eC/ BqbCbtLT5TbRQHf/UKuZqgPIZm+VxH4bKPWFkO9KhpUvWYPxvl1qzjkH3LtiO5HzvCnw dLH/fdQTgfI39aAWzchVIfHIrOopBfegx/ofreMxCyEiC+3lMvjiTtdraoEqvHECD+uz aA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3eaexx8thh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Feb 2022 17:06:25 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 21IGdKri038207; Fri, 18 Feb 2022 17:06:25 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 3eaexx8tgm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Feb 2022 17:06:24 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 21IH3uqO013656; Fri, 18 Feb 2022 17:06:22 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06ams.nl.ibm.com with ESMTP id 3e645kkkb6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Feb 2022 17:06:22 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 21IH6JG740894916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 18 Feb 2022 17:06:19 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 11DD0A404D; Fri, 18 Feb 2022 17:06:19 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 59F6FA4051; Fri, 18 Feb 2022 17:06:18 +0000 (GMT) Received: from [9.171.47.189] (unknown [9.171.47.189]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 18 Feb 2022 17:06:18 +0000 (GMT) Message-ID: <96fe20ac-bea0-7eee-cfb5-198a906e5399@linux.ibm.com> Date: Fri, 18 Feb 2022 18:08:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH v7 1/1] s390x: KVM: guest support for topology function Content-Language: en-US To: Heiko Carstens Cc: Nico Boehr , kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, borntraeger@de.ibm.com, frankja@linux.ibm.com, cohuck@redhat.com, david@redhat.com, thuth@redhat.com, imbrenda@linux.ibm.com, gor@linux.ibm.com, wintera@linux.ibm.com, seiden@linux.ibm.com References: <20220217095923.114489-1-pmorel@linux.ibm.com> <20220217095923.114489-2-pmorel@linux.ibm.com> <97af6268-ff7a-cfb6-5ea4-217b5162cfe7@linux.ibm.com> From: Pierre Morel In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: IfpfTVUfv_1JqyrBaifEhsDRus0ke-EX X-Proofpoint-ORIG-GUID: CE2b7bsqyAYz6ALk1vfk_x_DvWs5WNqZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-18_07,2022-02-18_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 impostorscore=0 mlxlogscore=993 spamscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 adultscore=0 malwarescore=0 mlxscore=0 suspectscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202180109 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/18/22 16:10, Heiko Carstens wrote: >>>> +       /* The real CPU backing up the vCPU moved to another socket >>>> */ >>>> +       if (topology_physical_package_id(vcpu->cpu) != >>>> +           topology_physical_package_id(vcpu->arch.prev_cpu)) >>>> +               return true; >>> >>> Why is it OK to look just at the physical package ID here? What if the >>> vcpu for example moves to a different book, which has a core with the >>> same physical package ID? >>> >> >> You are right, we should look at the drawer and book id too. >> Something like that I think: >> >> if ((topology_physical_package_id(vcpu->cpu) != >> topology_physical_package_id(vcpu->arch.prev_cpu)) || >> (topology_book_id(vcpu->cpu) != >> topology_book_id(vcpu->arch.prev_cpu)) || >> (topology_drawer_id(vcpu->cpu) != >> topology_drawer_id(vcpu->arch.prev_cpu))) >> return true; > > You only need to check if prev_cpu is present in topology_core_cpumask(cpu). > Yes, thanks. Regards, Pierre -- Pierre Morel IBM Lab Boeblingen