From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: Vivek Gautam <vivek.gautam@arm.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
iommu@lists.linux-foundation.org,
virtualization@lists.linux-foundation.org, joro@8bytes.org,
will.deacon@arm.com, mst@redhat.com, robin.murphy@arm.com,
eric.auger@redhat.com, kevin.tian@intel.com,
jacob.jun.pan@linux.intel.com, yi.l.liu@intel.com,
Lorenzo.Pieralisi@arm.com, shameerali.kolothum.thodi@huawei.com
Subject: Re: [PATCH RFC v1 10/11] uapi/virtio-iommu: Add a new request type to send page response
Date: Tue, 21 Sep 2021 17:16:10 +0100 [thread overview]
Message-ID: <YUoFSrAK2gi3GWp/@myrica> (raw)
In-Reply-To: <20210423095147.27922-11-vivek.gautam@arm.com>
On Fri, Apr 23, 2021 at 03:21:46PM +0530, Vivek Gautam wrote:
> Once the page faults are handled, the response has to be sent to
> virtio-iommu backend, from where it can be sent to the host to
> prepare the response to a generated io page fault by the device.
> Add a new virt-queue request type to handle this.
>
> Signed-off-by: Vivek Gautam <vivek.gautam@arm.com>
> ---
> include/uapi/linux/virtio_iommu.h | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/include/uapi/linux/virtio_iommu.h b/include/uapi/linux/virtio_iommu.h
> index c12d9b6a7243..1b174b98663a 100644
> --- a/include/uapi/linux/virtio_iommu.h
> +++ b/include/uapi/linux/virtio_iommu.h
> @@ -48,6 +48,7 @@ struct virtio_iommu_config {
> #define VIRTIO_IOMMU_T_PROBE 0x05
> #define VIRTIO_IOMMU_T_ATTACH_TABLE 0x06
> #define VIRTIO_IOMMU_T_INVALIDATE 0x07
> +#define VIRTIO_IOMMU_T_PAGE_RESP 0x08
>
> /* Status types */
> #define VIRTIO_IOMMU_S_OK 0x00
> @@ -70,6 +71,23 @@ struct virtio_iommu_req_tail {
> __u8 reserved[3];
> };
>
> +struct virtio_iommu_req_page_resp {
> + struct virtio_iommu_req_head head;
> + __le32 domain;
I don't think we need this field, since the fault report doesn't come with
a domain.
> + __le32 endpoint;
> +#define VIRTIO_IOMMU_PAGE_RESP_PASID_VALID (1 << 0)
To be consistent with the rest of the document this would be
VIRTIO_IOMMU_PAGE_RESP_F_PASID_VALID
> + __le32 flags;
> + __le32 pasid;
> + __le32 grpid;
> +#define VIRTIO_IOMMU_PAGE_RESP_SUCCESS (0x0)
> +#define VIRTIO_IOMMU_PAGE_RESP_INVALID (0x1)
> +#define VIRTIO_IOMMU_PAGE_RESP_FAILURE (0x2)
> + __le16 resp_code;
> + __u8 pasid_valid;
This field isn't needed since there already is
VIRTIO_IOMMU_PAGE_RESP_PASID_VALID
> + __u8 reserved[9];
> + struct virtio_iommu_req_tail tail;
> +};
I'd align the size of the struct to 16 bytes, but I don't think that's
strictly necessary.
Thanks,
Jean
> +
> struct virtio_iommu_req_attach {
> struct virtio_iommu_req_head head;
> __le32 domain;
> --
> 2.17.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-09-21 16:19 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 9:51 [PATCH RFC v1 00/11] iommu/virtio: vSVA support with Arm Vivek Gautam
2021-04-23 9:51 ` [PATCH RFC v1 01/11] uapi/virtio-iommu: Add page request grp-id and flags information Vivek Gautam
2021-09-21 15:58 ` Jean-Philippe Brucker
2021-09-30 4:56 ` Vivek Kumar Gautam
2021-09-30 8:49 ` Jean-Philippe Brucker
2021-09-30 10:57 ` Vivek Kumar Gautam
2021-04-23 9:51 ` [PATCH RFC v1 02/11] iommu/virtio: Maintain a list of endpoints served by viommu_dev Vivek Gautam
2021-09-21 15:59 ` Jean-Philippe Brucker
2021-09-30 9:17 ` Vivek Kumar Gautam
2021-04-23 9:51 ` [PATCH RFC v1 03/11] iommu/virtio: Handle incoming page faults Vivek Gautam
2021-09-21 16:03 ` Jean-Philippe Brucker
2021-10-11 8:11 ` Vivek Gautam
2021-10-11 9:16 ` Jean-Philippe Brucker
2021-10-11 9:20 ` Vivek Kumar Gautam
2021-04-23 9:51 ` [PATCH RFC v1 04/11] iommu/virtio: Add a io page fault queue Vivek Gautam
2021-04-23 9:51 ` [PATCH RFC v1 05/11] iommu/virtio: Add SVA feature and related enable/disable callbacks Vivek Gautam
2021-09-21 16:04 ` Jean-Philippe Brucker
2021-04-23 9:51 ` [PATCH RFC v1 06/11] iommu/pasid-table: Add pasid table ops for shared context management Vivek Gautam
2021-04-23 9:51 ` [PATCH RFC v1 07/11] iommu/arm-smmu-v3: Move shared context descriptor code to cd-lib Vivek Gautam
2021-04-23 9:51 ` [PATCH RFC v1 08/11] iommu/arm-smmu-v3: Implement shared context alloc and free ops Vivek Gautam
2021-09-21 16:07 ` Jean-Philippe Brucker
2021-09-30 9:50 ` Vivek Kumar Gautam
2021-04-23 9:51 ` [PATCH RFC v1 09/11] iommu/virtio: Implement sva bind/unbind calls Vivek Gautam
2021-09-21 16:09 ` Jean-Philippe Brucker
2021-04-23 9:51 ` [PATCH RFC v1 10/11] uapi/virtio-iommu: Add a new request type to send page response Vivek Gautam
2021-09-21 16:16 ` Jean-Philippe Brucker [this message]
2021-09-30 9:24 ` Vivek Kumar Gautam
2021-10-06 9:55 ` Jean-Philippe Brucker
2021-04-23 9:51 ` [PATCH RFC v1 11/11] iommu/virtio: Add support " Vivek Gautam
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=YUoFSrAK2gi3GWp/@myrica \
--to=jean-philippe@linaro.org \
--cc=Lorenzo.Pieralisi@arm.com \
--cc=eric.auger@redhat.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jacob.jun.pan@linux.intel.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=robin.murphy@arm.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=vivek.gautam@arm.com \
--cc=will.deacon@arm.com \
--cc=yi.l.liu@intel.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).