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=-15.5 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 43132C433E0 for ; Tue, 2 Feb 2021 17:06:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1298164E9A for ; Tue, 2 Feb 2021 17:06:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237167AbhBBRFi (ORCPT ); Tue, 2 Feb 2021 12:05:38 -0500 Received: from mail-wm1-f47.google.com ([209.85.128.47]:40292 "EHLO mail-wm1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237166AbhBBRDc (ORCPT ); Tue, 2 Feb 2021 12:03:32 -0500 Received: by mail-wm1-f47.google.com with SMTP id c127so2922274wmf.5; Tue, 02 Feb 2021 09:03:16 -0800 (PST) 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:user-agent; bh=DD+251eGktrSTImPGVbBwQ3z1hqdMBWG31qVIVIXP5o=; b=fStGpbTmQ9RsYNxFFwZdQVV0O/3zB+ex7Q625Arm2BpuT+VPQSAXF7DIyrCJgg7zUj i2FRWye1CguYTlBxKf17U/i9+YF38zmLd5oyMj2FWwNC0WsqkF2xhr4TQweMmNLGhWSi hQEweJiIVEVFde7oKSu3sMgKppFK553YzcGS27/KidRx1s9wQNs4P2YSwffwRdJkiqAl H9UXrW8U+QxjhcVl42lt1aPElfD2upiuDnp7joVj1q/UtVMDgGpqCn+MIwqCCl7CZUuk 4DBXD85K+MnXLqtS9KkR8GKLL0xZAsiJNsZEIZRyBDYKgK/PXvZVvobnbSjm8Bph/nQx 3i4Q== X-Gm-Message-State: AOAM532xSER91QRvq77oMlhc4OvIXSbkjKGWHdrB3hHVmPi/0k6OYznY F+SJkcDzZBFKX9izvMJECoc= X-Google-Smtp-Source: ABdhPJwsEMGnEjA/NKpbirU1u3HMobdNK7rrUiV5kMJbI1JoH9E/2vjXHtijtgxHb7IEQSN6sjawmQ== X-Received: by 2002:a7b:c041:: with SMTP id u1mr4506508wmc.161.1612285370649; Tue, 02 Feb 2021 09:02:50 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id r17sm18597208wro.46.2021.02.02.09.02.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:02:50 -0800 (PST) Date: Tue, 2 Feb 2021 17:02:48 +0000 From: Wei Liu To: Michael Kelley Cc: Wei Liu , Linux on Hyper-V List , "virtualization@lists.linux-foundation.org" , Linux Kernel List , Vineeth Pillai , Sunil Muthuswamy , Nuno Das Neves , "pasha.tatashin@soleen.com" , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , Arnd Bergmann , "open list:GENERIC INCLUDE/ASM HEADER FILES" Subject: Re: [PATCH v5 13/16] asm-generic/hyperv: introduce hv_device_id and auxiliary structures Message-ID: <20210202170248.4hds554cyxpuayqc@liuwe-devbox-debian-v2> References: <20210120120058.29138-1-wei.liu@kernel.org> <20210120120058.29138-14-wei.liu@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@vger.kernel.org On Tue, Jan 26, 2021 at 01:26:52AM +0000, Michael Kelley wrote: > From: Wei Liu Sent: Wednesday, January 20, 2021 4:01 AM > > > > We will need to identify the device we want Microsoft Hypervisor to > > manipulate. Introduce the data structures for that purpose. > > > > They will be used in a later patch. > > > > Signed-off-by: Sunil Muthuswamy > > Co-Developed-by: Sunil Muthuswamy > > Signed-off-by: Wei Liu > > --- > > include/asm-generic/hyperv-tlfs.h | 79 +++++++++++++++++++++++++++++++ > > 1 file changed, 79 insertions(+) > > > > diff --git a/include/asm-generic/hyperv-tlfs.h b/include/asm-generic/hyperv-tlfs.h > > index 8423bf53c237..42ff1326c6bd 100644 > > --- a/include/asm-generic/hyperv-tlfs.h > > +++ b/include/asm-generic/hyperv-tlfs.h > > @@ -623,4 +623,83 @@ struct hv_set_vp_registers_input { > > } element[]; > > } __packed; > > > > +enum hv_device_type { > > + HV_DEVICE_TYPE_LOGICAL = 0, > > + HV_DEVICE_TYPE_PCI = 1, > > + HV_DEVICE_TYPE_IOAPIC = 2, > > + HV_DEVICE_TYPE_ACPI = 3, > > +}; > > + > > +typedef u16 hv_pci_rid; > > +typedef u16 hv_pci_segment; > > +typedef u64 hv_logical_device_id; > > +union hv_pci_bdf { > > + u16 as_uint16; > > + > > + struct { > > + u8 function:3; > > + u8 device:5; > > + u8 bus; > > + }; > > +} __packed; > > + > > +union hv_pci_bus_range { > > + u16 as_uint16; > > + > > + struct { > > + u8 subordinate_bus; > > + u8 secondary_bus; > > + }; > > +} __packed; > > + > > +union hv_device_id { > > + u64 as_uint64; > > + > > + struct { > > + u64 :62; > > + u64 device_type:2; > > + }; > > Are the above 4 lines extraneous junk? > If not, a comment would be helpful. And we > would normally label the 62 bit field as > "reserved0" or something similar. > No. It is not junk. I got this from a header in tree. I am inclined to just drop this hunk. If that breaks things, I will use "reserved0". Wei.