Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp636194pxb; Thu, 21 Apr 2022 07:18:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxK798B+wRLHKj+i1PFe8gyUsvVYmsrxxuMZRLJ5US2vSiGEMzRfhnnS2J266zxKZ2+wv9j X-Received: by 2002:a17:906:9554:b0:6e8:97db:2d82 with SMTP id g20-20020a170906955400b006e897db2d82mr23623687ejy.83.1650550708965; Thu, 21 Apr 2022 07:18:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650550708; cv=none; d=google.com; s=arc-20160816; b=zUY6dYjffVbKas8pYWcd09TI9IGXh5h/+s8vuy36zAtpV6AzE4GNSApciojjF8dY3U qDbwn8joys9To41fRs2L0tnqUH3NHDOitJpPJxLq+YWXDIJCGhF9Tmp2q/Be79K+rLMo GTso4KNmL+buRxLTA8h2+2EaZ/CaxN+35hHVdaFLaDCpXSdQtTcmPRWPUg/y/bQSjUt8 9hYSAebWMGNiZI5uYexMI2f5I7ITbiWBu0/mnfnVREeCIo6NosyS2tu1NbCQEHZOQAso K+TnGvBINO9FiNGqKbNcVk9JG+jjpJCel7xz45CrhMEbo7Wbl72Ifb8jP5iX5uKtCASN pN4Q== 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=iCgUOzBhDfl6Q/aq4LR70HlGXG5TAEqD5SgugqIK7/o=; b=ZsrdlpP51+5t6PEeEeCmy1q3OTvmbvVxm4dYRLUcWPlZ68bC32SibJJoAUQJlUNU9s I6pxngPit+lzzkeerdKw+JL3WiY+OwnnH1k0YydAzXMBU+myXnbQx9dph7EjNjOAP0P5 4zGs0ljyTaTntHy62Zgjzexnxb8ZSSPDQTjS9Dn5jfDRe7YxWFhcKsyQcmW6zPbymPPF oNWCbsv4JZvocL1aM2v1RHVo0xNI6Bif0nctEpNkTH3m/WAUcvp+WLKHFE7XxmcJrTFE EZWISOOiO7Xab0w1uGQLD2bpsTqNKk1AH6vk4X0JikCsTHJaoBVXnONANh4TZijSVosY V06g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=KMaOUgYS; 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 i18-20020aa7dd12000000b00423c939fba1si3303649edv.291.2022.04.21.07.18.04; Thu, 21 Apr 2022 07:18:28 -0700 (PDT) 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=KMaOUgYS; 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 S1378428AbiDTMNH (ORCPT + 99 others); Wed, 20 Apr 2022 08:13:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352815AbiDTMND (ORCPT ); Wed, 20 Apr 2022 08:13:03 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0616E237C8; Wed, 20 Apr 2022 05:10:17 -0700 (PDT) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23K9KKgH024495; Wed, 20 Apr 2022 12:10:16 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=iCgUOzBhDfl6Q/aq4LR70HlGXG5TAEqD5SgugqIK7/o=; b=KMaOUgYSwDEaO76AhrgE6Q0xw9E52NMzNKofBA3nE/Rj5NrV7QAZPvKM5CjMih0BkLs/ 0f5QQf/qHWxqnoL+omAF/86oufqGV6HS0veKynYGX1Aaoo1Be9S4L8r0L94M/K7U05+V F8ge/ASN+I1PRGcd4M18ur5ymFONo8b7qEHWfg9GQDqIAHeV44DUnxzKmN7l3kgDwWyH 0IS81bVW6Ux8TcEE0PTWHtWchJgHG+A7tmOBRN0wKZTH9rjFdSWzsafBiuo2ed7XUHGw yo/oU+ZyULVXC8q28S9Qnw8UKtGtKfJT2VH6YDUvLSGn1LzGb/286a5T3JbpvBSjyMXt lQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjff2u8k7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Apr 2022 12:10:16 +0000 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23KC8EcH013057; Wed, 20 Apr 2022 12:10:16 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fjff2u8hx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Apr 2022 12:10:16 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23KC8mdl030107; Wed, 20 Apr 2022 12:10:13 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma01fra.de.ibm.com with ESMTP id 3ffne8vx56-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Apr 2022 12:10:13 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23KCALe46750794 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Apr 2022 12:10:21 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7D2CA11C052; Wed, 20 Apr 2022 12:10:10 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C839411C04A; Wed, 20 Apr 2022 12:10:09 +0000 (GMT) Received: from [9.171.58.217] (unknown [9.171.58.217]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 20 Apr 2022 12:10:09 +0000 (GMT) Message-ID: <75a152f6-2ea3-8af9-ca9a-5493c3ac885e@linux.ibm.com> Date: Wed, 20 Apr 2022 14:13:27 +0200 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 v8 1/2] s390x: KVM: guest support for topology function Content-Language: en-US To: Heiko Carstens Cc: 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, nrb@linux.ibm.com References: <20220420113430.11876-1-pmorel@linux.ibm.com> <20220420113430.11876-2-pmorel@linux.ibm.com> From: Pierre Morel In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: zItRefrBfeE5ux2YTOmHTHvjNgormApQ X-Proofpoint-ORIG-GUID: x4tiqNpaDvKIjuO6jMd7KOJubM6WDBII X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-20_03,2022-04-20_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxlogscore=980 adultscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 bulkscore=0 phishscore=0 suspectscore=0 priorityscore=1501 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204200073 X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS 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 4/20/22 14:05, Heiko Carstens wrote: >> +static inline bool kvm_s390_topology_changed(struct kvm_vcpu *vcpu) >> +{ >> + if (!test_kvm_facility(vcpu->kvm, 11)) >> + return false; >> + >> + /* A new vCPU has been hotplugged */ >> + if (vcpu->arch.prev_cpu == S390_KVM_TOPOLOGY_NEW_CPU) >> + return true; >> + >> + /* The real CPU backing up the vCPU moved to another socket */ >> + if (cpumask_test_cpu(vcpu->cpu, >> + topology_core_cpumask(vcpu->arch.prev_cpu))) >> + return true; >> + >> + return false; >> +} > > This seems to be wrong. I'd guess that you need > > if (cpumask_test_cpu(vcpu->cpu, > topology_core_cpumask(vcpu->arch.prev_cpu))) > --> return false; > --> return true; > /o\ I do not know if I can do this right at the end! Thanks, I send an update immediately Pierre -- Pierre Morel IBM Lab Boeblingen