Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-09-03 Thread Greg KH
On Thu, Sep 03, 2020 at 02:39:05PM -0700, Iouri Tarassov wrote: > Hi Greg, > > On 8/27/2020 11:18 PM, Greg KH wrote: > > On Thu, Aug 27, 2020 at 05:25:23PM -0700, Iouri Tarassov wrote: > > > > > +bool dxghwqueue_acquire_reference(struct dxghwqueue *hwqueue) > > > > > +{ > > > > > + return refc

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-09-03 Thread Iouri Tarassov
Hi Greg, On 8/27/2020 11:18 PM, Greg KH wrote: On Thu, Aug 27, 2020 at 05:25:23PM -0700, Iouri Tarassov wrote: > > > +bool dxghwqueue_acquire_reference(struct dxghwqueue *hwqueue) > > > +{ > > > +return refcount_inc_not_zero(&hwqueue->refcount); > > > +} > > > > Midlayers are evil. > I

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-09-03 Thread Greg KH
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 is

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-09-03 Thread Iouri Tarassov
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

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-27 Thread Greg KH
On Thu, Aug 27, 2020 at 05:25:23PM -0700, Iouri Tarassov wrote: > > > +bool dxghwqueue_acquire_reference(struct dxghwqueue *hwqueue) > > > +{ > > > + return refcount_inc_not_zero(&hwqueue->refcount); > > > +} > > > > Midlayers are evil. > I strongly agree in general, but think that in our case the

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-27 Thread Greg KH
On Thu, Aug 27, 2020 at 05:25:23PM -0700, Iouri Tarassov wrote: > > > +{ > > > + struct dxgprocess_adapter *adapter_info = dxgmem_alloc(process, > > > + > > > DXGMEM_PROCESS_ADAPTER, > > > +

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-27 Thread Greg KH
On Thu, Aug 27, 2020 at 04:45:55PM -0700, Iouri Tarassov wrote: > > On 8/14/2020 5:57 AM, Greg KH wrote: > > On Fri, Aug 14, 2020 at 08:38:53AM -0400, Sasha Levin wrote: > > > Add support for a Hyper-V based vGPU implementation that exposes the > > > DirectX API to Linux userspace. > > > > Api qu

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-27 Thread Greg KH
On Thu, Aug 27, 2020 at 05:05:44PM -0700, Iouri Tarassov wrote: > > On 8/14/2020 6:04 AM, Greg KH wrote: > > On Fri, Aug 14, 2020 at 08:38:53AM -0400, Sasha Levin wrote: > > > Add support for a Hyper-V based vGPU implementation that exposes the > > > DirectX API to Linux userspace. > > > > Signed-

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-27 Thread Greg KH
On Thu, Aug 27, 2020 at 04:29:59PM -0700, Iouri Tarassov wrote: > On 8/14/2020 5:55 AM, Greg KH wrote: > > On Fri, Aug 14, 2020 at 08:38:53AM -0400, Sasha Levin wrote: > > > Add support for a Hyper-V based vGPU implementation that exposes the > > > DirectX API to Linux userspace. > > > > Signed-off

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-27 Thread Iouri Tarassov
Hi Pavel, Thanks for your time reviewing the driver. On 8/21/2020 6:53 AM, Pavel Machek wrote: On Fri 2020-08-14 08:38:53, Sasha Levin wrote: > Add support for a Hyper-V based vGPU implementation that exposes the > DirectX API to Linux userspace. NAK. Kernel APIs should be documented. ... in

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-27 Thread Iouri Tarassov
On 8/14/2020 6:04 AM, Greg KH wrote: On Fri, Aug 14, 2020 at 08:38:53AM -0400, Sasha Levin wrote: > Add support for a Hyper-V based vGPU implementation that exposes the > DirectX API to Linux userspace. > > Signed-off-by: Sasha Levin > --- > drivers/hv/dxgkrnl/Kconfig | 10 + > drive

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-27 Thread Iouri Tarassov
On 8/14/2020 5:57 AM, Greg KH wrote: On Fri, Aug 14, 2020 at 08:38:53AM -0400, Sasha Levin wrote: > Add support for a Hyper-V based vGPU implementation that exposes the > DirectX API to Linux userspace. Api questions: > +struct d3dkmthandle { > + union { > + struct { > +

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-27 Thread Iouri Tarassov
On 8/14/2020 5:55 AM, Greg KH wrote: On Fri, Aug 14, 2020 at 08:38:53AM -0400, Sasha Levin wrote: > Add support for a Hyper-V based vGPU implementation that exposes the > DirectX API to Linux userspace. > > Signed-off-by: Sasha Levin Better, but what is this mess: > +#define ISERROR(ret)

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-27 Thread Iouri Tarassov
Thank you,Wei. These issues will be fixed in the next patchset. Iouri On 8/14/2020 6:18 AM, Wei Liu wrote: On Fri, Aug 14, 2020 at 08:38:53AM -0400, Sasha Levin wrote: [...] > + > +#include "dxgkrnl.h" > + > +int dxgadapter_init(struct dxgadapter *adapter, struct hv_device *hdev) > +{ > + int

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-26 Thread Iouri Tarassov
Hello On 8/14/2020 6:18 AM, Wei Liu wrote: On Fri, Aug 14, 2020 at 08:38:53AM -0400, Sasha Levin wrote: [...] > + > +#include "dxgkrnl.h" > + > +int dxgadapter_init(struct dxgadapter *adapter, struct hv_device *hdev) > +{ > + int ret = 0; > + char s[80]; > + > + UNUSED(s); If s is not used,

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-26 Thread Iouri Tarassov
On 8/14/2020 6:18 AM, Wei Liu wrote: On Fri, Aug 14, 2020 at 08:38:53AM -0400, Sasha Levin wrote: [...] + +#include "dxgkrnl.h" + +int dxgadapter_init(struct dxgadapter *adapter, struct hv_device *hdev) +{ + int ret = 0; + char s[80]; + + UNUSED(s); If s is not used, why not

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-21 Thread Pavel Machek
On Fri 2020-08-14 08:38:53, Sasha Levin wrote: > Add support for a Hyper-V based vGPU implementation that exposes the > DirectX API to Linux userspace. NAK. Kernel APIs should be documented. ... in tree and with suitable license. > +int dxgadapter_init(struct dxgadapter *adapter, struct

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-14 Thread Wei Liu
On Fri, Aug 14, 2020 at 08:38:53AM -0400, Sasha Levin wrote: [...] > + > +#include "dxgkrnl.h" > + > +int dxgadapter_init(struct dxgadapter *adapter, struct hv_device *hdev) > +{ > + int ret = 0; > + char s[80]; > + > + UNUSED(s); If s is not used, why not just remove it? Indeed it is

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-14 Thread Greg KH
On Fri, Aug 14, 2020 at 08:38:53AM -0400, Sasha Levin wrote: > Add support for a Hyper-V based vGPU implementation that exposes the > DirectX API to Linux userspace. > > Signed-off-by: Sasha Levin > --- > drivers/hv/dxgkrnl/Kconfig | 10 + > drivers/hv/dxgkrnl/Makefile | 12 + > dri

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-14 Thread Greg KH
On Fri, Aug 14, 2020 at 08:38:53AM -0400, Sasha Levin wrote: > Add support for a Hyper-V based vGPU implementation that exposes the > DirectX API to Linux userspace. Api questions: > +struct d3dkmthandle { > + union { > + struct { > + u32 instance: 6; > +

Re: [PATCH 1/4] drivers: hv: dxgkrnl: core code

2020-08-14 Thread Greg KH
On Fri, Aug 14, 2020 at 08:38:53AM -0400, Sasha Levin wrote: > Add support for a Hyper-V based vGPU implementation that exposes the > DirectX API to Linux userspace. > > Signed-off-by: Sasha Levin Better, but what is this mess: > +#define ISERROR(ret) (ret < 0)