Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp276091pxb; Wed, 3 Feb 2021 05:28:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiau5Zan1BtmAN27s1k6jmFa5Gxlss0W+jHuSznZWqiv1LIp7VbYzq0C8lZ8R72i5Ay0lI X-Received: by 2002:a17:906:c09:: with SMTP id s9mr3173693ejf.539.1612358901543; Wed, 03 Feb 2021 05:28:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612358901; cv=none; d=google.com; s=arc-20160816; b=CXqqusxAwALZZnImSlPvmcMxL0gsN8cV59N5w2tMljYREdjAiAeKs21fqi7TEv82s0 PWsQ7vfQlH+fStQsbpILoGFW9Dde8tsEoQc8WDfVUjcBLuZRuWiPPhb8CFzIQyt8aQVm kx/6/m/Snaf/lK2GBtqGi3RNkG+1tkOXX5lC4wzFwscXOG78IB4Ov2EwS2NVr7Tu3Cnu PjrWUlQShljdb1i9fvznB5rzK05TDxnypHYIG67Y8Ol/otwToWzpVuKJPDn5wV1NIyVx caSC7q9kYD8IoysBNGb/9f0qgZqdGuVhPi7Nv//s4GXD1+fdxfwZ3RgE6c0nTPJ1tv3n rm1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=y4q+v0wWRtdknCDT+I8fxPC73fGYrwzICDkzu3nG7So=; b=aGOqpcBlAronBPxjE7R4cL665EOh7REDQO/ncuV15Q6gOclxeKfZCUNMY1FSAqZPI2 d3YRmL5+GRVShL1/Rg/tizF8YbTqbIZ81cgS8n7saJxl4/8DTU8kOn3GJBA28CHx/X6k czdq80MVQm7eKxIJsMka6sypRpx7+bZNPvRRi2dR4rDDnuPuD1Z8g08s1cVMM+orvCLi iQlie0DAl6T/WmAYiXd37Szof9WdwH9HwTD0Pp+jg7JYE1RcJ0B7W1K6iFb6sGtzrgPL 8URMXBSg5B4Qyfu2RWuuqaIX03AjUyNxYS1BqLl+ULBX7/AVSPQU0FhnhbdDVdn1IvjN A5HA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o5si1131953edj.527.2021.02.03.05.27.56; Wed, 03 Feb 2021 05:28:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231664AbhBCN0s (ORCPT + 99 others); Wed, 3 Feb 2021 08:26:48 -0500 Received: from mail-wm1-f43.google.com ([209.85.128.43]:36678 "EHLO mail-wm1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231781AbhBCN0p (ORCPT ); Wed, 3 Feb 2021 08:26:45 -0500 Received: by mail-wm1-f43.google.com with SMTP id i9so5229102wmq.1; Wed, 03 Feb 2021 05:26:28 -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=y4q+v0wWRtdknCDT+I8fxPC73fGYrwzICDkzu3nG7So=; b=LAl2mYNV2CThFCk3/DvRkzFp9K8toivjFzUMuyEL55AnRk0j1Md6rJ3ODnkkQGibp1 BBGxE8iexOXcCXarOuhKvYG2HmnVWPhEBH/DZhzpR5E8VRA7ch+AUZdRgfqauS9jHOme m7yQpcATyg1w4uCE8FPxjzMSWRlH5Yz4PW4V+po3RD1+dj7IOw783IbgxGirlW8P4jxT pDOoYftGjgrKqSKZKM/SuD1mvnx5J/dAS5DY6uEHc7gOl08FsfvKbQCIUE++oPaD8kzO qW8odTTXpLqUPvSYqAhUEzq5edUKUwK8VljRjzKUrrK8PrQuE4ovSseDdvDftyc7EDi1 OXwA== X-Gm-Message-State: AOAM531Ta9HeFIhylXRZBX+PmjJrg3ByOPLpEhC4WSYMbAb0LrHKn+N1 H3CU5alt3sehAMXVfyHC7R4= X-Received: by 2002:a05:600c:204d:: with SMTP id p13mr2894128wmg.42.1612358763107; Wed, 03 Feb 2021 05:26:03 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id 62sm2937981wmd.34.2021.02.03.05.26.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Feb 2021 05:26:02 -0800 (PST) Date: Wed, 3 Feb 2021 13:26:01 +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: <20210203132601.ftpwgs57qtok47cg@liuwe-devbox-debian-v2> References: <20210120120058.29138-1-wei.liu@kernel.org> <20210120120058.29138-14-wei.liu@kernel.org> <20210202170248.4hds554cyxpuayqc@liuwe-devbox-debian-v2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210202170248.4hds554cyxpuayqc@liuwe-devbox-debian-v2> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 02, 2021 at 05:02:48PM +0000, Wei Liu wrote: > 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". > It turns out adding reserved0 is required. Dropping this hunk does not work. Wei.