search for: release_all_dma

Displaying 15 results from an estimated 15 matches for "release_all_dma".

2007 Apr 26
1
[PATCH] Fix lguest oops when guest dies while receiving I/O
...t_gdt(lg); lg->tsk = current; - lg->mm = get_task_mm(current); + get_task_struct(lg->tsk); + lg->mm = get_task_mm(lg->tsk); lg->last_pages = NULL; mutex_unlock(&lguest_lock); @@ -160,6 +161,7 @@ static int close(struct inode *inode, st mutex_lock(&lguest_lock); release_all_dma(lg); free_guest_pagetable(lg); + put_task_struct(lg->tsk); mmput(lg->mm); if (!IS_ERR(lg->dead)) kfree(lg->dead);
2007 May 09
2
[PATCH 0/2 v05] lguest: TSC & hrtimers
The following patches are the latest update of the TSC and hrtimer patches I posted on 29/03. Rusty's original TSC patch has been resynced to the latest lguest repo, as has the hrtimer patch, which also incorporates feedback from Jeremy & Rusty: - Change clock event hrtimer to absolute time. 'now' is captured in the host during the hypercall. - Propagate -ETIME back to the
2007 May 09
2
[PATCH 0/2 v05] lguest: TSC & hrtimers
The following patches are the latest update of the TSC and hrtimer patches I posted on 29/03. Rusty's original TSC patch has been resynced to the latest lguest repo, as has the hrtimer patch, which also incorporates feedback from Jeremy & Rusty: - Change clock event hrtimer to absolute time. 'now' is captured in the host during the hypercall. - Propagate -ETIME back to the
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 09/13] lguest64 devices
...info->dma_is_pending = 1; + linfo->pending_dma = udma; + linfo->pending_addr = addr; + pending = 1; + } +unlock: + up_read(&current->mm->mmap_sem); + mutex_unlock(&lguest_lock); + printk("Returning send_dma with pending: %x\n",pending); + return pending; +} +void release_all_dma(struct lguest_guest_info *linfo) +{ + unsigned int i; + + BUG_ON(!mutex_is_locked(&lguest_lock)); + + down_read(&linfo->mm->mmap_sem); + for (i = 0; i < LGUEST_MAX_DMA; i++) { + if (linfo->dma[i].interrupt) + unlink_dma(&linfo->dma[i]); + } + up_read(&linfo->mm-...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 09/13] lguest64 devices
...info->dma_is_pending = 1; + linfo->pending_dma = udma; + linfo->pending_addr = addr; + pending = 1; + } +unlock: + up_read(&current->mm->mmap_sem); + mutex_unlock(&lguest_lock); + printk("Returning send_dma with pending: %x\n",pending); + return pending; +} +void release_all_dma(struct lguest_guest_info *linfo) +{ + unsigned int i; + + BUG_ON(!mutex_is_locked(&lguest_lock)); + + down_read(&linfo->mm->mmap_sem); + for (i = 0; i < LGUEST_MAX_DMA; i++) { + if (linfo->dma[i].interrupt) + unlink_dma(&linfo->dma[i]); + } + up_read(&linfo->mm-...
2007 May 09
1
[patch 3/9] lguest: the host code
...lock); + set_wakeup_process(lg, NULL); + empty++; + goto again; + } + } else { + /* Private mapping: tell our userspace. */ + lg->dma_is_pending = 1; + lg->pending_dma = udma; + lg->pending_key = ukey; + } +unlock: + up_read(fshared); + mutex_unlock(&lguest_lock); +} + +void release_all_dma(struct lguest *lg) +{ + unsigned int i; + + BUG_ON(!mutex_is_locked(&lguest_lock)); + + down_read(&lg->mm->mmap_sem); + for (i = 0; i < LGUEST_MAX_DMA; i++) { + if (lg->dma[i].interrupt) + unlink_dma(&lg->dma[i]); + } + up_read(&lg->mm->mmap_sem); +} + +/* We...
2007 May 09
1
[patch 3/9] lguest: the host code
...lock); + set_wakeup_process(lg, NULL); + empty++; + goto again; + } + } else { + /* Private mapping: tell our userspace. */ + lg->dma_is_pending = 1; + lg->pending_dma = udma; + lg->pending_key = ukey; + } +unlock: + up_read(fshared); + mutex_unlock(&lguest_lock); +} + +void release_all_dma(struct lguest *lg) +{ + unsigned int i; + + BUG_ON(!mutex_is_locked(&lguest_lock)); + + down_read(&lg->mm->mmap_sem); + for (i = 0; i < LGUEST_MAX_DMA; i++) { + if (lg->dma[i].interrupt) + unlink_dma(&lg->dma[i]); + } + up_read(&lg->mm->mmap_sem); +} + +/* We...
2007 Aug 08
13
[PATCH 0/7] Modify lguest32 to make room for lguest64
Hi all, I've been working on lguest64 and in order to do this, I had to move a lot of the i386 specific out of the way. Well, the lguest64 port is still not ready to display, but before Rusty makes too many changes I would like this in upstream so I don't have to keep repeating my changes :-) So this patch series moves lguest32 out of the way for other archs. -- Steve
2007 Aug 08
13
[PATCH 0/7] Modify lguest32 to make room for lguest64
Hi all, I've been working on lguest64 and in order to do this, I had to move a lot of the i386 specific out of the way. Well, the lguest64 port is still not ready to display, but before Rusty makes too many changes I would like this in upstream so I don't have to keep repeating my changes :-) So this patch series moves lguest32 out of the way for other archs. -- Steve
2007 Aug 08
7
[PATCH 0/5 -v2] Modify lguest32 to make room for lguest64 (version 2)
[ Changes since last version. - Move lg.h to include/asm instead (suggested by Rusty Russel) - All steps of the series compiles (suggested by Stephen Rothwell) - Better ifdef header naming (suggested by Stephen Rothwell) - Added Andi Kleen to CC (forgot to on V1) ] Hi all, I've been working on lguest64 and in order to do this, I had to move a lot of the i386 specific out of the
2007 Aug 08
7
[PATCH 0/5 -v2] Modify lguest32 to make room for lguest64 (version 2)
[ Changes since last version. - Move lg.h to include/asm instead (suggested by Rusty Russel) - All steps of the series compiles (suggested by Stephen Rothwell) - Better ifdef header naming (suggested by Stephen Rothwell) - Added Andi Kleen to CC (forgot to on V1) ] Hi all, I've been working on lguest64 and in order to do this, I had to move a lot of the i386 specific out of the
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...struct file *file) +{ + struct lguest_vcpu *vcpu = file->private_data; + struct lguest_guest_info *linfo; + + if (!vcpu) + return -EBADFD; + + linfo = vcpu->guest; + /* FIXME: need to handle multiple vcpus */ + free_vcpu(linfo, vcpu); + kfree(linfo); +#if 0 + mutex_lock(&lguest_lock); + release_all_dma(lg); + free_page((long)lg->trap_page); + free_guest_pagetable(lg); + mmput(lg->mm); + if (lg->dead != (void *)1) + kfree(lg->dead); + memset(lg->state, 0, sizeof(*lg->state)); + memset(lg, 0, sizeof(*lg)); + mutex_unlock(&lguest_lock); +#endif + return 0; +} + +static struct...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...struct file *file) +{ + struct lguest_vcpu *vcpu = file->private_data; + struct lguest_guest_info *linfo; + + if (!vcpu) + return -EBADFD; + + linfo = vcpu->guest; + /* FIXME: need to handle multiple vcpus */ + free_vcpu(linfo, vcpu); + kfree(linfo); +#if 0 + mutex_lock(&lguest_lock); + release_all_dma(lg); + free_page((long)lg->trap_page); + free_guest_pagetable(lg); + mmput(lg->mm); + if (lg->dead != (void *)1) + kfree(lg->dead); + memset(lg->state, 0, sizeof(*lg->state)); + memset(lg, 0, sizeof(*lg)); + mutex_unlock(&lguest_lock); +#endif + return 0; +} + +static struct...
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c