From: Alex Williamson <alex.williamson@redhat.com>
To: Nipun Gupta <nipun.gupta@amd.com>
Cc: <jgg@ziepe.ca>, <linux-kernel@vger.kernel.org>,
<kvm@vger.kernel.org>, <masahiroy@kernel.org>,
<nathan@kernel.org>, <ndesaulniers@google.com>,
<nicolas@fjasle.eu>, <git@amd.com>, <harpreet.anand@amd.com>,
<pieter.jansen-van-vuuren@amd.com>, <nikhil.agarwal@amd.com>,
<michal.simek@amd.com>
Subject: Re: [PATCH v3] vfio/cdx: add support for CDX bus
Date: Mon, 17 Apr 2023 08:20:40 -0600 [thread overview]
Message-ID: <20230417082040.16e0ac18.alex.williamson@redhat.com> (raw)
In-Reply-To: <20230417083725.20193-1-nipun.gupta@amd.com>
On Mon, 17 Apr 2023 14:07:25 +0530
Nipun Gupta <nipun.gupta@amd.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,
Alex
next prev parent reply other threads:[~2023-04-17 14:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 8:37 Nipun Gupta
2023-04-17 14:20 ` Alex Williamson [this message]
2023-04-18 4:19 ` Gupta, Nipun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230417082040.16e0ac18.alex.williamson@redhat.com \
--to=alex.williamson@redhat.com \
--cc=git@amd.com \
--cc=harpreet.anand@amd.com \
--cc=jgg@ziepe.ca \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.simek@amd.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nicolas@fjasle.eu \
--cc=nikhil.agarwal@amd.com \
--cc=nipun.gupta@amd.com \
--cc=pieter.jansen-van-vuuren@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®