Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp46438iob; Tue, 3 May 2022 11:19:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiRb42sR6FLQlwQokQW+OreJ1SL+0sOeHDIA0aD41IiunRRFZaPVWHwcJWhwr7as0j6YFO X-Received: by 2002:a05:6a00:140e:b0:4e1:c81a:625c with SMTP id l14-20020a056a00140e00b004e1c81a625cmr17130512pfu.39.1651601943542; Tue, 03 May 2022 11:19:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651601943; cv=none; d=google.com; s=arc-20160816; b=asVqRX+1TqTPsryGfvp8h987Ryy3JFnaMTkazW+5z+1O8Io9vq9ayC17JaK40DTz8I B/AhwrmFHyqzK4KYW+qU7vhINjc8/N0Y7jRuWmFXujMeJX9kHC8xDE8lco3KUrI0Znni iEmmQ8p2PRa6pTWzx1xeXuwEY7bMXG+sOHBL6FGw/GoDbgbyBefDEe89zUbVd+1Azn7j d9nVro+dBYal8kAxIOpvLORu9H0p4pQFQRJDEJX+hqmrKkNqfBr8qHsSo3wQFOMy+944 DCiJJfSZ6YvkOcbMef/E1J5r2M+0t6SGyQG8rxjk7Ban/f1N1ibeDBTO+rcotG7GWdHp JZvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=XyarcUrf0R465efktdUAleuyj6ZDMyzyVobCRnMSWN8=; b=hXA27vHMV0gwOQg3vAsTePDz1fpDgBTJENo/TtEOlXdV6qiBIXOD3nDAlE3UucTyaC wC8a5fwLc70lz6TEhnh3LJp3ib5etZqa9FFSawszbVX+UOe8NKDplJdiu/X3FDkQUo7Q OsX3EcrBfU/ef6asGKCYVYmUoOp/N8Krxb4oeRTao0iKlf+e7o7Mzc/QQROf6SvAYMo3 +Vs2tqvljDTFr+KQm6pfoNUZcQQ30kmCCUh527WbbY+bl/pxil+V0PY0tWxaZTSRaRHF D4TkihPR/Xt2HMNJ+2SWLm4OE1AufAO34ikYz6HMb791TzG/GudhglYqUXwuLyoPviG7 y28w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NZEMNqQy; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rj2-20020a17090b3e8200b001dc069321b0si2846917pjb.161.2022.05.03.11.18.43; Tue, 03 May 2022 11:19:03 -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=@redhat.com header.s=mimecast20190719 header.b=NZEMNqQy; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237637AbiECPDV (ORCPT + 99 others); Tue, 3 May 2022 11:03:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237619AbiECPDT (ORCPT ); Tue, 3 May 2022 11:03:19 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 50F8E39801 for ; Tue, 3 May 2022 07:59:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651589986; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XyarcUrf0R465efktdUAleuyj6ZDMyzyVobCRnMSWN8=; b=NZEMNqQyHoUtZ7ZxJZorjtj/VytvWaInuumxBz0JR99oTUVfEDgP+6BV3JUCCXsoafZ9g6 TcvEXdEvpPnk0h0INmsIQy+/gOcB+hk1gqo7CYgZ+i1Fk0F0USgYiqOxZ2dZP3N0BubmuR ZhEDhxLAdRyINFRdCnIklz7MVwrG0/M= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-340-59-kKbrXPAOVc7ZAM1zFeA-1; Tue, 03 May 2022 10:59:33 -0400 X-MC-Unique: 59-kKbrXPAOVc7ZAM1zFeA-1 Received: by mail-wm1-f70.google.com with SMTP id 26-20020a05600c021a00b003940660c053so5774693wmi.2 for ; Tue, 03 May 2022 07:59:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=XyarcUrf0R465efktdUAleuyj6ZDMyzyVobCRnMSWN8=; b=6IPW8hiDAUv+REXFZjXZ0vfKKJb62byRe7VuueU58ihxpuZIQhKvoq/zPwN6RkxhNk 0L+b9k/ojKbB/jIVgWjBnf6IV/a1Zdwo9MyiUsMKut85GJ0Q7xKF8FKe3ZZoO+Amut+4 uGWpKA8ci39Gl5uN7Ewq4gWqUxDy3eC97a06i1WEkG6Blhs59rU4aShKT0VyVJJ14aOM zuIANyG4sDqvda+GbH834LpxmJyoM1sI3Sgw8wua/bNATpTDpPxrz1Pu7oQdz2qi/MHu ccQHbdPI26jA8Z1Fl/SI+OOm2+MQvq1RCxmKDUnM+nIhIDkTUJhcrMlXe/fComuo7+34 Wo1w== X-Gm-Message-State: AOAM533xqnVTLY6P3dMPLheIOq/egYlPxPfxpOuJW+/Sec6bZBuJm97U R9T5k2d56xiCrgJ3CZgvtlMd3ugqUBtnf0QjPt0UNmbJrTgBBqpWJ/kQpyRL5wQFaXo4de0fVMA IIp2hpRI7fOtudGvaytA6qUNN X-Received: by 2002:a05:600c:3b1f:b0:394:5399:a34 with SMTP id m31-20020a05600c3b1f00b0039453990a34mr1536988wms.40.1651589954226; Tue, 03 May 2022 07:59:14 -0700 (PDT) X-Received: by 2002:a05:600c:3b1f:b0:394:5399:a34 with SMTP id m31-20020a05600c3b1f00b0039453990a34mr1536968wms.40.1651589954045; Tue, 03 May 2022 07:59:14 -0700 (PDT) Received: from fedora (nat-2.ign.cz. [91.219.240.2]) by smtp.gmail.com with ESMTPSA id j28-20020a05600c1c1c00b003942a244f39sm1828183wms.18.2022.05.03.07.59.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 May 2022 07:59:13 -0700 (PDT) From: Vitaly Kuznetsov To: Christophe JAILLET Cc: Sean Christopherson , Wanpeng Li , Jim Mattson , Michael Kelley , Siddharth Chandrasekaran , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Paolo Bonzini Subject: Re: [PATCH v3 07/34] x86/hyperv: Introduce HV_MAX_SPARSE_VCPU_BANKS/HV_VCPUS_PER_SPARSE_BANK constants In-Reply-To: <19a812b3-73b4-7e5a-8885-ec652598a5ce@wanadoo.fr> References: <20220414132013.1588929-1-vkuznets@redhat.com> <20220414132013.1588929-8-vkuznets@redhat.com> <19a812b3-73b4-7e5a-8885-ec652598a5ce@wanadoo.fr> Date: Tue, 03 May 2022 16:59:12 +0200 Message-ID: <87ee1a3bnj.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Christophe JAILLET writes: > Le 14/04/2022 =C3=A0 15:19, Vitaly Kuznetsov a =C3=A9crit=C2=A0: ... >> @@ -224,7 +225,7 @@ static inline int __cpumask_to_vpset(struct hv_vpset= *vpset, >> * structs are not cleared between calls, we risk flushing unneeded >> * vCPUs otherwise. >> */ >> - for (vcpu_bank =3D 0; vcpu_bank <=3D hv_max_vp_index / 64; vcpu_bank++) >> + for (vcpu_bank =3D 0; vcpu_bank <=3D max_vcpu_bank; vcpu_bank++) >> vpset->bank_contents[vcpu_bank] =3D 0; > > and here: > bitmap_clear(vpset->bank_contents, 0, hv_max_vp_index); > or maybe even if it is safe to do so: > bitmap_zero(vpset->bank_contents, hv_max_vp_index); Both your suggestions (including the one for "PATCH v3 07/34]") look good to me, thanks! I'd however want to send them to linux-hyperv@ separately when this series lands through KVM tree just to not make this heavy series even heavier. --=20 Vitaly