From patchwork Fri Aug 21 16:28:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 248131 Delivered-To: patch@linaro.org Received: by 2002:a54:3b12:0:0:0:0:0 with SMTP id j18csp447301ect; Fri, 21 Aug 2020 09:31:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeueCQ9HPXLth5MzNs3eYrKHW8Rg+4ngQr3C4tbNmj+y5Kvc6Hypvr+IGtNN8JB0tYJZAf X-Received: by 2002:a63:2746:: with SMTP id n67mr2961416pgn.314.1598027492165; Fri, 21 Aug 2020 09:31:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598027492; cv=none; d=google.com; s=arc-20160816; b=f3bejBMDj9O62bwth16StVaapWvJca5ySXxG9QNB/RPTM9ManQrlakiDTMiZj4ONFs 1Vbm9gC7UOho5yuxHUy8a1WlB/RIWnitXiGKpD9+cQ6WkiXKLn3r3mlKZiiAmnJP4s/S FoRRFZEx6FK+lOoV0s8OU3Hslj4ZG/kREEtRGjH3R1DFQN7pDgJlsD1RGefUvAo5O+Gn yYrWK46IX2Az4k9TDxon6PojmG8QmP3V0g589ByE6IUtoeg97LjTAMopgyTshW9677Ln lzwGsPNkZ/aycuDxTqW+iofwjcovEt1OiL/tkyjlPuCAmmcCegdiYw6xF1f+iiEabIP+ WefA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=HWqwkfbMIQKiQpdnbw24fCwXZALtGYStinOFhF15nP8=; b=WASydG0DbiEPsnfLP8f55XTRxYQiMiF3qX6QZui4SfKaxtEy4Nv6/pUAU/UH0Hme61 6CfdniqvFKUFvwg+4ufy8QXZGqMW6n22dREXEYJOx1mtomoSPNtL60vCMFeCVMpKrrJO Nj/mA9R4BpScnzaZLepDQD9rmX1L+o5CBitrQ9FZj4Xw8YFQDl/+9huGmt5tPWOPkI9g IJJmqG0V3F9l2Jys3kDTqGQhi1bg3iyq+gHCphc0qVmwQ7rpKxbuSr+zJFKOR4t5uEjA pzn90bIEvMnFX71zmc47xABJyiUWOPYf4OGqaxZrxmFtxzQJyCrdW/adxB2AK5nhElyg 6ctg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XFdOZ22V; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l14si2159940pgn.231.2020.08.21.09.31.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Aug 2020 09:31:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XFdOZ22V; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k99wv-0007tk-Nj for patch@linaro.org; Fri, 21 Aug 2020 12:31:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k99vv-0007tO-W2 for qemu-devel@nongnu.org; Fri, 21 Aug 2020 12:30:28 -0400 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]:34487) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k99vt-0006mP-1N for qemu-devel@nongnu.org; Fri, 21 Aug 2020 12:30:27 -0400 Received: by mail-ed1-x543.google.com with SMTP id bs17so1953255edb.1 for ; Fri, 21 Aug 2020 09:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HWqwkfbMIQKiQpdnbw24fCwXZALtGYStinOFhF15nP8=; b=XFdOZ22VxsBhg14LK341LWAWJFSzlpQ8+eIX3hdz5+t+Ex3H4pdMkor7u673g960dr KSx1BzhsRhapEEpxR8qcRbfKQUbCt6eg+Gzp2hZjxwTnj6aJklYtS5KTYHItVuA0dqO9 PnqsAdQ5twwiv9UhpwsajdcDLCYXpyYtr5juPaoxjbVblEOGxgk2qqKDZ/fd6yhqBQGy fo15iBSD+627jp3oMTXvESGkIv2pR7pQUmQwqUR7paJpOLLe6TAHvbkPNY0Qu3ucfPzh HIgXmHP8V76g2GIJjQrTXwBucXGPUeL7E5wKDp/ptZwJFdopuqU0QWfDQ+qE0npTZ54c rb1Q== 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:mime-version :content-transfer-encoding; bh=HWqwkfbMIQKiQpdnbw24fCwXZALtGYStinOFhF15nP8=; b=oPxFMwbr4FM+KVM00uGF6uYTi1SqL2VF5Nb9BUvIL3+SxEU1DNLA8thJIaKvJqjYq1 TeDr0ZTVwQaZ8eTklIRQ2Pluoos3q0J2XXVbL0AZdPPNP2KEtUsnVDPKvDRlRUEn6qvw DxN/VnboUPIfK9D0U3wXW1zcdgQ/TYzY+/ikGRSxF3XoMNZmKNloMog+6RU/d3Q9DFN8 c11iax1bQo5A6tcY3u+3YS5+cemyf9lIis/y7Cs5+PMc17ETwOO0NcPwFLfrGsLhPHum /LZzUxPV/LM0aMtvujesZaIH9Mioa7o2LItqg8czHHjWiBT7cZ9j/5zmdT4OKfuqUstZ BSmQ== X-Gm-Message-State: AOAM530nOsnvxA59Yjq0Vn5DiqTdP06xtDIGcl/GNzcmAfLHUkeA9MaC rI5x1U0ftCFmtfLqejXSLybiIw== X-Received: by 2002:aa7:c70b:: with SMTP id i11mr3566222edq.272.1598027422929; Fri, 21 Aug 2020 09:30:22 -0700 (PDT) Received: from localhost.localdomain ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id dk28sm1398030edb.90.2020.08.21.09.30.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 09:30:22 -0700 (PDT) From: Jean-Philippe Brucker To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 0/5] virtio-iommu: Built-in topology and x86 support Date: Fri, 21 Aug 2020 18:28:34 +0200 Message-Id: <20200821162839.3182051-1-jean-philippe@linaro.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::543; envelope-from=jean-philippe@linaro.org; helo=mail-ed1-x543.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, eric.auger@redhat.com, Jean-Philippe Brucker , pbonzini@redhat.com, rth@twiddle.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Add a topology description to the virtio-iommu config space, allowing to create a virtio-iommu device on platforms without device-tree. Our long-term plan is to add an ACPI table that describes this topology, but it will take a while to ratify. This built-in topology is needed anyway for platforms that don't use either DT or ACPI (e.g. microvm) and can be used as a temporary boot method for ACPI platforms as well. Patch 1 looks unrelated, but is required to boot with a firmware on x86. As previously discussed on this list: https://lore.kernel.org/qemu-devel/aa5fa9e6-6efd-e1a3-96c6-d02ba8eab4c8@redhat.com/ This work depends on the proposed spec change for virtio-iommu (v2): https://lists.oasis-open.org/archives/virtio-dev/202008/msg00067.html And the Linux implementation (v3): https://lore.kernel.org/linux-iommu/20200821131540.2801801-1-jean-philippe@linaro.org/ Eric Auger (1): hw/i386/pc: Add support for virtio-iommu-pci Jean-Philippe Brucker (4): virtio-iommu: Default to bypass during boot linux headers: Import virtio-iommu header from Linux virtio-iommu: Declare topology in config space hw/arm/virt: Remove device-tree restriction on virtio-iommu include/hw/virtio/virtio-iommu.h | 4 ++ include/standard-headers/linux/virtio_iommu.h | 44 +++++++++++++ hw/arm/virt.c | 10 +-- hw/i386/pc.c | 9 ++- hw/virtio/virtio-iommu-pci.c | 2 - hw/virtio/virtio-iommu.c | 62 ++++++++++++++++--- hw/virtio/trace-events | 4 +- 7 files changed, 115 insertions(+), 20 deletions(-) -- 2.28.0