From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Chao Gao <chao.gao@intel.com>
Cc: <xen-devel@lists.xenproject.org>,
Andrew Cooper <andrew.cooper3@citrix.com>,
George Dunlap <george.dunlap@citrix.com>,
Ian Jackson <iwj@xenproject.org>, Jan Beulich <jbeulich@suse.com>,
Julien Grall <julien@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
Kevin Tian <kevin.tian@intel.com>
Subject: Re: [PATCH v2] VT-d: Don't assume register-based invalidation is always supported
Date: Tue, 20 Apr 2021 17:08:15 +0200 [thread overview]
Message-ID: <YH7uX7RqqIS4zdBt@Air-de-Roger> (raw)
In-Reply-To: <20200401200606.48752-1-chao.gao@intel.com>
On Thu, Apr 02, 2020 at 04:06:06AM +0800, Chao Gao wrote:
> --- a/xen/drivers/passthrough/vtd/qinval.c
> +++ b/xen/drivers/passthrough/vtd/qinval.c
> @@ -442,6 +442,23 @@ int enable_qinval(struct vtd_iommu *iommu)
> return 0;
> }
>
> +static int vtd_flush_context_noop(struct vtd_iommu *iommu, uint16_t did,
> + uint16_t source_id, uint8_t function_mask,
> + uint64_t type, bool flush_non_present_entry)
> +{
> + dprintk(XENLOG_ERR VTDPREFIX, "IOMMU: Cannot flush CONTEXT.\n");
> + return -EIO;
> +}
> +
> +static int vtd_flush_iotlb_noop(struct vtd_iommu *iommu, uint16_t did,
> + uint64_t addr, unsigned int size_order,
> + uint64_t type, bool flush_non_present_entry,
> + bool flush_dev_iotlb)
> +{
> + dprintk(XENLOG_ERR VTDPREFIX, "IOMMU: Cannot flush IOTLB.\n");
> + return -EIO;
> +}
I think I would add an ASSERT_UNREACHABLE() to both noop handlers
above, as I would expect trying to use them without the proper mode
being configured would point to an error elsewhere?
Thanks, Roger.
next prev parent reply other threads:[~2021-04-20 15:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 20:06 [PATCH v2] VT-d: Don't assume register-based invalidation is always supported Chao Gao
2021-04-20 11:38 ` Jan Beulich
2021-04-20 12:14 ` Julien Grall
2021-04-20 12:25 ` Jan Beulich
2021-04-20 12:39 ` Julien Grall
2021-04-20 12:50 ` Jan Beulich
2021-04-20 13:00 ` Julien Grall
2021-04-20 12:41 ` Chao Gao
2021-04-20 15:08 ` Roger Pau Monné [this message]
2021-04-20 15:38 ` Jan Beulich
2021-04-20 16:17 ` Roger Pau Monné
2021-04-21 9:23 ` Jan Beulich
2021-04-21 11:31 ` Chao Gao
2021-04-25 1:20 ` Tian, Kevin
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=YH7uX7RqqIS4zdBt@Air-de-Roger \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=chao.gao@intel.com \
--cc=george.dunlap@citrix.com \
--cc=iwj@xenproject.org \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=kevin.tian@intel.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/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).