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 X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A855C282CE for ; Wed, 13 Feb 2019 11:50:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 52127222B2 for ; Wed, 13 Feb 2019 11:50:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391836AbfBMLuv (ORCPT ); Wed, 13 Feb 2019 06:50:51 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:52434 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726413AbfBMLuu (ORCPT ); Wed, 13 Feb 2019 06:50:50 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EB0EEA78; Wed, 13 Feb 2019 03:50:49 -0800 (PST) Received: from e107981-ln.cambridge.arm.com (e107981-ln.cambridge.arm.com [10.1.197.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6CD4D3F557; Wed, 13 Feb 2019 03:50:47 -0800 (PST) Date: Wed, 13 Feb 2019 11:50:44 +0000 From: Lorenzo Pieralisi To: Michael Kelley Cc: "m.maya.nakamura" , "bhelgaas@google.com" , "linux-pci@vger.kernel.org" , KY Srinivasan , Stephen Hemminger , "olaf@aepfle.de" , "apw@canonical.com" , "jasowang@redhat.com" , Sasha Levin , "linux-kernel@vger.kernel.org" , "driverdev-devel@linuxdriverproject.org" , Haiyang Zhang , vkuznets , "marcelo.cerri@canonical.com" Subject: Re: [PATCH v2 1/2] PCI: hv: Replace hv_vp_set with hv_vpset Message-ID: <20190213115044.GB25260@e107981-ln.cambridge.arm.com> References: <2fa660dc51189316590021c4ee8aeaac79b8270f.1548489092.git.m.maya.nakamura@gmail.com> <20190129054930.GA1269@m-hyperV> <20190212163529.GB28306@e107981-ln.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 13, 2019 at 02:20:29AM +0000, Michael Kelley wrote: > From: Lorenzo Pieralisi Sent: Tuesday, February 12, 2019 8:35 AM > > > > On Mon, Jan 28, 2019 at 09:49:32PM -0800, Maya Nakamura wrote: > > > On Sun, Jan 27, 2019 at 05:11:48AM +0000, Michael Kelley wrote: > > > > From: Maya Nakamura Sent: Saturday, January 26, > > 2019 12:52 AM > > > > > > > > > > Remove a duplicate definition of VP set (hv_vp_set) and use the common > > > > > definition (hv_vpset) that is used in other places. > > > > > > > > > > Change the order of the members in struct hv_pcibus_device so that the > > > > > declaration of retarget_msi_interrupt_params is the last member. Struct > > > > > hv_vpset, which contains a flexible array, is nested two levels deep in > > > > > struct hv_pcibus_device via retarget_msi_interrupt_params. > > > > > > > > > > Add a comment that retarget_msi_interrupt_params should be the last member > > > > > of struct hv_pcibus_device. > > > > > > > > > > Signed-off-by: Maya Nakamura > > > > > --- > > > > > Change in v2: > > > > > - None > > > > > > > > > > > > > Right -- there was no code change. But it's customary to note that > > > > you updated the commit message. > > > > > > > Thank you for your feedback. I will edit the change log in v3. > > > > > > > Reviewed-by: Michael Kelley > > > > Are you really sure there is no behavioural change ? What piece of > > code allocates hv_vpset.bank_contents[] memory with this patch applied ? > > > > I suspect the current code does not use hv_vpset for this specific > > reason, ie allocate struct hv_vp_set.masks array memory statically. > > > > There is indeed no behavior change. A full page of memory is > allocated in hv_pci_probe() so that we can be sure that the Hyper-V > hypercall arguments don't cross a page boundary. This page allows > more than enough space for the hv_vpset.bank_contents[] to grow > as needed (with one bit allocated in the masks for up to the limit > of 8192 CPUs allowed by Linux). A flexible array is used because > the hv_vpset structure is also used in some MMU hypercalls that > have two variable size arrays. I see, thanks for explaining. Lorenzo