on 32bit
architectures.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>
---
arch/arm/include/asm/arch_gicv3.h | 188 +
1 file changed, 188 insertions(+)
create mode 100644 arch/arm/include/asm/arch_gicv3.h
diff --git a/arch/arm/inclu
, that is
only enabled on the 64bit side. The selection is done unconditionally
because CONFIG_ARM_GIC_V3 is always enabled on arm64.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>
---
arch/arm64/kvm/Kconfig |4
include/kvm/arm_vgic.h |4 ++--
virt/kvm/arm/
This patch moves the GICv3 system register access helpers to
arch/arm64/. Their 32bit counterparts will need to use mrc/mcr accesses
instead of mrs_s/msr_s.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>
---
arch/arm64/include/asm/arch_gicv3.h
vGIC driver
will need to split their values into two 32bit registers: LRn and LRCn.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>
---
arch/arm64/include/asm/arch_gicv3.h | 35 ---
drivers/irqchip/irq-gic-v3.c
the mistakes pointed out on the list,
- add a patch to select ARM_GIC_V3 under ARCH_VIRT.
Cheers,
Jean
[1]
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-December/310124.html
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/327034.html
Jean-Philippe Brucker (6
, this
patch specializes the IROUTER and TYPER accesses.
Since the latter is an ID register, it won't need to be read atomically,
but we still avoid future confusion by using gic_read_typer instead of a
generic gic_readq.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>
---
arch
Hi Eric,
On Tue, Mar 01, 2016 at 06:27:46PM +, Eric Auger wrote:
>[...]
> +
> +int iommu_get_single_reserved(struct iommu_domain *domain,
> + phys_addr_t addr, int prot,
> + dma_addr_t *iova)
> +{
> + unsigned long order =
Hi Eric,
On Thu, Apr 07, 2016 at 11:33:42AM +0200, Eric Auger wrote:
> Alex,
> On 04/07/2016 01:12 AM, Alex Williamson wrote:
> > On Mon, 4 Apr 2016 08:07:01 +
> > Eric Auger wrote:
> >
> >> This patch introduces iommu_get/put_single_reserved.
> >>
> >>
On 02/02/17 16:32, Andre Przywara wrote:
> When we set up GSI routing to map MSIs to KVM's GSI numbers, we
> write the current device's MSI setup into the kernel routing table.
> However the device driver in the guest can use PCI configuration space
> accesses to change the MSI configuration
On 17/05/17 12:18, Christoffer Dall wrote:
> Hi Jean,
>
> On Tue, May 16, 2017 at 12:23:52PM +0100, Jean-Philippe Brucker wrote:
>> Hi,
>>
>> On 09/05/17 09:56, Christoffer Dall wrote:
>>> Instead of waiting with registering KVM iodevs until the first VCP
Hi,
On 09/05/17 09:56, Christoffer Dall wrote:
> Instead of waiting with registering KVM iodevs until the first VCPU is
> run, we can actually create the iodevs when the redist base address is
> set. The only downside is that we must now also check if we need to do
> this for VCPUs which are
On 17/11/17 18:52, Jean-Philippe Brucker wrote:
> To describe the virtual topology in relation to a virtio-iommu device,
> ACPI-based systems use a "paravirtualized IOMMU" IORT node. Add support
> for it.
>
> This is a RFC because the IORT specification doesn't describe t
On 17/11/17 18:52, Jean-Philippe Brucker wrote:
[...]
> +struct viommu_domain {
> + struct iommu_domain domain;
> + struct viommu_dev *viommu;
> + struct mutexmutex;
> + unsigned intid;
> +
s multiple
remapping devices -- currently only ARM IOMMUs and MSI controllers, but it
is easy to extend.
IORT table and drivers are easiest to extend and they do the job, so
rather than introducing a fourth solution to solve a generic problem,
reuse what exists.
Signed-off-by: Jean-Philippe Bru
://lists.gnu.org/archive/html/qemu-arm/2017-09/msg00413.html
[4] git://linux-arm.org/kvmtool-jpb.git virtio-iommu/base
[5] git://linux-arm.org/linux-jpb.git virtio-iommu/v0.5-dev
Jean-Philippe Brucker (5):
iommu: Add virtio-iommu driver
iommu/virtio-iommu: Add probe request
iommu/virtio-iommu: Add event
.
Implementing the IOMMU API is fairly straightforward since the
virtio-iommu MAP/UNMAP interface is almost identical.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>
---
drivers/iommu/Kconfig | 11 +
drivers/iommu/Makefile| 1 +
drivers/iommu/
specific to arm64 in the driver, it
simply requires moving Makefile and Kconfig entries.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>
---
drivers/acpi/Kconfig| 3 +++
drivers/acpi/Makefile | 1 +
drivers/acpi/arm64/Kconfig | 3 ---
drivers/acpi
in the virtio-iommu, because MSIs bypass it.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>
---
drivers/iommu/virtio-iommu.c | 165 --
include/uapi/linux/virtio_iommu.h | 37 +
2 files changed, 195 insertions(+), 7 deletions(-)
The event queue offers a way for the device to report access faults from
devices. It is implemented on virtqueue #1, whenever the host needs to
signal a fault it fills one of the buffers offered by the guest and
interrupts it.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.
we create
the IRQFD routes such that they inject the given SPI.
[1]
https://developer.arm.com/products/architecture/a-profile/docs/den0029/latest/server-base-system-architecture
Jean-Philippe Brucker (2):
Prevent segfault when kvm_pause is called too early
Add GICv2m support
Makefile
-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>
---
Makefile | 2 +-
arm/aarch32/include/asm/kvm.h| 2 +
arm/aarch64/include/asm/kvm.h| 2 +
arm/gic.c| 1
within core_init (level 0). The CPU array is
initialized later in base_init (level 1).
Signed-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>
---
kvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kvm.c b/kvm.c
index 9078a026411b..7de825a9d063 100644
--- a
On 03/11/17 14:27, Andre Przywara wrote:
> Hi,
>
> good stuff, thanks for doing this!
>
> On 03/11/17 11:38, Jean-Philippe Brucker wrote:
>> GICv2m is a small extension to the GICv2 architecture, specified in the
>> Server Base System Architecture (SBSA). It adds a set
-by: Punit Agrawal
Signed-off-by: Will Deacon
[JPB: moved to a separate patch]
Signed-off-by: Jean-Philippe Brucker
---
include/kvm/pci.h | 72 +-
pci.c | 89 ++-
2 files changed, 89 insertions(+), 72 deletions
n/vfio.txt)
This time around I also tested assignment of the x540 NIC on my old x86
desktop as well (previously only on AMD Seattle, an arm64 host). It
worked smoothly.
v6: git://linux-arm.org/kvmtool-jpb.git vfio/v6
v5: https://www.spinics.net/lists/kvm/msg166119.html
Jean-Philippe Brucker (13):
-Philippe Brucker
---
arm/pci.c | 3 ++-
include/kvm/pci.h | 6 ++
pci.c | 3 +++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/arm/pci.c b/arm/pci.c
index 813df26a8..744b14c26 100644
--- a/arm/pci.c
+++ b/arm/pci.c
@@ -77,6 +77,7 @@ void
generating firmware information (that is, for x86
bios; DT supports reserved-memory description).
Reviewed-by: Punit Agrawal
Signed-off-by: Jean-Philippe Brucker
---
arm/kvm.c | 2 +-
hw/pci-shmem.c| 4 ++--
hw/vesa.c | 2 +-
include/kvm/
, when the guest needs them
Since we cannot setup IRQFD before (2), store the IRQFD routing for IRQ
lines temporarily until we're ready to submit them.
Reviewed-by: Punit Agrawal
Signed-off-by: Jean-Philippe Brucker
---
arm/gic.c| 76 +++-
arm
Add a way to iterate over all capabilities in a config space. Add a search
function for getting a specific capability.
Reviewed-by: Punit Agrawal
Signed-off-by: Jean-Philippe Brucker
---
include/kvm/pci.h | 14 ++
pci.c | 13 +
2 files changed, 27 insertions
enable MSI and MSI-X at the same time (forbidden by PCI).
Reviewed-by: Punit Agrawal
Signed-off-by: Jean-Philippe Brucker
---
include/kvm/pci.h | 23 ++
include/kvm/vfio.h | 1 +
vfio/pci.c | 178 +++--
3 files changed, 195 insertions(+), 7
To ensure consistency between kvmtool and the kernel, import the UAPI
headers of the VFIO version we implement. This is from Linux v4.12.
Reviewed-by: Punit Agrawal
Signed-off-by: Jean-Philippe Brucker
---
include/linux/vfio.h | 719 +++
1 file changed
It's always nice to have a log2 handy, and the vfio-pci code will need to
perform power of two allocation from an arbitrary size. Add fls_long and
roundup_pow_of_two, based on the GCC builtin.
Reviewed-by: Punit Agrawal
Signed-off-by: Jean-Philippe Brucker
---
include/kvm/util.h | 14
r passing
platform devices to guests.
Reviewed-by: Punit Agrawal
Signed-off-by: Will Deacon
Signed-off-by: Robin Murphy
Signed-off-by: Jean-Philippe Brucker
---
Makefile | 2 +
arm/pci.c| 1 +
builtin-run.c| 5 +
include/kvm/kvm-config.h | 3 +
in
be injected if it was pending. At the moment no MSI is
injected, we simply disconnect the IRQFD and all messages are lost.
Reviewed-by: Punit Agrawal
Signed-off-by: Jean-Philippe Brucker
---
include/kvm/vfio.h | 52
vfio/pci.c | 651 -
2 files
ld kvmtool with different addresses or
change its IOMMU resv regions if possible.
Reviewed-by: Punit Agrawal
Signed-off-by: Jean-Philippe Brucker
---
include/kvm/kvm.h | 10 +++
kvm.c | 68 +--
2 files changed, 64 insertions(+), 14 deletions(-)
regions. For example when VFIO allows to mmap
fragments of a PCI BAR and forbids accessing things like MSI-X tables.
We don't support the sparse capability at the moment, so trap these
regions instead (if VFIO rejects the mmap).
Reviewed-by: Punit Agrawal
Signed-off-by: Jean-Philippe
.
Reviewed-by: Punit Agrawal
Signed-off-by: Jean-Philippe Brucker
---
vfio/core.c | 49 +
1 file changed, 49 insertions(+)
diff --git a/vfio/core.c b/vfio/core.c
index a4a257a70..17b5b0cfc 100644
--- a/vfio/core.c
+++ b/vfio/core.c
@@ -379,6 +379,51
On 21/06/18 20:06, Jean-Philippe Brucker wrote:
> +static int viommu_add_resv_mem(struct viommu_endpoint *vdev,
> +struct virtio_iommu_probe_resv_mem *mem,
> +size_t len)
> +{
> + struct iommu_resv_region *region = NULL;
&
On 25/06/18 20:27, Rob Herring wrote:
> On Thu, Jun 21, 2018 at 08:06:51PM +0100, Jean-Philippe Brucker wrote:
>> A virtio-mmio node may represent a virtio-iommu device. This is discovered
>> by the virtio driver at probe time, but the DMA topology isn't
>> discoverable
On 26/06/18 19:07, Michael S. Tsirkin wrote:
> So as I pointed out new virtio 0 device isn't really welcome ;)
Agreed, virtio-iommu is expected to be implemented on virtio 1 and
later. I'll remove the two legacy-related paragraph from the spec and
add a check in the driver as you suggested, to
On 22/06/18 01:51, Michael S. Tsirkin wrote:
>> +VIRTIO IOMMU DRIVER
>> +M: Jean-Philippe Brucker
>> +S: Maintained
>> +F: drivers/iommu/virtio-iommu.c
>> +F: include/uapi/linux/virtio_iommu.h
>> +
>> VIRTUAL BOX GUEST DEVICE DRIVER
>> M: H
On 22/06/18 01:55, Michael S. Tsirkin wrote:
>> +#define VIRTIO_IOMMU_RESV_MEM_T_RESERVED0
>> +#define VIRTIO_IOMMU_RESV_MEM_T_MSI 1
>> +
>> +struct virtio_iommu_probe_resv_mem {
>> +__u8subtype;
>> +__u8
Hi Peter,
On 10/01/18 11:19, Peter Maydell wrote:
> On 10 January 2018 at 11:06, Michael S. Tsirkin wrote:
>> For virtio-mmio? I don't seem to see that code in
>> hw/virtio/virtio-mmio.c
>> For example I still see handling for VIRTIO_MMIO_QUEUE_PFN
>> there, and no handling for
On 16/01/18 09:25, Auger Eric wrote:
[...]
>> +static int viommu_add_resv_mem(struct viommu_endpoint *vdev,
>> + struct virtio_iommu_probe_resv_mem *mem,
>> + size_t len)
>> +{
>> +struct iommu_resv_region *region = NULL;
>> +unsigned
On 16/01/18 10:10, Auger Eric wrote:
> Hi,
>
> On 17/11/17 19:52, Jean-Philippe Brucker wrote:
>> The event queue offers a way for the device to report access faults from
>> devices.
> end points?
Yes
[...]
>> +static void viommu_event_handler(struct virtqu
On 16/01/18 23:26, Auger Eric wrote:
[...]
>> +switch (mem->subtype) {
>> +case VIRTIO_IOMMU_RESV_MEM_T_MSI:
>> +region = iommu_alloc_resv_region(addr, size, prot,
>> + IOMMU_RESV_MSI);
> if (!region)
> return -ENOMEM;
>> +
On 12/01/18 10:21, Peter Maydell wrote:
> On 10 January 2018 at 11:25, Jean-Philippe Brucker
> <jean-philippe.bruc...@arm.com> wrote:
>> Hi Peter,
>>
>> On 10/01/18 11:19, Peter Maydell wrote:
>>> Are there uses that make it worthwhile to get virtio-1
>&g
When enabling both VFIO and VIRTIO_IOMMU modules, automatically select
VFIO_IOMMU_TYPE1 as well.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>
---
drivers/vfio/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vfio/Kconfig b/driver
into
corresponding virtio requests. Mappings are kept in an interval tree
instead of page tables.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>
---
MAINTAINERS | 6 +
drivers/iommu/Kconfig | 11 +
drivers/iommu/Makefile| 1 +
d
PATCH v2 0/5] Add virtio-iommu driver
https://www.spinics.net/lists/kvm/msg159047.html
[3] [RFC v6 00/22] VIRTIO-IOMMU device
http://lists.gnu.org/archive/html/qemu-arm/2018-02/msg00274.html
[4] git://linux-arm.org/kvmtool-jpb.git virtio-iommu/v0.6
Jean-Philippe Brucker (4):
iommu: Add
in the virtio-iommu, because MSIs bypass it.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>
---
drivers/iommu/virtio-iommu.c | 163 --
include/uapi/linux/virtio_iommu.h | 37 +
2 files changed, 193 insertions(+), 7 deletions(-)
The event queue offers a way for the device to report access faults from
endpoints. It is implemented on virtqueue #1. Whenever the host needs to
signal a fault, it fills one of the buffers offered by the guest and
interrupts it.
Signed-off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.
On 21/02/18 20:12, kbuild test robot wrote:
[...]
> config: arm64-allmodconfig (attached as .config)
[...]
>aarch64-linux-gnu-ld: arch/arm64/kernel/head.o: relocation R_AARCH64_ABS32
> against `_kernel_offset_le_lo32' can not be used when making a shared object
>arch/arm64/kernel/head.o:
On 19/02/18 12:23, Tomasz Nowicki wrote:
[...]
>> +static int viommu_receive_resp(struct viommu_dev *viommu, int nr_sent,
>> + struct list_head *sent)
>> +{
>> +
>> +unsigned int len;
>> +int nr_received = 0;
>> +struct viommu_request *req, *pending;
>> +
>> +
into
corresponding virtio requests. Mappings are kept in an interval tree
instead of page tables.
Signed-off-by: Jean-Philippe Brucker
---
MAINTAINERS | 6 +
drivers/iommu/Kconfig | 11 +
drivers/iommu/Makefile| 1 +
drivers/iommu/virtio-iommu.c | 929
-iommu.txt. Like many other IOMMUs, virtio-iommu
distinguishes masters by their endpoint IDs, which requires one IOMMU cell
in the "iommus" property.
Signed-off-by: Jean-Philippe Brucker
---
Documentation/devicetree/bindings/virtio/mmio.txt | 8
1 file changed, 8 insertions(+)
complication and suggest we tackle one problem at a time. Since it
is a luxury that requires changes to the IOMMU core, module support is
left as a future improvement.
---
Jean-Philippe Brucker (5):
dt-bindings: virtio: Specify #iommu-cells value for a virtio-iommu
ARM platforms may implement several kinds of IOMMUs (various SMMU or
SMMUv3 implementations, virtio-iommu). They are all type-1, so
automatically select VFIO_IOMMU_TYPE1 on ARM if IOMMU is selected.
Signed-off-by: Jean-Philippe Brucker
---
drivers/vfio/Kconfig | 2 +-
1 file changed, 1
The event queue offers a way for the device to report access faults from
endpoints. It is implemented on virtqueue #1. Whenever the host needs to
signal a fault, it fills one of the buffers offered by the guest and
interrupts it.
Signed-off-by: Jean-Philippe Brucker
---
drivers/iommu/virtio
in the virtio-iommu, because MSIs bypass it.
Signed-off-by: Jean-Philippe Brucker
---
drivers/iommu/virtio-iommu.c | 149 --
include/uapi/linux/virtio_iommu.h | 37
2 files changed, 180 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/virtio-iommu.c b
On 23/08/18 13:17, Eric Auger wrote:
> +/**
> + * Translation cache invalidation information, contains generic IOMMU
> + * data which can be parsed based on model ID by model specific drivers.
> + * Since the invalidation of second level page tables are included in the
> + * unmap operation, this
On 23/08/18 13:17, Eric Auger wrote:
> if (ste->s1_cfg) {
> - BUG_ON(ste_live);
Scary! :) The current code assumes that it can make modifications to the
STE in any order and enable translation after a sync. So far I haven't
been able to find anything that violates this rule in
Hi Eric,
On 23/08/18 16:25, Auger Eric wrote:
>> +int iommu_bind_guest_stage(struct iommu_domain *domain, struct device *dev,
>> + struct iommu_guest_stage_config *cfg)
About the name change from iommu_bind_pasid_table: is the intent to
reuse this API for SMMUv2, which
On 27/06/18 20:59, Michael S. Tsirkin wrote:
>> Another reason to keep the MMIO transport option is that one
>> virtio-iommu can manage DMA from endpoints on multiple PCI domains at
>> the same time, as well as platform devices. Some VMMs might want that,
>> in which case the IOMMU would be a
Hi Suzuki,
On 27/03/18 14:15, Suzuki K Poulose wrote:
> If the guest wants to use a larger physical address space place
> the RAM at upper half of the address space. Otherwise, it uses the
> default layout.
>
> Signed-off-by: Suzuki K Poulose
> ---
>
On 23/03/18 14:48, Robin Murphy wrote:
[..]
>> + * Virtio driver for the paravirtualized IOMMU
>> + *
>> + * Copyright (C) 2018 ARM Limited
>> + * Author: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com>
>> + *
>> + * SPDX-License-Identifier:
On 23/03/18 15:00, Robin Murphy wrote:
[...]
>> +/*
>> + * Treat unknown subtype as RESERVED, but urge users to update their
>> + * driver.
>> + */
>> +if (mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_RESERVED &&
>> +mem->subtype != VIRTIO_IOMMU_RESV_MEM_T_MSI)
>> +
On 23/03/18 08:27, Tian, Kevin wrote:
>>> The host kernel needs to have *some* MSI region in place before the
>>> guest can start configuring interrupts, otherwise it won't know what
>>> address to give to the underlying hardware. However, as soon as the host
>>> kernel has picked a region, host
On 21/03/18 06:43, Tian, Kevin wrote:
[...]
>> +
>> +#include
>> +
>> +#define MSI_IOVA_BASE 0x800
>> +#define MSI_IOVA_LENGTH 0x10
>
> this is ARM specific, and according to virtio-iommu spec isn't it
> better probed on the endpoint instead of
u/v0.8
git://linux-arm.org/kvmtool-jpb.git virtio-iommu/v0.8
Jean-Philippe Brucker (7):
dt-bindings: virtio-mmio: Add IOMMU description
dt-bindings: virtio: Add virtio-pci-iommu node
PCI: OF: allow endpoints to bypass the iommu
PCI: OF: Initialize dev->fwnode appropriately
iommu: Add v
For PCI devices that have an OF node, set the fwnode as well. This way
drivers that rely on fwnode don't need the special case described by
commit f94277af03ea ("of/platform: Initialise dev->fwnode appropriately").
Signed-off-by: Jean-Philippe Brucker
---
drivers/pci/of.c | 7 ++
Signed-off-by: Jean-Philippe Brucker
---
.../devicetree/bindings/virtio/iommu.txt | 66 +++
1 file changed, 66 insertions(+)
create mode 100644 Documentation/devicetree/bindings/virtio/iommu.txt
diff --git a/Documentation/devicetree/bindings/virtio/iommu.txt
b/Documentation
On 12/10/2018 17:35, Michael S. Tsirkin wrote:
>> +list_del(>list);
>> +kfree(req);
>
> So with DEBUG set, this will actually free memory that device still
> DMA's into. Hardly pretty. I think you want to mark device broken,
> queue the request and then wait for device to
into
corresponding virtio requests. Mappings are kept in an interval tree
instead of page tables.
Signed-off-by: Jean-Philippe Brucker
---
MAINTAINERS | 7 +
drivers/iommu/Kconfig | 11 +
drivers/iommu/Makefile| 1 +
drivers/iommu/virtio-iommu.c | 938
The event queue offers a way for the device to report access faults from
endpoints. It is implemented on virtqueue #1. Whenever the host needs to
signal a fault, it fills one of the buffers offered by the guest and
interrupts it.
Signed-off-by: Jean-Philippe Brucker
---
drivers/iommu/virtio
in the virtio-iommu, because MSIs bypass it.
Signed-off-by: Jean-Philippe Brucker
---
drivers/iommu/virtio-iommu.c | 147 --
include/uapi/linux/virtio_iommu.h | 39
2 files changed, 180 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/virtio-iommu.c b
will error out later, when attempting to find an MSI domain for the
device.
Signed-off-by: Jean-Philippe Brucker
---
drivers/pci/of.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/of.c b/drivers/pci/of.c
index 1836b8ddf292..2f5015bdb256 100644
--- a/drivers/pci
On 12/10/2018 18:00, Michael S. Tsirkin wrote:
> This all looks good to me. Minor nits:
> - I think DEBUG mode is best just removed for now
> - Slightly wrong patch splitup causing a misaligned structure
> in uapi until all patches are applied.
Thanks a lot for the review, I'll fix these up and
[Replying with my personal address because we're having SMTP issues]
On 15/10/2018 11:52, Michael S. Tsirkin wrote:
> On Fri, Oct 12, 2018 at 02:41:59PM -0500, Bjorn Helgaas wrote:
>> s/iommu/IOMMU/ in subject
>>
>> On Fri, Oct 12, 2018 at 03:59:13PM +0100, Jean-Philippe Bru
[Replying with my personal address because we're having SMTP issues]
On 12/10/2018 20:41, Bjorn Helgaas wrote:
> s/iommu/IOMMU/ in subject
>
> On Fri, Oct 12, 2018 at 03:59:13PM +0100, Jean-Philippe Brucker wrote:
>> Using the iommu-map binding, endpoints in a given PCI domain ca
On 16/10/2018 10:25, Auger Eric wrote:
> Hi Jean,
>
> On 10/12/18 4:59 PM, Jean-Philippe Brucker wrote:
>> Implement the virtio-iommu driver, following specification v0.8 [1].
>> Changes since v2 [2]:
>>
>> * Patches 2-4 allow virtio-iommu to use the PCI tran
On 17/10/2018 16:14, Michael S. Tsirkin wrote:
>>> Thinking about this comment, I would like to ask: can't the
>>> virtio device indicate the ranges in a portable way?
>>> This would minimize the dependency on dt bindings and ACPI,
>>> enabling support for systems that have neither but do
>>> have
On 16/10/2018 21:31, Auger Eric wrote:
> Hi Jean,
>
> On 10/16/18 8:44 PM, Jean-Philippe Brucker wrote:
>> On 16/10/2018 10:25, Auger Eric wrote:
>>> Hi Jean,
>>>
>>> On 10/12/18 4:59 PM, Jean-Philippe Brucker wrote:
>>>> Implement th
Fixed all of these, thanks
Jean
On 15/11/2018 13:20, Auger Eric wrote:
> Hi Jean,
> On 10/12/18 4:59 PM, Jean-Philippe Brucker wrote:
>> When the device offers the probe feature, send a probe request for each
>> device managed by the IOMMU. Extract RESV_MEM information. Wh
in the virtio-iommu, because MSIs bypass it.
Signed-off-by: Jean-Philippe Brucker
---
drivers/iommu/virtio-iommu.c | 156 --
include/uapi/linux/virtio_iommu.h | 38
2 files changed, 188 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/virtio-iommu.c b
-Philippe Brucker
---
drivers/of/base.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 09692c9b32a7..99f6bfa9b898 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -2237,8 +2237,12 @@ int of_map_rid(struct
For PCI devices that have an OF node, set the fwnode as well. This way
drivers that rely on fwnode don't need the special case described by
commit f94277af03ea ("of/platform: Initialise dev->fwnode appropriately").
Acked-by: Bjorn Helgaas
Signed-off-by: Jean-Philippe Brucker
---
The event queue offers a way for the device to report access faults from
endpoints. It is implemented on virtqueue #1. Whenever the host needs to
signal a fault, it fills one of the buffers offered by the guest and
interrupts it.
Signed-off-by: Jean-Philippe Brucker
---
drivers/iommu/virtio
into
corresponding virtio requests. Mappings are kept in an interval tree
instead of page tables.
Signed-off-by: Jean-Philippe Brucker
---
MAINTAINERS | 7 +
drivers/iommu/Kconfig | 11 +
drivers/iommu/Makefile| 1 +
drivers/iommu/virtio-iommu.c | 918
ewed-by: Rob Herring
Reviewed-by: Eric Auger
Signed-off-by: Jean-Philippe Brucker
---
.../devicetree/bindings/virtio/iommu.txt | 66 +++
1 file changed, 66 insertions(+)
create mode 100644 Documentation/devicetree/bindings/virtio/iommu.txt
diff --git a/Documentation/device
] [RFC v8 00/18] VIRTIO-IOMMU device
https://www.mail-archive.com/qemu-devel@nongnu.org/msg572637.html
Jean-Philippe Brucker (7):
dt-bindings: virtio-mmio: Add IOMMU description
dt-bindings: virtio: Add virtio-pci-iommu node
of: Allow the iommu-map property to omit untranslated devices
PCI
Otherwise, the virtio-mmio device may perform DMA through an IOMMU, which
requires an "iommus" property. Describe these requirements in the
device-tree bindings documentation.
Reviewed-by: Rob Herring
Reviewed-by: Eric Auger
Signed-off-by: Jean-Philippe Brucker
---
.../devicetree/bind
On 08/11/2018 14:48, Auger Eric wrote:
>> +struct virtio_iommu_probe_property {
>> +__le16 type;
>> +__le16 length;
> the value[] field has disappeared but still is documented in the v0.8 spec.
Good catch. I removed value[]
On 08/11/2018 14:51, Auger Eric wrote:
>>> +/*
>>> + * viommu_replay_mappings - re-send MAP requests
>>> + *
>>> + * When reattaching a domain that was previously detached from all
>>> endpoints,
>>> + * mappings were deleted from the device. Re-create the mappings available
>>> in
>>> + * the
On 31/08/2018 15:07, Auger Eric wrote:
>> Since the ioctl will be used to combine invalidations (invalidate both
>> ATC and TLB with a single call), we need an additional ASID field for
>> the SMMU - ATC is invalidated by PASID, TLB by ASID. I used to call it
>> "tag", but I'm leaning towards
On 31/08/2018 15:11, Auger Eric wrote:
> Yep this works with my setup but I was waiting for such kind of comments
> to turn this prototype into something more "production level" ;-) Did
> you send anything upstream, related to this branch?
No I didn't have time to clean it up yet, and don't know
On 03/09/2018 13:41, Auger Eric wrote:
> Also what about CMD_CFI_CD(_ALL) propagation. Is it an
> IOMMU_INV_TYPE_PASID invalidation?
Yes, INV_TYPE_PASID corresponds to the config invalidation. CMD_CFGI_CD
is granule INV_GRANU_PASID_SEL and CMD_CFGI_CD_ALL is granule
INV_GRANU_ALL_PASID
Thanks,
On 31/08/2018 14:52, Auger Eric wrote:
> Do we agree here we can get rid of the struct device * parameter?
That's fine by me, in my opinion the bind operation should only be on
the domain, like map/unmap. For the invalidation however, I think we
need to keep the device as an optional parameter,
On 04/09/2018 09:41, Auger Eric wrote:
> I think the confusion comes from the different terminology used in VTD
> and ARM SMMU spec.
>
> Your PASID table ~ ARM SMMU Context Descriptor (CD) table
> Your Root Entry/Context Entry ~ ARM SMMU Stream Table Entry (STE)
In past discussions we used
Hi Eric,
On 16/11/2018 06:08, Auger Eric wrote:
>> +struct viommu_domain {
>> +struct iommu_domain domain;
>> +struct viommu_dev *viommu;
>> +struct mutexmutex;
> same naming/comment as in smmu driver may help here
> struct mutex
1 - 100 of 218 matches
Mail list logo