search for: gref

Displaying 20 results from an estimated 71 matches for "gref".

2011 Apr 06
1
Xen page sharing
Hi sahil: I think the reason why you cannot get page shared is due to the gref you got. Gref is responsible for a page allocated from domU, in my understanding it should not be 0, that is a gref 0 can not be shared, that''s why I skip gref 0 to be nominated. The gref is nominated to Xen and later used to find a corrspond MFN, so it shall not always b...
2011 Mar 07
6
[PATCH] xen/gntdev,gntalloc: Remove unneeded VM flags
...oc.c b/drivers/xen/gntalloc.c index a7ffdfe..f6832f4 100644 --- a/drivers/xen/gntalloc.c +++ b/drivers/xen/gntalloc.c @@ -427,6 +427,17 @@ static long gntalloc_ioctl(struct file *filp, unsigned int cmd, return 0; } +static void gntalloc_vma_open(struct vm_area_struct *vma) +{ + struct gntalloc_gref *gref = vma->vm_private_data; + if (!gref) + return; + + spin_lock(&gref_lock); + gref->users++; + spin_unlock(&gref_lock); +} + static void gntalloc_vma_close(struct vm_area_struct *vma) { struct gntalloc_gref *gref = vma->vm_private_data; @@ -441,6 +452,7 @@ static void gnta...
2012 May 25
0
[PATCH 3/3] gnttab: cleanup
...(rd->grant_table)) ) + if ( unlikely(ref >= nr_grant_entries(rgt)) ) { gdprintk(XENLOG_INFO, "Bad grant reference (%d) for transfer to domain(%d).\n", @@ -1673,6 +1677,7 @@ static void __release_grant_for_copy( struct domain *rd, unsigned long gref, int readonly) { + struct grant_table *rgt = rd->grant_table; grant_entry_header_t *sha; struct active_grant_entry *act; unsigned long r_frame; @@ -1685,13 +1690,13 @@ __release_grant_for_copy( released_read = 0; released_write = 0; - spin_lock(&rd->grant...
2012 Sep 19
27
[PATCH] Persistent grant maps for xen blk drivers
...ff both ends have this ability, persistent mode is used. To perform a read, in persistent mode, blkfront uses a separate pool of pages that it maps to dom0. When a request comes in, blkfront transmutes the request so that blkback will write into one of these free pages. Blkback keeps note of which grefs it has already mapped. When a new ring request comes to blkback, it looks to see if it has already mapped that page. If so, it will not map it again. If the page hasn''t been previously mapped, it is mapped now, and a record is kept of this mapping. Blkback proceeds as usual. When blkfront...
2010 Mar 10
3
pvSCSI question - can a gref describe more than one page?
Porting the pvSCSI backend driver to the pvops kernel is turning out to be a bit harder than first thought, mostly because all the Linux routines that might be useful are written with the assumption that they would be passed a mapped buffer and they would then build an sg list out of that. pvSCSI already has an sg list, and all the routines that it makes use of have been deprecated since 2.6.18
2011 Nov 04
0
[patch 2/2] xen-gntalloc: signedness bug in add_grefs()
gref->gref_id is unsigned so the error handling didn't work. gnttab_grant_foreign_access() returns an int type, so we can add a cast here, and it doesn't cause any problems. gnttab_grant_foreign_access() can return a variety of errors including -ENOSPC, -ENOSYS and -ENOMEM. Signed-off-by: Da...
2011 Nov 04
0
[patch 2/2] xen-gntalloc: signedness bug in add_grefs()
gref->gref_id is unsigned so the error handling didn't work. gnttab_grant_foreign_access() returns an int type, so we can add a cast here, and it doesn't cause any problems. gnttab_grant_foreign_access() can return a variety of errors including -ENOSPC, -ENOSYS and -ENOMEM. Signed-off-by: Da...
2011 Nov 04
0
[patch 2/2] xen-gntalloc: signedness bug in add_grefs()
gref->gref_id is unsigned so the error handling didn't work. gnttab_grant_foreign_access() returns an int type, so we can add a cast here, and it doesn't cause any problems. gnttab_grant_foreign_access() can return a variety of errors including -ENOSPC, -ENOSYS and -ENOMEM. Signed-off-by: Da...
2008 Apr 04
8
Grant tables
Hi, I need to use the grant table mechanism, but I can''t find any example regarding how to do it. Could you please provide some examples? Thanks Carlo -- È molto più bello sapere qualcosa di tutto, che sapere tutto di una cosa. Blaise Pascal _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
2011 Jun 28
5
Memory Page Sharing on Xen 4.0.1
Dear List, I?m trying to figure out *memory page sharing***using HVM on Xen 4.0.1, but I?m not really able to find some useful information or sources about this issue. I just found two links porviding these sources: http://knol.google.com/k/learning-grant-tables http://blog.chinaunix.net/space.php?uid=20286427&do=blog&id=109114 Both are not working.. I think they are made for an older
2013 Feb 28
0
[PATCH RFC 05/12] xen-blkfront: remove frame list from blk_shadow
...uest *req) { struct blkfront_info *info = req->rq_disk->private_data; - unsigned long buffer_mfn; struct blkif_request *ring_req; unsigned long id; unsigned int fsect, lsect; @@ -434,7 +432,6 @@ static int blkif_queue_request(struct request *req) gnt_list_entry = get_grant(&gref_head, info); ref = gnt_list_entry->gref; - buffer_mfn = pfn_to_mfn(gnt_list_entry->pfn); info->shadow[id].grants_used[i] = gnt_list_entry; @@ -465,7 +462,6 @@ static int blkif_queue_request(struct request *req) kunmap_atomic(shared_data); } - info->shadow[id]....
2018 Sep 13
2
We need a patch in the kernel for tpm
Hi! Think I found a reference to the problem(s) I am seeing with xen-tpmfront in my setup on the net: https://patchwork.kernel.org/patch/9485637/ This patch has not been officially entered and it is not included in the kernel provided in SIG virt either Can we please get it in ? Best Dag
2007 Nov 26
0
[PATCH] [Mini-OS] Make gnttab allocation/free safe
...2007 +0000 +++ b/extras/mini-os/netfront.c Mon Nov 26 11:50:31 2007 +0000 @@ -147,6 +147,7 @@ moretodo: struct net_buffer* buf = &rx_buffers[id]; void* page = buf->page; + /* We are sure to have free gnttab entries since they got released above */ buf->gref = req->gref = gnttab_grant_access(0,virt_to_mfn(page),0); @@ -436,8 +437,9 @@ void netfront_xmit(unsigned char* data,i down(&tx_sem); local_irq_save(flags); + id = get_id_from_freelist(tx_freelist); + local_irq_restore(flags); - id = get_id_from_freelis...
2018 Sep 13
2
We need a patch in the kernel for tpm
.../xen-tpmfront.c index 5aaa268..dd83a07 100644 --- a/drivers/char/tpm/xen-tpmfront.c +++ b/drivers/char/tpm/xen-tpmfront.c @@ -203,7 +203,7 @@ static int setup_ring(struct xenbus_device *dev, struct tpm_private *priv) return -ENOMEM; } - rv = xenbus_grant_ring(dev, &priv->shr, 1, &gref); + rv = xenbus_grant_ring(dev, priv->shr, 1, &gref); if (rv < 0) return rv; ==================================== Best Dag
2011 Sep 01
9
[PATCH V4 0/3] xen-blkfront/blkback discard support
Dear list, This is the V4 of the trim support for xen-blkfront/blkback, Now we move BLKIF_OP_TRIM to BLKIF_OP_DISCARD, and dropped all "trim" stuffs in the patches, and use "discard" instead. Also we updated the helpers of blkif_x86_{32|64}_request or we will meet problems using a non-native protocol. And this patch has been tested with both SSD and raw file, with SSD we will
2012 May 07
14
Little help with blk ring
...e located at 7c00. I go ahead and create a REQUEST with this data: ring_req = RING_GET_REQUEST(priv,priv->req_prod_pvt); ring_req->id = 9; ring_req->nr_segments=1; ring_req->operation = BLKIF_OP_READ; ring_req->sector_number = (int)op->lba; //sector to be read ring_req->seg[0].gref = (bi->buffer_gref); //this should be get_free_gref(); ring_req->seg[0].first_sect = 0;//op->lba; ring_req->seg[0].last_sect = 7;//op->lba + op->count; RING_PUSH_REQUESTS_AND_CHECK_NOTIFY((priv),notify); //return notify=0 if(notify){ dprintf(1,"Start notify procedure\n&qu...
2011 Sep 08
5
[PATCH 0 of 2] v2: memshare/xenpaging/xen-access fixes for xen-unstable
The following two patches allow the parallel use of memsharing, xenpaging and xen-access by using an independent ring buffer for each feature. Please review. v2: - update mem_event_check_ring arguments, check domain rather than domain_id - check ring_full first because its value was just evaluated - check if ring buffer is initialized before calling mem_access_domctl/mem_paging_domctl
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...the given @ring_mfn to the peer of the given device. Return - * 0 on success, or -errno on error. On error, the device will switch to - * XenbusStateClosing, and the error will be saved in the store. + * @vaddr: starting virtual address of the ring + * @nr_pages: number of page to be granted + * @grefs: grant reference array to be filled in + * Grant access to the given @vaddr to the peer of the given device. + * Then fill in @grefs with grant references. Return 0 on success, or + * -errno on error. On error, the device will switch to + * XenbusStateClosing, and the first error will be saved i...
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...the given @ring_mfn to the peer of the given device. Return - * 0 on success, or -errno on error. On error, the device will switch to - * XenbusStateClosing, and the error will be saved in the store. + * @vaddr: starting virtual address of the ring + * @nr_pages: number of page to be granted + * @grefs: grant reference array to be filled in + * Grant access to the given @vaddr to the peer of the given device. + * Then fill in @grefs with grant references. Return 0 on success, or + * -errno on error. On error, the device will switch to + * XenbusStateClosing, and the first error will be saved i...
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...the given @ring_mfn to the peer of the given device. Return - * 0 on success, or -errno on error. On error, the device will switch to - * XenbusStateClosing, and the error will be saved in the store. + * @vaddr: starting virtual address of the ring + * @nr_pages: number of page to be granted + * @grefs: grant reference array to be filled in + * Grant access to the given @vaddr to the peer of the given device. + * Then fill in @grefs with grant references. Return 0 on success, or + * -errno on error. On error, the device will switch to + * XenbusStateClosing, and the first error will be saved i...