[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH qemu v16 05/19] vfio: Check that IOMMU MR transl
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH qemu v16 05/19] vfio: Check that IOMMU MR translates to system address space |
Date: |
Thu, 26 May 2016 11:51:29 +1000 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
On Wed, May 04, 2016 at 04:52:17PM +1000, Alexey Kardashevskiy wrote:
> At the moment IOMMU MR only translate to the system memory.
> However if some new code changes this, we will need clear indication why
> it is not working so here is the check.
>
> Signed-off-by: Alexey Kardashevskiy <address@hidden>
> Reviewed-by: David Gibson <address@hidden>
Alex,
I think this is a reasonable sanity check regardless of what happens
with the rest of the series. Can you apply this?
> ---
> Changes:
> v15:
> * added some spaces
>
> v14:
> * new to the series
> ---
> hw/vfio/common.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/vfio/common.c b/hw/vfio/common.c
> index f32cc49..6d23d0f 100644
> --- a/hw/vfio/common.c
> +++ b/hw/vfio/common.c
> @@ -266,6 +266,12 @@ static void vfio_iommu_map_notify(Notifier *n, void
> *data)
>
> trace_vfio_iommu_map_notify(iova, iova + iotlb->addr_mask);
>
> + if (iotlb->target_as != &address_space_memory) {
> + error_report("Wrong target AS \"%s\", only system memory is allowed",
> + iotlb->target_as->name ? iotlb->target_as->name :
> "none");
> + return;
> + }
> +
> /*
> * The IOMMU TLB entry we have just covers translation through
> * this IOMMU to its immediate target. We need to translate
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH qemu v16 00/19] spapr: vfio: Enable Dynamic DMA windows (DDW), Alexey Kardashevskiy, 2016/05/04
- [Qemu-devel] [PATCH qemu v16 10/19] spapr_iommu: Migrate full state, Alexey Kardashevskiy, 2016/05/04
- [Qemu-devel] [PATCH qemu v16 16/19] vfio: Add host side DMA window capabilities, Alexey Kardashevskiy, 2016/05/04
- [Qemu-devel] [PATCH qemu v16 05/19] vfio: Check that IOMMU MR translates to system address space, Alexey Kardashevskiy, 2016/05/04
- Re: [Qemu-devel] [PATCH qemu v16 05/19] vfio: Check that IOMMU MR translates to system address space,
David Gibson <=
- [Qemu-devel] [PATCH qemu v16 12/19] spapr_pci: Reset DMA config on PHB reset, Alexey Kardashevskiy, 2016/05/04
- [Qemu-devel] [PATCH qemu v16 09/19] spapr_iommu: Finish renaming vfio_accel to need_vfio, Alexey Kardashevskiy, 2016/05/04
- [Qemu-devel] [PATCH qemu v16 17/19] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping being used by VFIO, Alexey Kardashevskiy, 2016/05/04
- Re: [Qemu-devel] [PATCH qemu v16 17/19] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping being used by VFIO, Alex Williamson, 2016/05/13
- Re: [Qemu-devel] [PATCH qemu v16 17/19] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping being used by VFIO, Alexey Kardashevskiy, 2016/05/16
- Re: [Qemu-devel] [PATCH qemu v16 17/19] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping being used by VFIO, Alex Williamson, 2016/05/16
- [Qemu-devel] [RFC PATCH qemu] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping listening, Alexey Kardashevskiy, 2016/05/20
- Re: [Qemu-devel] [RFC PATCH qemu] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping listening, Alex Williamson, 2016/05/20
- Re: [Qemu-devel] [RFC PATCH qemu] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping listening, David Gibson, 2016/05/26