Linux IOMMU Development
 help / color / mirror / Atom feed
From: Nicolin Chen <nicolinc@nvidia.com>
To: Steve Sistare <steven.sistare@oracle.com>
Cc: <iommu@lists.linux.dev>, Jason Gunthorpe <jgg@nvidia.com>,
	Kevin Tian <kevin.tian@intel.com>
Subject: Re: [PATCH V4 9/9] iommufd: map file selftest
Date: Fri, 18 Oct 2024 15:51:43 -0700	[thread overview]
Message-ID: <ZxLmfyfXJ2wN72DD@Asurada-Nvidia> (raw)
In-Reply-To: <1729286856-127844-10-git-send-email-steven.sistare@oracle.com>

On Fri, Oct 18, 2024 at 02:27:36PM -0700, Steve Sistare wrote:
> 
> Add test cases to exercise IOMMU_IOAS_MAP_FILE.
[...]
> +static int _test_ioctl_ioas_map_file(int fd, unsigned int ioas_id, int mfd,
> +                                    size_t start, size_t length, __u64 *iova,
> +                                    unsigned int flags)
> +{
> +       struct iommu_ioas_map_file cmd = {
> +               .size = sizeof(cmd),
> +               .flags = flags,
> +               .ioas_id = ioas_id,
> +               .fd = mfd,
> +               .start = start,
> +               .length = length,
> +       };
> +       int ret;
> +
> +       if (flags & IOMMU_IOAS_MAP_FIXED_IOVA)
> +               cmd.iova = *iova;
> +
> +       ret = ioctl(fd, IOMMU_IOAS_MAP_FILE, &cmd);

For a new ioctl command, There should a TEST_LENGTH in
TEST_F(iommufd, cmd_length).

Also, we might need something in iommufd_fail_nth.c too.

Thanks
Nicolin

  reply	other threads:[~2024-10-18 22:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18 21:27 [PATCH V4 0/9] iommu_ioas_map_file Steve Sistare
2024-10-18 21:27 ` [PATCH V4 1/9] mm/gup: folio_add_pins Steve Sistare
2024-10-18 21:27 ` [PATCH V4 2/9] iommufd: rename uptr in iopt_alloc_iova Steve Sistare
2024-10-22 18:32   ` Nicolin Chen
2024-10-18 21:27 ` [PATCH V4 3/9] iommufd: generalize iopt_pages address Steve Sistare
2024-10-22 18:38   ` Nicolin Chen
2024-10-18 21:27 ` [PATCH V4 4/9] iommufd: pfn reader local variables Steve Sistare
2024-10-18 21:27 ` [PATCH V4 5/9] iommufd: folio subroutines Steve Sistare
2024-10-21 17:30   ` Jason Gunthorpe
2024-10-22 13:26     ` Steven Sistare
2024-10-18 21:27 ` [PATCH V4 6/9] iommufd: pfn reader for file mappings Steve Sistare
2024-10-19 18:41   ` kernel test robot
2024-10-21 17:32   ` Jason Gunthorpe
2024-10-18 21:27 ` [PATCH V4 7/9] iommufd: IOMMU_IOAS_MAP_FILE Steve Sistare
2024-10-21 17:34   ` Jason Gunthorpe
2024-10-18 21:27 ` [PATCH V4 8/9] iommufd: file mappings for mdev Steve Sistare
2024-10-18 21:27 ` [PATCH V4 9/9] iommufd: map file selftest Steve Sistare
2024-10-18 22:51   ` Nicolin Chen [this message]
2024-10-22 13:27     ` Steven Sistare

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=ZxLmfyfXJ2wN72DD@Asurada-Nvidia \
    --to=nicolinc@nvidia.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=kevin.tian@intel.com \
    --cc=steven.sistare@oracle.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