lkml.org 
[lkml]   [2023]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 3/5] iommufd: Add IOMMU_GET_HW_INFO
On Fri, Aug 18, 2023 at 12:04:29AM +0000, Liu, Yi L wrote:

> > From: Nicolin Chen <nicolinc@nvidia.com>
> > Sent: Friday, August 18, 2023 5:08 AM
> >
> > Looks like Yi's latest code has not addressed these comments.
>
> Yeah. Not yet. In progress to incorporate them. 😊

I fixed them all in my local tree. I'm finalizing with alloc_user.
Let me send my branch after that, and you can edit upon :)

> > > > +int iommufd_get_hw_info(struct iommufd_ucmd *ucmd)
> > > > +{
> > > > + struct iommu_hw_info *cmd = ucmd->cmd;
> > > > + void __user *user_ptr = u64_to_user_ptr(cmd->data_uptr);
> > > > + const struct iommu_ops *ops;
> > > > + struct iommufd_device *idev;
> > > > + unsigned int data_len;
> > > > + unsigned int copy_len;
> > > > + void *data = NULL;
> > [..]
> > > > + } else {
> > > > + cmd->out_data_type = IOMMU_HW_INFO_TYPE_NONE;
> > > > + data_len = 0;
> > > > + data = NULL;
> > >
> > > data is already initialized as NULL.
>
> Probably we can set data_len = 0 and the out_data_type to _NONE is
> the top as well. Any preference?

Yea we can do that. Let me change it.

Thanks
Nic

\
 
 \ /
  Last update: 2023-08-18 02:11    [W:0.080 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site