Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1205807pxy; Fri, 23 Apr 2021 02:53:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/R+3YiqRaS6N7PDm8Z59Q+/GW2VK7K0BXuw5wbywVMcRpCXDPl0e0rKEcaOooOjLAsIG9 X-Received: by 2002:a17:906:154f:: with SMTP id c15mr3308500ejd.142.1619171601496; Fri, 23 Apr 2021 02:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619171601; cv=none; d=google.com; s=arc-20160816; b=yYbze3yotmz0jR7x+hlNs7BVVjc88Mq6fUj7aFfwVR3b9fHWAI7PS+g37/GqCIPylO u/+dtuzb2QlyVCduR+2wNZYEnXRnIeVfUh+loQpm6yRPuBNZrG+C+P+iIe+MNzaRwIwY Rnna7l0679yjxg7E1OZV2xWJK+t0wDaiW96igIB2Kgp1Eg9bY/3mhPLxD2cMNUGj2PDH SC30N32bjvLx0ps6QMWL4a5qZvafemeGXBrBN39I9C33VLILIhWJaD4Qzb4T7e9xK01M 2MAs7frGAgMITQLJoNkivRcctSK12Q2OYa3s+EzQ/1JT/4DZfsQoXgZn7dhTvMgAkDSA 6hAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=8CZNjVqUZ10qsX/pA96MsMzuym+uruykSXsfiDiiIa4=; b=Dly0JL22L7QRoexcEmwJgbtGedUkswLJH0UeGvGp6Q40v/oMx6rdCvQo0D13l1nZYe Vr6Hn9hEl0wbOQduxd7WoQkbrLVZpTD1TK0WfDpv2j75HNN1qt2F3m5E+3tZ4yn3ng8z RINJ5CP50gFf7Nc0FsE7QqRYVqtoU08e2+cF7AeuFkJjTFSDPBTyqzGQM8ToNX2Q9TRO /76in8KL4VRBrv6Iqz2E6SlB14up3W6DH8rrrjHsp0hckf2NhSvZ+8UK5W5ZwsnE9DXr rzpNPv54vkvOQGy7xqFpek/xtceMl5CEEs22TDluKq8tVer+v8qvpFdL3zKGAspTwjiS n5CQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z19si5094806ejx.595.2021.04.23.02.52.57; Fri, 23 Apr 2021 02:53:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241859AbhDWJwk (ORCPT + 99 others); Fri, 23 Apr 2021 05:52:40 -0400 Received: from foss.arm.com ([217.140.110.172]:60706 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241845AbhDWJwj (ORCPT ); Fri, 23 Apr 2021 05:52:39 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7F48513A1; Fri, 23 Apr 2021 02:52:03 -0700 (PDT) Received: from usa.arm.com (a074945.blr.arm.com [10.162.16.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DB7363F774; Fri, 23 Apr 2021 02:51:58 -0700 (PDT) From: Vivek Gautam To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, virtualization@lists.linux-foundation.org Cc: joro@8bytes.org, will.deacon@arm.com, mst@redhat.com, robin.murphy@arm.com, jean-philippe@linaro.org, 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, Vivek Gautam , Alex Williamson , Lorenzo Pieralisi Subject: [PATCH RFC v1 01/11] uapi/virtio-iommu: Add page request grp-id and flags information Date: Fri, 23 Apr 2021 15:21:37 +0530 Message-Id: <20210423095147.27922-2-vivek.gautam@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210423095147.27922-1-vivek.gautam@arm.com> References: <20210423095147.27922-1-vivek.gautam@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add fault information for group-id and necessary flags for page request faults that can be handled by page fault handler in virtio-iommu driver. Signed-off-by: Vivek Gautam Cc: Joerg Roedel Cc: Will Deacon Cc: Robin Murphy Cc: Jean-Philippe Brucker Cc: Eric Auger Cc: Alex Williamson Cc: Kevin Tian Cc: Jacob Pan Cc: Liu Yi L Cc: Lorenzo Pieralisi Cc: Shameerali Kolothum Thodi --- include/uapi/linux/virtio_iommu.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/uapi/linux/virtio_iommu.h b/include/uapi/linux/virtio_iommu.h index f8bf927a0689..accc3318ce46 100644 --- a/include/uapi/linux/virtio_iommu.h +++ b/include/uapi/linux/virtio_iommu.h @@ -307,14 +307,27 @@ struct virtio_iommu_req_invalidate { #define VIRTIO_IOMMU_FAULT_F_DMA_UNRECOV 1 #define VIRTIO_IOMMU_FAULT_F_PAGE_REQ 2 +#define VIRTIO_IOMMU_FAULT_PRQ_F_PASID_VALID (1 << 0) +#define VIRTIO_IOMMU_FAULT_PRQ_F_LAST_PAGE (1 << 1) +#define VIRTIO_IOMMU_FAULT_PRQ_F_PRIV_DATA (1 << 2) +#define VIRTIO_IOMMU_FAULT_PRQ_F_NEEDS_PASID (1 << 3) + +#define VIRTIO_IOMMU_FAULT_UNREC_F_PASID_VALID (1 << 0) +#define VIRTIO_IOMMU_FAULT_UNREC_F_ADDR_VALID (1 << 1) +#define VIRTIO_IOMMU_FAULT_UNREC_F_FETCH_ADDR_VALID (1 << 2) + struct virtio_iommu_fault { __u8 reason; __u8 reserved[3]; __le16 flt_type; __u8 reserved2[2]; + /* flags is actually permission flags */ __le32 flags; + /* flags for PASID and Page request handling info */ + __le32 pr_evt_flags; __le32 endpoint; __le32 pasid; + __le32 grpid; __u8 reserved3[4]; __le64 address; __u8 reserved4[8]; -- 2.17.1