Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1393112
| From | Yongji Xie <xyjxie@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive |
| Date | 2016-05-03 09:40 +0200 |
| Message-ID | <ruD61-3HL-5@gated-at.bofh.it> (permalink) |
| References | <rswLp-1cD-49@gated-at.bofh.it> <ruyJ3-7Zf-5@gated-at.bofh.it> <ruBGW-2wf-7@gated-at.bofh.it> <ruBQC-2I1-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2016/5/3 14:11, Tian, Kevin wrote:
>> From: Yongji Xie [mailto:xyjxie@linux.vnet.ibm.com]
>> Sent: Tuesday, May 03, 2016 1:52 PM
>>
>>>> +
>>>> + if (!(res->start & ~PAGE_MASK)) {
>>>> + /*
>>>> + * Add shadow resource for sub-page bar whose mmio
>>>> + * page is exclusive in case that hot-add device's
>>>> + * bar is assigned into the mem hole.
>>>> + */
>>>> + shadow_res = kzalloc(sizeof(*shadow_res), GFP_KERNEL);
>>>> + shadow_res->resource.start = res->end + 1;
>>>> + shadow_res->resource.end = res->start + PAGE_SIZE - 1;
>>> What about res->start not page aligned so you end up still having
>>> a portion before res->start not exclusively reserved?
>> Do you mean add a 'dummy' resource to reserve the portion
>> before res->start if res->start not page aligned?
>>
>> But would it happen that there is a mem hole in the portion
>> before res->start? The resource should have been assigned
>> into the hole at the beginning.
>>
> Just a quick thought. Another device might occupy that range
> before initializing this device, and then 'another device' is hot
> removed later...
>
> Thanks
> Kevin
That's a good point! I will add support for this case in v2.
Thanks,
Yongji
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
RE: [PATCH] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive "Tian, Kevin" <kevin.tian@intel.com> - 2016-05-03 05:00 +0200
Re: [PATCH] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive Yongji Xie <xyjxie@linux.vnet.ibm.com> - 2016-05-03 08:10 +0200
RE: [PATCH] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive "Tian, Kevin" <kevin.tian@intel.com> - 2016-05-03 08:20 +0200
Re: [PATCH] vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive Yongji Xie <xyjxie@linux.vnet.ibm.com> - 2016-05-03 09:40 +0200
csiph-web