Re: [PATCH 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-05-08 Thread Auger Eric
Hi Jean, On 5/8/20 11:26 AM, Jean-Philippe Brucker wrote: > On Thu, May 07, 2020 at 04:31:58PM +0200, Eric Auger wrote: >> +static ssize_t virtio_iommu_fill_resv_mem_prop(VirtIOIOMMU *s, uint32_t ep, >> + uint8_t *buf, size_t free) >> +{ >> +struct

Re: [PATCH 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-05-08 Thread Jean-Philippe Brucker
On Thu, May 07, 2020 at 04:31:58PM +0200, Eric Auger wrote: > +static ssize_t virtio_iommu_fill_resv_mem_prop(VirtIOIOMMU *s, uint32_t ep, > + uint8_t *buf, size_t free) > +{ > +struct virtio_iommu_probe_resv_mem prop = {}; > +size_t size = size

Re: [PATCH 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-05-07 Thread Auger Eric
Hi Peter, On 5/7/20 9:40 PM, Peter Xu wrote: > Hi, Eric, > > On Thu, May 07, 2020 at 04:31:58PM +0200, Eric Auger wrote: > > [...] > >> @@ -452,17 +520,33 @@ static void virtio_iommu_handle_command(VirtIODevice >> *vdev, VirtQueue *vq) >> case VIRTIO_IOMMU_T_UNMAP: >> tail

Re: [PATCH 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-05-07 Thread Peter Xu
Hi, Eric, On Thu, May 07, 2020 at 04:31:58PM +0200, Eric Auger wrote: [...] > @@ -452,17 +520,33 @@ static void virtio_iommu_handle_command(VirtIODevice > *vdev, VirtQueue *vq) > case VIRTIO_IOMMU_T_UNMAP: > tail.status = virtio_iommu_handle_unmap(s, iov, iov_cnt); >

[PATCH 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-05-07 Thread Eric Auger
This patch implements the PROBE request. At the moment, only THE RESV_MEM property is handled. The first goal is to report iommu wide reserved regions such as the MSI regions set by the machine code. On x86 this will be the IOAPIC MSI region, [0xFEE0 - 0xFEEF], on ARM this may be the ITS do