[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 4/6] block/nvme: Implement .bdrv_dma_map and
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v3 4/6] block/nvme: Implement .bdrv_dma_map and .bdrv_dma_unmap |
Date: |
Mon, 10 Jul 2017 17:09:25 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
On 10/07/2017 16:59, Stefan Hajnoczi wrote:
>> +static void nvme_dma_map(BlockDriverState *bs, void *host, size_t size)
>> +{
>> + BDRVNVMeState *s = bs->opaque;
>> +
>> + nvme_vfio_dma_map(s->vfio, host, size, false, NULL);
> Since temporary=false repeated calls to map/unmap will run out of space
> and stop working after some time?
Yes, the point of bdrv_dma_map/unmap is to add a permanent mapping.
Temporary mappings are only valid inside nvme.c, because the
corresponding iova is not recorded anywhere. Instead,
bdrv_dma_map/unmap cache the iova just like we do for RAMBlock areas
during system emulation.
The solution is simply not to do that, just like img_bench only calls
map/unmap once. If it happens, things just become slower as the driver
falls back to temporary mappings.
Paolo
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v3 3/6] block: Introduce bdrv_dma_map and bdrv_dma_unmap, (continued)
[Qemu-devel] [PATCH v3 2/6] block: Add VFIO based NVMe driver, Fam Zheng, 2017/07/05
[Qemu-devel] [PATCH v3 4/6] block/nvme: Implement .bdrv_dma_map and .bdrv_dma_unmap, Fam Zheng, 2017/07/05
[Qemu-devel] [PATCH v3 5/6] qemu-img: Map bench buffer, Fam Zheng, 2017/07/05
[Qemu-devel] [PATCH v3 6/6] block: Move NVMe spec definitions to a separate header, Fam Zheng, 2017/07/05
Re: [Qemu-devel] [PATCH v3 0/6] block: Add VFIO based driver for NVMe device, Paolo Bonzini, 2017/07/05
Re: [Qemu-devel] [PATCH v3 0/6] block: Add VFIO based driver for NVMe device, no-reply, 2017/07/06