search for: gnttab_map_grant_ref

Displaying 20 results from an estimated 75 matches for "gnttab_map_grant_ref".

2014 Feb 27
3
[PATCH] xen/grant-table: Refactor gnttab_[un]map_refs to avoid m2p_override
...5ab..cf4f3e8 100644 --- a/arch/arm/include/asm/xen/page.h +++ b/arch/arm/include/asm/xen/page.h @@ -97,16 +97,13 @@ static inline pte_t *lookup_address(unsigned long address, unsigned int *level) return NULL; } -static inline int m2p_add_override(unsigned long mfn, struct page *page, - struct gnttab_map_grant_ref *kmap_op) -{ - return 0; -} +extern int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops, + struct gnttab_map_grant_ref *kmap_ops, + struct page **pages, unsigned int count); -static inline int m2p_remove_override(struct page *page, bool clear_pte) -{ - return 0; -} +exter...
2014 Feb 27
3
[PATCH] xen/grant-table: Refactor gnttab_[un]map_refs to avoid m2p_override
...5ab..cf4f3e8 100644 --- a/arch/arm/include/asm/xen/page.h +++ b/arch/arm/include/asm/xen/page.h @@ -97,16 +97,13 @@ static inline pte_t *lookup_address(unsigned long address, unsigned int *level) return NULL; } -static inline int m2p_add_override(unsigned long mfn, struct page *page, - struct gnttab_map_grant_ref *kmap_op) -{ - return 0; -} +extern int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops, + struct gnttab_map_grant_ref *kmap_ops, + struct page **pages, unsigned int count); -static inline int m2p_remove_override(struct page *page, bool clear_pte) -{ - return 0; -} +exter...
2012 Apr 10
7
[PATCH v3 1/2] xen: enter/exit lazy_mmu_mode around m2p_override calls
...gt;u.rw.seg[i].first_sect << 9); } + arch_leave_lazy_mmu_mode(); return ret; } diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index b4d4eac..c7dc2d6 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c @@ -751,6 +751,8 @@ int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops, if (xen_feature(XENFEAT_auto_translated_physmap)) return ret; + arch_enter_lazy_mmu_mode(); + for (i = 0; i < count; i++) { /* Do not add to override if the map failed. */ if (map_ops[i].status) @@ -769,6 +771,8 @@ int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops...
2013 Nov 20
6
[PATCH] xen/gnttab: leave lazy MMU mode in the case of a m2p override failure
...drivers/xen/grant-table.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index 62ccf54..0283871 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c @@ -930,9 +930,10 @@ int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops, ret = m2p_add_override(mfn, pages[i], kmap_ops ? &kmap_ops[i] : NULL); if (ret) - return ret; + goto out; } + out: if (lazy) arch_leave_lazy_mmu_mode(); @@ -969,9 +970,10 @@ int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops, ret = m2p_r...
2005 Nov 06
2
Bug in use of grant tables in blkback.c error path?
...<<<<<< if (handle == BLKBACK_INVALID_HANDLE) continue; unmap[i].host_addr = MMAP_VADDR(idx, i); unmap[i].dev_bus_addr = 0; unmap[i].handle = handle; pending_handle(idx, i) = BLKBACK_INVALID_HANDLE; invcount++; } I also checked the implementation of gnttab_map_grant_ref: static long gnttab_map_grant_ref( gnttab_map_grant_ref_t *uop, unsigned int count) { int i; for ( i = 0; i < count; i++ ) (void)__gnttab_map_grant_ref(&uop[i]); return 0; } gnttab_map_grant_ref seems to keep going and attempt to map the remaining pages after an e...
2011 Apr 04
0
[PATCH] linux-2.6.18/backends: use xenbus_be.ko interfaces instead of open-coding them
...include <linux/kthread.h> -#include <linux/delay.h> +#include <linux/vmalloc.h> static kmem_cache_t *blkif_cachep; @@ -55,75 +55,39 @@ blkif_t *blkif_alloc(domid_t domid) return blkif; } -static int map_frontend_page(blkif_t *blkif, unsigned long shared_page) -{ - struct gnttab_map_grant_ref op; - int ret; - - gnttab_set_map_op(&op, (unsigned long)blkif->blk_ring_area->addr, - GNTMAP_host_map, shared_page, blkif->domid); - - gnttab_check_GNTST_eagain_do_while(GNTTABOP_map_grant_ref, &op); - - if (op.status == GNTST_okay) { - blkif->shmem_ref = shared_page; - b...
2010 Dec 08
2
[PATCH] xen: gntdev: move use of GNTMAP_contains_pte next to the map_op
This flag controls the meaning of gnttab_map_grant_ref.host_addr and specifies that the field contains a refernce to the pte entry to be used to perform the mapping. Therefore move the use of this flag to the point at which we actually use a reference to the pte instead of something else, splitting up the usage of the flag in this way is confusing and...
2012 Aug 16
0
[RFC v1 3/5] VBD: enlarge max segment per request in blkfront
...#39;'ve passed to the lower device layers has a * ''pending_req'' allocated to it. Each buffer_head that completes decrements @@ -78,6 +83,11 @@ struct pending_req { unsigned short operation; int status; struct list_head free_list; + struct gnttab_map_grant_ref *map; + struct gnttab_unmap_grant_ref *unmap; + struct seg_buf *seg; + struct bio **biolist; + struct page **pages; }; #define BLKBACK_INVALID_HANDLE (~0) @@ -123,28 +133,9 @@ static inline unsigned long vaddr(struct pending_req *req, int seg)...
2010 Sep 15
15
xenpaging fixes for kernel and hypervisor
Patrick, there following patches fix xenpaging for me. Granttable handling is incomplete. If a page is gone, a GNTST_eagain should be returned to the caller to inidcate the hypercall has to be retried after a while, until the page is available again. Please review. Olaf _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...+ struct xenbus_map_node *node); + static int xenbus_map_ring_valloc_pv(struct xenbus_device *dev, - int gnt_ref, void **vaddr) + int gnt_ref[], int nr_grefs, void **vaddr) { - struct gnttab_map_grant_ref op = { - .flags = GNTMAP_host_map | GNTMAP_contains_pte, - .ref = gnt_ref, - .dom = dev->otherend_id, - }; + struct gnttab_map_grant_ref op[XENBUS_MAX_RING_PAGES]; struct xenbus_map_node *node; struct vm_struct *area; -...
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...+ struct xenbus_map_node *node); + static int xenbus_map_ring_valloc_pv(struct xenbus_device *dev, - int gnt_ref, void **vaddr) + int gnt_ref[], int nr_grefs, void **vaddr) { - struct gnttab_map_grant_ref op = { - .flags = GNTMAP_host_map | GNTMAP_contains_pte, - .ref = gnt_ref, - .dom = dev->otherend_id, - }; + struct gnttab_map_grant_ref op[XENBUS_MAX_RING_PAGES]; struct xenbus_map_node *node; struct vm_struct *area; -...
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...+ struct xenbus_map_node *node); + static int xenbus_map_ring_valloc_pv(struct xenbus_device *dev, - int gnt_ref, void **vaddr) + int gnt_ref[], int nr_grefs, void **vaddr) { - struct gnttab_map_grant_ref op = { - .flags = GNTMAP_host_map | GNTMAP_contains_pte, - .ref = gnt_ref, - .dom = dev->otherend_id, - }; + struct gnttab_map_grant_ref op[XENBUS_MAX_RING_PAGES]; struct xenbus_map_node *node; struct vm_struct *area; -...
2011 Dec 01
11
[PATCH 0 of 2] Paging support updates for XCP dom0
This is a cherry pick of two patches that add support for guest paged out frames in the XCP 2.6.32 dom0 patch queue. First patch propagates the ENOENT returned by the hypervisor in the case of a paged out page, all the way up the call chain to the MMAPBATCH_V2 ioctl. The ioctl is mainly used to harvest those return values and retry. The second patch adds retry loops to all backend grant
2011 Jun 21
13
VM disk I/O limit patch
...r = "0"; + } + return ret_str; +} + static int dispatch_rw_block_io(blkif_t *blkif, blkif_request_t *req, - pending_req_t *pending_req) + pending_req_t *pending_req, + int *done_nr_sects) { extern void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]); struct gnttab_map_grant_ref map[BLKIF_MAX_SEGMENTS_PER_REQUEST]; @@ -426,6 +495,9 @@ static int dispatch_rw_block_io(blkif_t struct bio *bio = NULL; int ret, i; int operation; + struct timeval cur_time; + + *done_nr_sects = 0; switch (req->operation) { case BLKIF_OP_READ: @@ -582,6 +654,12 @@ static int dispatc...
2011 Jun 21
13
VM disk I/O limit patch
...r = "0"; + } + return ret_str; +} + static int dispatch_rw_block_io(blkif_t *blkif, blkif_request_t *req, - pending_req_t *pending_req) + pending_req_t *pending_req, + int *done_nr_sects) { extern void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]); struct gnttab_map_grant_ref map[BLKIF_MAX_SEGMENTS_PER_REQUEST]; @@ -426,6 +495,9 @@ static int dispatch_rw_block_io(blkif_t struct bio *bio = NULL; int ret, i; int operation; + struct timeval cur_time; + + *done_nr_sects = 0; switch (req->operation) { case BLKIF_OP_READ: @@ -582,6 +654,12 @@ static int dispatc...
2012 May 25
0
[PATCH 3/3] gnttab: cleanup
...ptrack_limit; handle++ ) { - map = &maptrack_entry(gt, handle); + map = &maptrack_entry(lgt, handle); if ( !(map->flags & (GNTMAP_device_map|GNTMAP_host_map)) || map->domid != rd->domain_id ) continue; @@ -476,6 +475,7 @@ __gnttab_map_grant_ref( struct gnttab_map_grant_ref *op) { struct domain *ld, *rd, *owner = NULL; + struct grant_table *lgt, *rgt; struct vcpu *led; int handle; unsigned long frame = 0, nr_gets = 0; @@ -525,7 +525,8 @@ __gnttab_map_grant_ref( return; } - if (...
2008 Mar 28
12
[PATCH 00/12] Xen arch portability patches (take 4)
Hi Jeremy. According to your suggestion, I recreated patches for Ingo's x86.git tree. And this patch series includes Eddie's modification. Please review and forward them. (or push back to respin.) Recently the xen-ia64 community started to make efforts to merge xen/ia64 Linux to upstream. The first step is to merge up domU portion. This patchset is preliminary for xen/ia64 domU linux
2008 Mar 28
12
[PATCH 00/12] Xen arch portability patches (take 4)
Hi Jeremy. According to your suggestion, I recreated patches for Ingo's x86.git tree. And this patch series includes Eddie's modification. Please review and forward them. (or push back to respin.) Recently the xen-ia64 community started to make efforts to merge xen/ia64 Linux to upstream. The first step is to merge up domU portion. This patchset is preliminary for xen/ia64 domU linux
2008 May 19
20
[PATCH 00/23] ia64/xen domU take 6
Hi. This patchset implements ia64/xen domU support based on ia64/pv_ops frame work which was sent as another patchest. Changes from take 5 are rebased to Linux 2.6.26-rc3, bug fix ivt.S paravirtualization and multi entry point support. I believe these patches can be applied to the linux ia64 repository. This patchset does the followings. - Some preparation work. Mainly importing header files to
2008 May 19
20
[PATCH 00/23] ia64/xen domU take 6
Hi. This patchset implements ia64/xen domU support based on ia64/pv_ops frame work which was sent as another patchest. Changes from take 5 are rebased to Linux 2.6.26-rc3, bug fix ivt.S paravirtualization and multi entry point support. I believe these patches can be applied to the linux ia64 repository. This patchset does the followings. - Some preparation work. Mainly importing header files to