[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CH3PR12MB830835EA2E32609A3EC52CC1E89D9@CH3PR12MB8308.namprd12.prod.outlook.com>
Date: Tue, 18 Apr 2023 04:19:55 +0000
From: "Gupta, Nipun" <Nipun.Gupta@....com>
To: Alex Williamson <alex.williamson@...hat.com>
CC: "jgg@...pe.ca" <jgg@...pe.ca>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"masahiroy@...nel.org" <masahiroy@...nel.org>,
"nathan@...nel.org" <nathan@...nel.org>,
"ndesaulniers@...gle.com" <ndesaulniers@...gle.com>,
"nicolas@...sle.eu" <nicolas@...sle.eu>,
"git (AMD-Xilinx)" <git@....com>,
"Anand, Harpreet" <harpreet.anand@....com>,
"Jansen Van Vuuren, Pieter" <pieter.jansen-van-vuuren@....com>,
"Agarwal, Nikhil" <nikhil.agarwal@....com>,
"Simek, Michal" <michal.simek@....com>
Subject: RE: [PATCH v3] vfio/cdx: add support for CDX bus
[AMD Official Use Only - General]
> -----Original Message-----
> From: Alex Williamson <alex.williamson@...hat.com>
> Sent: Monday, April 17, 2023 7:51 PM
> To: Gupta, Nipun <Nipun.Gupta@....com>
> Cc: jgg@...pe.ca; linux-kernel@...r.kernel.org; kvm@...r.kernel.org;
> masahiroy@...nel.org; nathan@...nel.org; ndesaulniers@...gle.com;
> nicolas@...sle.eu; git (AMD-Xilinx) <git@....com>; Anand, Harpreet
> <harpreet.anand@....com>; Jansen Van Vuuren, Pieter <pieter.jansen-
> van-vuuren@....com>; Agarwal, Nikhil <nikhil.agarwal@....com>; Simek,
> Michal <michal.simek@....com>
> Subject: Re: [PATCH v3] vfio/cdx: add support for CDX bus
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> On Mon, 17 Apr 2023 14:07:25 +0530
> Nipun Gupta <nipun.gupta@....com> wrote:
>
> > +static long vfio_cdx_ioctl(struct vfio_device *core_vdev,
> > + unsigned int cmd, unsigned long arg)
> > +{
> > + struct vfio_cdx_device *vdev =
> > + container_of(core_vdev, struct vfio_cdx_device, vdev);
> > + struct cdx_device *cdx_dev = to_cdx_device(core_vdev->dev);
> > + unsigned long minsz;
> > +
> > + switch (cmd) {
> > + case VFIO_DEVICE_GET_INFO:
> > + {
> > + struct vfio_device_info info;
> > +
> > + minsz = offsetofend(struct vfio_device_info, num_irqs);
> > +
> > + if (copy_from_user(&info, (void __user *)arg, minsz))
> > + return -EFAULT;
> > +
> > + if (info.argsz < minsz)
> > + return -EINVAL;
> > +
> > + info.flags = VFIO_DEVICE_FLAGS_CDX;
> > + info.flags = VFIO_DEVICE_FLAGS_RESET;
>
> Whoops, I think you mean |= for the latter one. Thanks,
Oh!! Will send a quick v4 fixing this.
Thanks,
Nipun
>
> Alex
Powered by blists - more mailing lists