xen: fix many long-standing grant mapping bugs
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest14 patches 17 repliesIn review
- v1 RFC12 patches 21 repliesSuperseded
Changes in v2 from the cover letter
- Add find_page() VMA op instead of pages field (so struct vm_area_struct doesn't increase in size.
- Make foreign page tracking arch-independant and improve the API.
- Alloc extra memory (for 32-bit archs) for the (domain, gref) when allocating the page (instead of during the map).
- Convert gntdev's lock to a mutex.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | mm: provide a find_page vma operationinclude/ mm/ | +5 | 0 replies | |
| 2/14 | mm: add 'foreign' alias for the 'pinned' page flaginclude/ | +2 | 0 replies | |
| 3/14 | xen/grant-table: pre-populate kernel unmap ops for xen_gnttab_unmap_refs()arch/ arch/ arch/ +4 more | +34 | 0 replies | |
| 4/14 | xen: remove scratch frames for ballooned pages and m2p overridearch/ arch/ drivers/ | +14 | 0 replies | |
| 5/14 | x86/xen: require ballooned pages for grant mapsarch/ drivers/ | +3 | 0 replies | |
| 6/14 | xen/grant-table: add helpers for allocating pagesdrivers/ drivers/ drivers/ +3 more | +42 | 0 replies | |
| 7/14 | xen: mark grant mapped pages as foreignarch/ drivers/ include/ | +61 | 3 replies | |
| 8/14 | xen-netback: use foreign page information from the pages themselvesdrivers/ | +9 | 7 replies | |
| 9/14 | xen/grant-table: add a mechanism to safely unmap pages that are in usedrivers/ include/ | +62 | 2 replies | |
| 10/14 | xen/gntdev: convert priv->lock to a mutexdrivers/ | +20 | 0 replies | |
| 11/14 | xen/gntdev: safely unmap grants in case they are still in usedrivers/ | +31 | 0 replies | |
| 12/14 | xen-blkback: safely unmap grants in case they are still in usedrivers/ drivers/ | +103 | 5 replies | |
| 13/14 | xen/gntdev: mark userspace PTEs as special on x86 PV guestsdrivers/ include/ include/ | +43 | 0 replies | |
| 14/14 | xen/gntdev: provide find_page VMA operationdrivers/ | +12 | 0 replies |
Reviews trailers per patch
1 of 14 patches has a Reviewed-by or Acked-by.
| Patch | David S. Miller |
|---|---|
| 1/14 | |
| 2/14 | |
| 3/14 | |
| 4/14 | |
| 5/14 | |
| 6/14 | |
| 7/14 | |
| 8/14 | A-b A-b |
| 9/14 | |
| 10/14 | |
| 11/14 | |
| 12/14 | |
| 13/14 | |
| 14/14 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCHv2 00/14] xen: fix many long-standing grant mapping bugs
This series fixes a number of long-standing bugs in the handling of grant maps. Refer to the following for all the details.
http://xenbits.xen.org/people/dvrabel/grant-improvements-C.pdf
In summary, the important uses that this enables are:
1. Block backends can use networked storage safely.
2. Block backends can use network storage provided by other guests on the same host.
3. User space block backends can use direct I/O or asynchronous I/O.
The first two patches are the core MM changes necessary. I shall be sending these to the MM maintainers seperately.
Patches #3 and #4 remove existing (broken) mechanisms. This does temporarily break some previously working use cases, but it does make the subsequent additions much easier to review.
As a happy side effect, performance is also likely to be improved in some areas (but I've not got any measurements yet). User space backends using grant mapping should see some good improvements from reduced overheads and better unmap batching. VIF to VIF network traffic may also see a small improvement.
Finally, thanks to Jenny who did much of the implementation.
Changes in v2:
- Add find_page() VMA op instead of pages field (so struct vm_area_struct doesn't increase in size.
- Make foreign page tracking arch-independant and improve the API.
- Alloc extra memory (for 32-bit archs) for the (domain, gref) when allocating the page (instead of during the map).
- Convert gntdev's lock to a mutex.
David