From: Joerg Roedel <joro@8bytes.org>
To: Wesley Sheng <wesley.sheng@amd.com>
Cc: iommu@lists.linux-foundation.org, wesleyshenggit@sina.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/amd: Add prefetch iommu pages command build function
Date: Fri, 18 Sep 2020 10:49:11 +0200 [thread overview]
Message-ID: <20200918084911.GI31590@8bytes.org> (raw)
In-Reply-To: <20200905071420.20190-1-wesley.sheng@amd.com>
On Sat, Sep 05, 2020 at 03:14:20PM +0800, Wesley Sheng wrote:
> +static void build_pf_iommu_pages(struct iommu_cmd *cmd, u64 address,
> + u16 devid, int pfcnt, bool size,
> + bool inv)
> +{
> + memset(cmd, 0, sizeof(*cmd));
> +
> + address &= PAGE_MASK;
> +
> + cmd->data[0] = devid;
> + cmd->data[0] |= (pfcnt & 0xff) << 24;
> + cmd->data[2] = lower_32_bits(address);
> + cmd->data[3] = upper_32_bits(address;
> + if (size)
> + cmd->data[2] |= CMD_INV_IOMMU_PAGES_SIZE_MASK;
> + if (inv)
> + cmd->data[2] |= CMD_PF_IOMMU_PAGES_INV_MASK;
> + CMD_SET_TYPE(cmd, CMD_PF_IOMMU_PAGES);
> +}
This also needs to add a user of this function.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2020-09-18 8:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-05 7:14 [PATCH] iommu/amd: Add prefetch iommu pages command build function Wesley Sheng
2020-09-18 8:49 ` Joerg Roedel [this message]
2020-09-06 1:18 Wesley Sheng
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=20200918084911.GI31590@8bytes.org \
--to=joro@8bytes.org \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wesley.sheng@amd.com \
--cc=wesleyshenggit@sina.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;
as well as URLs for NNTP newsgroup(s).