Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp787281pxk; Thu, 3 Sep 2020 12:34:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9dQ16kPLXVPZo9Lbzw4fHXXpnesQXuhPxZFd8f60TyMfR4Sjyufr3KI/Tq0mBsv5MiwLM X-Received: by 2002:aa7:ca17:: with SMTP id y23mr4951712eds.245.1599161664835; Thu, 03 Sep 2020 12:34:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599161664; cv=none; d=google.com; s=arc-20160816; b=EWpWESIEg5aXhUcRb5MbhxPfjN/+GDCAPqjPLPgDEO2aF9V5Yl1jzR19spGwZhEGgX GpzEkvPgPHE1pvrSpevmVMPBqhJ82TkJCsg8/nhfbBz9cYs4n+2/71NYmbX9pnKszkXK OU1U4KMX4WSvp502jRKcBDMQXMiwiRVJ+SUJjDQE2adNIMG12pV7MWB5Exskaj5q3mKq G5STvbjP1xUv9LFPUXcPPecc+dXxJ+fQGfwEcNMzzsgC9FIChe+feEGnZYWM4Y4QMFIr oPxhkz8E6YtA44FTjlAlKRhNVw1JCo3lqrVue+qbN5rv8fEbuF869ayRN5UNnMQNL3Ig KS4Q== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NjRbFQN0jy+9PVzOV1DngDcnZQr/B/lMY6u9dSYSfaU=; b=gQW/777jOnkTYO1/xYD0kIlUmNg2CKIPOTozWlBCZE5sLc31aeT4s312+8hVkI2LaP DnoejxK/azSzNDY+OJzUJDUlNHakWqPVUOceQCIvsVhHxFcywXJDMyqvQO6ilxA3laLe IOVe3UWrekHKRby9iMz/iyr71QHFcRh4hOs8ZmuN1EteJx+SDWqLJHVwi16gYYNBI0Vc hDb45JQv9PIpnoAqnhQVWu9OJmlR9OlQEMCTsYzrtAXgFE5dNC83+nnRrLBpIvkiU1Dz TrFJM91u6wmxu0YIykMXQMKnvUOAvoXHZ1xudLeW64aq+T7PljOv+NK0gkOsqSn8YCAQ p1kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pd+LUsxN; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w14si2450556edx.50.2020.09.03.12.34.00; Thu, 03 Sep 2020 12:34:24 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=pd+LUsxN; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729238AbgICTcL (ORCPT + 99 others); Thu, 3 Sep 2020 15:32:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:43524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729186AbgICTcJ (ORCPT ); Thu, 3 Sep 2020 15:32:09 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CE58B20722; Thu, 3 Sep 2020 19:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599161528; bh=urgC3XANEqd0OtMfhUa14aYGKX59FNTKMoZUM/RdZNg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pd+LUsxNe52ZEcOcy7XM6gU3S3XAxJ0TlLFoHQ0qFIYKwrhFw8TCflvu6vlK+jdOm NTdmYwWz1LsLcwVkfDh3HkzlOj2sD2FQl2ALBdhXI5LxK1ljMSXNObQXJtC5WA2YGB XkFTk2jMTHTAijkpMsc8HjFZs7WXJdQpNr7150T8= Date: Thu, 3 Sep 2020 21:32:30 +0200 From: Greg KH To: Iouri Tarassov Cc: Sasha Levin , kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, iourit@microsoft.com, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, spronovo@microsoft.com Subject: Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code Message-ID: <20200903193230.GA2044018@kroah.com> References: <20200814123856.3880009-1-sashal@kernel.org> <20200814123856.3880009-2-sashal@kernel.org> <20200814130406.GC56456@kroah.com> <20200828061257.GB56396@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 03, 2020 at 11:55:16AM -0700, Iouri Tarassov wrote: > Hi Greg, > > I appreciate your comments and working to address them. > > On 8/27/2020 11:12 PM, Greg KH wrote: > > As for "matching names", why does that matter? Who sees both names at > > the same time? > > > > > > > > endian issues? > > > > > > If not, why are these bit fields? > > > This matches the definition on the Windows side. Windows only works on > > > little endian platforms. > > > > But Linux works on both, so you need to properly document/handle this somehow. > This driver works only in a Linux container in conjunction with the Windows > host. The structure definitions are? the same on the host and the container. > The driver will not be enabled or work on platforms, where Windows does not > run. That's fine, you can create your structures in a way that works no matter what endian is in use, in very simple ways. Don't rely on bit fields like this in a structure to actually work the way you think they work (hint, compilers hate them and do horrible things with them usually...) So do it that way please, especially for when you are passing things across the user/kernel boundry. It's much simpler and easier to do it right now, than to have to fix it up later. thanks, greg k-h