From patchwork Fri Nov 22 10:49:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 180037 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp66794ilf; Fri, 22 Nov 2019 03:16:17 -0800 (PST) X-Google-Smtp-Source: APXvYqwQUjF3OAuKYjzRmIkeysDo6Tnyra3wSO8DIHlEsQFx8DvaU+Q0YcffCb3DZLXFXNjNqkDS X-Received: by 2002:a50:b86c:: with SMTP id k41mr376156ede.181.1574421377433; Fri, 22 Nov 2019 03:16:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574421377; cv=none; d=google.com; s=arc-20160816; b=zuJN33R45SY0UmUcT62AGJ9OcF1LdhfURFZcB0O2V5ECEBizcfCe/9iEvvD9Im/q9h 9BsVsUdvQaIIr6+CDSJTUdXEJuoCFDhpk6hEAc2p1QaDIuLNMar7qc+I0GlhiJfaUOWb NvamckO9fvwPJhcIB2aQ60vT3vTIsQUGDvNTKQMDtqKeCDfMizRzXSdviL2qiwgQUiSz O7+/ut4t/XlFY3b+nPhFullFso2ZP4s6wrGV/K3PirJte+d0PfgFcyIqCx6Y9VH5ODIG i8vk03tiMiyexmEi7mrJJPfGQvDEg5PxYMNJsKPxJzuvVDNPO9I2XGxVB4wa2OwXRKoK chPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/inLver145cFol/5bUSjQQctnMruvUV98+tylzxeqnk=; b=amRy4+bVku/wyUtjtWwX56QFFNCOwxjoGSMkqghx4TNIoRyLljm3SlmnkNkTkNZZBW aYO62o2GkUj+qNWZwdV3Do2uSKI+63cUZ8pElchPEwF01T40IyZZx591fvK0kf9XL6fJ L0+yX7JfgxnTgOPKPE2gatqj6kWyWJbLdDClpe3LduQD9pPYBg+eznZutZx5/hbbTB46 ++kX6bVdMG3zBHLOh9MRrHTg2Imz41Ktx1YQ3LWakvlGcTsOvjgLd8euEuO1TOK3CVVE mBUhISW4sucy7qC2yBaXVkLZzO0or5lwDWOc3Xxl/hxtRmE8NJIkYJ8CTe5vRSn814oU EU6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KvntgGm3; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6si3801343ejb.419.2019.11.22.03.16.17; Fri, 22 Nov 2019 03:16:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KvntgGm3; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729312AbfKVLQQ (ORCPT + 7 others); Fri, 22 Nov 2019 06:16:16 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:52505 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728031AbfKVKuz (ORCPT ); Fri, 22 Nov 2019 05:50:55 -0500 Received: by mail-wm1-f67.google.com with SMTP id l1so6935569wme.2 for ; Fri, 22 Nov 2019 02:50:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/inLver145cFol/5bUSjQQctnMruvUV98+tylzxeqnk=; b=KvntgGm303h0Ssxf9aIFIK2XkoQiqLGKm8oBQdtFp8m6CkhuS563d23h38idVHFBTS kkHWOjKBIeiLqtFnIN5JqRxHj/IPpP1+8FLf2khs7+nbgJ0OpH9sMYPdLblXJN/5mPtZ Wb+8873vkfkzhOEno3SZc1Y9APZr1NOsSzkKP1ZCQ6Z0rpQLTlKOI9WgdHg2e1LDo7F0 tBgAB48y5L6SMpiI5ioJ2KIyTBgMturfH5KATIT+F+PcJxgVRRlhZPFK7De+LuxTeNtE M4IA2puSbiUMBj2P+pdk0515MczvrK3k66Sn0WsjBltTEdPU0l74IdtDnv4aQdCAd0EZ nmsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/inLver145cFol/5bUSjQQctnMruvUV98+tylzxeqnk=; b=jzECSsfuiCRMNaUYjyRFC5OSMoPXHMry3dIknX1jsilo+0C5TWkEpWwcuM8F8+ywk7 7/OwarQDk3FE5maPGDWF8ZIZlO7manikjQlkaVVxp/yK0N0DfApt8WgoTtuqdne5kvVK 35nSNUM90NT0qhsG9Yqsz32nyZKgDJ0Dppn7XuVs8qY7+RQWfyRG4ntSGy1L45Qp2eXk eAoat9Sp3eQDVjZA0BxCEdDzJtQ9oGulGkdArexA4wYxAalTYa2LwAvcoLNnHEx7e9TD g4g90DOeM+vx3CKxbvE3wdvL0S+8hwEJ7PSJDzUe2Jralyz/YrO0EA9aPSeFIh2EJBjn q4UA== X-Gm-Message-State: APjAAAWkpj+Ln2IdKIaQiwfLFfSUkS8ZgOtKM9aOWt8mQUUBkMX5UKFW Z5QGeOmisSda1VmhM365RqBfb4ygRn8= X-Received: by 2002:a05:600c:3cd:: with SMTP id z13mr15785876wmd.105.1574419853787; Fri, 22 Nov 2019 02:50:53 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-204-106.adslplus.ch. [188.155.204.106]) by smtp.gmail.com with ESMTPSA id o133sm2088197wmb.4.2019.11.22.02.50.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 02:50:53 -0800 (PST) From: Jean-Philippe Brucker To: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, virtualization@lists.linux-foundation.org, linux-pci@vger.kernel.org, virtio-dev@lists.oasis-open.org Cc: rjw@rjwysocki.net, lenb@kernel.org, lorenzo.pieralisi@arm.com, guohanjun@huawei.com, sudeep.holla@arm.com, gregkh@linuxfoundation.org, joro@8bytes.org, bhelgaas@google.com, mst@redhat.com, jasowang@redhat.com, jacob.jun.pan@intel.com, eric.auger@redhat.com, sebastien.boeuf@intel.com, kevin.tian@intel.com Subject: [RFC 02/13] ACPI: Add VIOT definitions Date: Fri, 22 Nov 2019 11:49:49 +0100 Message-Id: <20191122105000.800410-3-jean-philippe@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122105000.800410-1-jean-philippe@linaro.org> References: <20191122105000.800410-1-jean-philippe@linaro.org> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org This is temporary, until the VIOT table is published and these definitions added to ACPICA. Signed-off-by: Jean-Philippe Brucker --- include/acpi/actbl2.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) -- 2.24.0 diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index e45ced27f4c3..99c1d747e9d8 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -25,6 +25,7 @@ * the wrong signature. */ #define ACPI_SIG_IORT "IORT" /* IO Remapping Table */ +#define ACPI_SIG_VIOT "VIOT" /* Virtual I/O Table */ #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */ #define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */ @@ -412,6 +413,36 @@ struct acpi_ivrs_memory { u64 memory_length; }; +/******************************************************************************* + * + * VIOT - Virtual I/O Table + * Version 1 + * + ******************************************************************************/ + +struct acpi_table_viot { + struct acpi_table_header header; + u8 reserved[12]; + struct acpi_table_header base_table; +}; + +#define ACPI_VIOT_IORT_NODE_VIRTIO_PCI_IOMMU 0x80 +#define ACPI_VIOT_IORT_NODE_VIRTIO_MMIO_IOMMU 0x81 + +struct acpi_viot_iort_virtio_pci_iommu { + u32 devid; +}; + +struct acpi_viot_iort_virtio_mmio_iommu { + u64 base_address; + u64 span; + u64 flags; + u64 interrupt; +}; + +/* FIXME: rename this monstrosity. */ +#define ACPI_VIOT_IORT_VIRTIO_MMIO_IOMMU_CACHE_COHERENT (1<<0) + /******************************************************************************* * * LPIT - Low Power Idle Table