Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp249204ybv; Wed, 12 Feb 2020 23:26:49 -0800 (PST) X-Google-Smtp-Source: APXvYqwW79Dh3/e8xtAn5DIdsq1z2prtVx+Ru4m0aI1Y2pMSlNshgU9fkOtu3se0WDC2Gv56L7ai X-Received: by 2002:a9d:7f11:: with SMTP id j17mr12935201otq.281.1581578809021; Wed, 12 Feb 2020 23:26:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581578809; cv=none; d=google.com; s=arc-20160816; b=xxHL7qF8F5u+zkZM5KzrHYmS6Ourlh1tZQExTqUs5m5Og+tqgoJGViVzX8+Zhx4ubo uOEuBLuMBFYWl8abBkFUhUznbyuEaE6qjKpyEGpDk5As5zGAWL2AqJ7qVUW9pBrXm+5D S0HLcphixnNDMor3GVPgT5Js66ub4BzXmlq/RWpivy2StNCKSgdlN/0wImjqwLpnnKQi /Kn94SutkIlVVb3IpmOaAuHBIkQWn3XYtNpT+047LspPxfTpSZHSfuqcqvLEFpdVeJAA PXQcojdLKPQhGk4wscE8Xnk+jPblCzoQVsmkLy4K7ZvqGUttnD3+5CjNIsRBUQ6cSfiq gnmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=7afNFB8me/fcXvHEJ/JbjcmGZzZNdhFYzAAETu8NEbc=; b=cx6RB4L0MtLrfsOrirMg13i3TL72JqdFlOM3Jdwrw87jN4eCeXY5kyY/oh1FJ9fEDs y+4znIOnSfSEucbWTdiCfaabf4S4h5uCFj/suMhX/p4czvAcdTmvRG8Gz5d4wlNtZ3p3 yKkEDCQLLphVfdNITR05Q6gaEubM4N2JHzAR3YyRJAxbJ0Z7u1vsbBwRw746tsfrkuNt c6i1R1wNrwmScV5bOJyT4afX//g8gT2BtNMwo3LBO+BX3otiACPUnzQ36ERVc+13pELO UEdYB56dKYDZuYDQCOwd6i4nH48iPt9eVtdlRFC9wgDsfha4SVCCZJ/EoyVjGcx6PqWW ZVKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CJJbyFaU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i20si674559otk.270.2020.02.12.23.26.36; Wed, 12 Feb 2020 23:26:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CJJbyFaU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729839AbgBMH03 (ORCPT + 99 others); Thu, 13 Feb 2020 02:26:29 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:45917 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729383AbgBMH03 (ORCPT ); Thu, 13 Feb 2020 02:26:29 -0500 Received: by mail-qk1-f196.google.com with SMTP id a2so4722534qko.12; Wed, 12 Feb 2020 23:26:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=7afNFB8me/fcXvHEJ/JbjcmGZzZNdhFYzAAETu8NEbc=; b=CJJbyFaUT0wShMPCnHyAerAv1p/FLh/75t1o2pTxajbxTRaLR/fB/1fy2Kfe3e24zz qwa1XZYuPJiMeczcb1yZ3QDIo7VBJbZzuqrGM4PoXkHOUPoN0AvdpcQL1RZ8dGlonknC lkh0a1x/IyrJwZKWQXlLwB8XLhev81qAJSjMpO8uR087bOY+o2PsZ0UTT/H/SfTjv6Pq 6DyiU7Hymwm6Q8NyFsjm3oIaVAj1U4Q6KPLHHZtwaOcjrD7hBUM5K2SB4pe9NOeDSa8K LgdRtS84sYIq8CbUZTNB6oAkiRParteG3adCzz24m8oOEnG4MA/Err8kkb0pg3SFRJTo iPCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7afNFB8me/fcXvHEJ/JbjcmGZzZNdhFYzAAETu8NEbc=; b=Gfn3yNwG25ZFfK/qakolABme1DLpMZi/C89UVJCTbsYU46FEtzP6h4SNl6KGkkYTLE L5vhqUOD6/I9foehT+d7FAqQ3IaVdxNcDp+G4EzB7R99agGqeiSuYlsFZSzR+Lj34yW0 msLxPFxYPTFo85VsClHGF1d+Bqxcv8ma02eEdWx2JZdobheyowYjbg8+TyyzSn30NPu+ 0BDdDrXpmlQSwvhVX/WctBT+DNyCGbCTGsPAinErkAhz2ciVLGqJ6TB1V15inn3fZyQ3 rN6r2axnFVDV3tptXUTZqP1PwVbwuZfzAHuMo+ag++U9QzEmDeO++kwnqsbAZM1QyZuu omrA== X-Gm-Message-State: APjAAAUiybmpYryzozAtQW0Yu9a9ULsxDPCr46D+5+Hw4GZ++Bsubjmi Zj/S0HAkHl+rh5KIT+uzAlM= X-Received: by 2002:a37:488f:: with SMTP id v137mr13898536qka.16.1581578787579; Wed, 12 Feb 2020 23:26:27 -0800 (PST) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id v10sm1066872qtj.26.2020.02.12.23.26.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Feb 2020 23:26:26 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id B8CC221D25; Thu, 13 Feb 2020 02:26:25 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 13 Feb 2020 02:26:25 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrieejgdduuddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeeuohhquhhn ucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecukfhppeehvd drudehhedrudduuddrjedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepsghoqhhunhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthi dqieelvdeghedtieegqddujeejkeehheehvddqsghoqhhunhdrfhgvnhhgpeepghhmrghi lhdrtghomhesfhhigihmvgdrnhgrmhgv X-ME-Proxy: Received: from localhost (unknown [52.155.111.71]) by mail.messagingengine.com (Postfix) with ESMTPA id 773123280059; Thu, 13 Feb 2020 02:26:24 -0500 (EST) Date: Thu, 13 Feb 2020 15:26:23 +0800 From: Boqun Feng To: Dexuan Cui Cc: "linux-pci@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Michael Kelley , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , Sasha Levin , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "x86@kernel.org" , Lorenzo Pieralisi , Andrew Murray , Bjorn Helgaas , Andrew Murray Subject: Re: [PATCH v3 2/3] PCI: hv: Move retarget related structures into tlfs header Message-ID: <20200213072623.GE69108@debian-boqun.qqnc3lrjykvubdpftowmye0fmh.lx.internal.cloudapp.net> References: <20200210033953.99692-1-boqun.feng@gmail.com> <20200210033953.99692-3-boqun.feng@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 13, 2020 at 04:17:34AM +0000, Dexuan Cui wrote: > > From: linux-hyperv-owner@vger.kernel.org > > On Behalf Of Boqun Feng > > Sent: Sunday, February 9, 2020 7:40 PM > > > > Currently, retarget_msi_interrupt and other structures it relys on are > > defined in pci-hyperv.c. However, those structures are actually defined > > in Hypervisor Top-Level Functional Specification [1] and may be > > different in sizes of fields or layout from architecture to > > architecture. Let's move those definitions into x86's tlfs header file > > to support virtual PCI on non-x86 architectures in the future. Note that > > "__packed" attribute is added to these structures during the movement > > for the same reason as we use the attribute for other TLFS structures in > > the header file: make sure the structures meet the specification and > > avoid anything unexpected from the compilers. > > > > Additionally, rename struct retarget_msi_interrupt to > > hv_retarget_msi_interrupt for the consistent naming convention, also > > mirroring the name in TLFS. > > > > diff --git a/arch/x86/include/asm/hyperv-tlfs.h > > b/arch/x86/include/asm/hyperv-tlfs.h > > + > > +struct hv_device_interrupt_target { > > + u32 vector; > > + u32 flags; > > + union { > > + u64 vp_mask; > > + struct hv_vpset vp_set; > > + }; > > +} __packed; > > + > > +/* HvRetargetDeviceInterrupt hypercall */ > > Reviewed-by: Dexuan Cui > Thanks! > Just a small thing: would it be slightly better if we change the name > in the above line to HVCALL_RETARGET_INTERRUPT ? > > HVCALL_RETARGET_INTERRUPT is a define, so it may help to locate the > actual value of the define here. And, HVCALL_RETARGET_INTERRUPT is > used several times in the patchset so IMO we'd better always use > the same name. This might be a good suggestion, however, throughout the TLFS header, camel case is more commonly used for referencing hypercall. For example: /* HvCallSendSyntheticClusterIpi hypercall */ So I think it's better to let it as it is for this patch, and later on, if we reach a consensus, we can convert the names all together. Thoughts? Regards, Boqun