[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e9730008-0f3f-c986-0055-e83578961896@redhat.com>
Date: Fri, 7 Aug 2020 11:04:30 +0800
From: Jason Wang <jasowang@...hat.com>
To: Eli Cohen <eli@...lanox.com>
Cc: "mst@...hat.com" <mst@...hat.com>,
"virtualization@...ts.linux-foundation.org"
<virtualization@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"rob.miller@...adcom.com" <rob.miller@...adcom.com>,
"lingshan.zhu@...el.com" <lingshan.zhu@...el.com>,
"eperezma@...hat.com" <eperezma@...hat.com>,
"lulu@...hat.com" <lulu@...hat.com>,
Shahaf Shuler <shahafs@...lanox.com>,
"hanand@...inx.com" <hanand@...inx.com>,
"mhabets@...arflare.com" <mhabets@...arflare.com>,
"gdawar@...inx.com" <gdawar@...inx.com>,
"saugatm@...inx.com" <saugatm@...inx.com>,
"vmireyno@...vell.com" <vmireyno@...vell.com>,
"zhangweining@...jie.com.cn" <zhangweining@...jie.com.cn>
Subject: Re: [PATCH 1/4] vdpa: introduce config op to get valid iova range
On 2020/8/6 下午8:10, Eli Cohen wrote:
> On Wed, Jun 17, 2020 at 06:29:44AM +0300, Jason Wang wrote:
>> This patch introduce a config op to get valid iova range from the vDPA
>> device.
>>
>> Signed-off-by: Jason Wang<jasowang@...hat.com>
>> ---
>> include/linux/vdpa.h | 14 ++++++++++++++
>> 1 file changed, 14 insertions(+)
>>
>> diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
>> index 239db794357c..b7633ed2500c 100644
>> --- a/include/linux/vdpa.h
>> +++ b/include/linux/vdpa.h
>> @@ -41,6 +41,16 @@ struct vdpa_device {
>> unsigned int index;
>> };
>>
>> +/**
>> + * vDPA IOVA range - the IOVA range support by the device
>> + * @start: start of the IOVA range
>> + * @end: end of the IOVA range
>> + */
>> +struct vdpa_iova_range {
>> + u64 start;
>> + u64 end;
>> +};
>> +
> What do you do with this information? Suppose some device tells you it
> supports some limited range, say, from 0x40000000 to 0x80000000. What
> does qemu do with this information?
For qemu, when qemu will fail the vDPA device creation when:
1) vIOMMU is not enabled and GPA is out of this range
2) vIOMMU is enabled but it can't report such range to guest
For other userspace application, it will know it can only use this range
as its IOVA.
Thanks
Powered by blists - more mailing lists