Re: [PATCH for-5.0 v11 14/20] virtio-iommu: Handle reserved regions in the translation process

2019-12-10 Thread Peter Xu
On Fri, Nov 22, 2019 at 07:29:37PM +0100, Eric Auger wrote: > When translating an address we need to check if it belongs to > a reserved virtual address range. If it does, there are 2 cases: > > - it belongs to a RESERVED region: the guest should neither use > this address in a MAP not instruct

Re: [PATCH for-5.0 v11 14/20] virtio-iommu: Handle reserved regions in the translation process

2019-12-10 Thread Jean-Philippe Brucker
On Fri, Nov 22, 2019 at 07:29:37PM +0100, Eric Auger wrote: > +for (i = 0; i < s->nb_reserved_regions; i++) { > +if (interval.low >= s->reserved_regions[i].low && > +interval.low <= s->reserved_regions[i].high) { > +switch (s->reserved_regions[i].type) { > +

[PATCH for-5.0 v11 14/20] virtio-iommu: Handle reserved regions in the translation process

2019-11-22 Thread Eric Auger
When translating an address we need to check if it belongs to a reserved virtual address range. If it does, there are 2 cases: - it belongs to a RESERVED region: the guest should neither use this address in a MAP not instruct the end-point to DMA on them. We report an error - It belongs to an