Displaying 20 results from an estimated 21 matches for "lguest_lock".
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 09/13] lguest64 devices
...rd,
+ (sizeof(key->both.word)+sizeof(key->both.ptr))/4,
+ key->both.offset)
+ % ARRAY_SIZE(dma_hash);
+}
+
+/* Must hold read lock on dmainfo owner's current->mm->mmap_sem */
+static void unlink_dma(struct lguest_dma_info *dmainfo)
+{
+ BUG_ON(!mutex_is_locked(&lguest_lock));
+ dmainfo->interrupt = 0;
+ list_del(&dmainfo->list);
+ drop_futex_key_refs(&dmainfo->key);
+}
+
+static inline int key_eq(const union futex_key *a, const union futex_key *b)
+{
+ return (a->both.word == b->both.word
+ && a->both.ptr == b->both.ptr
+ &&...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 09/13] lguest64 devices
...rd,
+ (sizeof(key->both.word)+sizeof(key->both.ptr))/4,
+ key->both.offset)
+ % ARRAY_SIZE(dma_hash);
+}
+
+/* Must hold read lock on dmainfo owner's current->mm->mmap_sem */
+static void unlink_dma(struct lguest_dma_info *dmainfo)
+{
+ BUG_ON(!mutex_is_locked(&lguest_lock));
+ dmainfo->interrupt = 0;
+ list_del(&dmainfo->list);
+ drop_futex_key_refs(&dmainfo->key);
+}
+
+static inline int key_eq(const union futex_key *a, const union futex_key *b)
+{
+ return (a->both.word == b->both.word
+ && a->both.ptr == b->both.ptr
+ &&...
2007 May 09
1
[patch 3/9] lguest: the host code
...e SWITCHER_ADDR 0xFFC00000
+
+static struct vm_struct *switcher_vma;
+static struct page **switcher_page;
+
+static int cpu_had_pge;
+static struct {
+ unsigned long offset;
+ unsigned short segment;
+} lguest_entry;
+
+/* This One Big lock protects all inter-guest data structures. */
+DEFINE_MUTEX(lguest_lock);
+static DEFINE_PER_CPU(struct lguest *, last_guest);
+
+/* FIXME: Make dynamic. */
+#define MAX_LGUEST_GUESTS 16
+struct lguest lguests[MAX_LGUEST_GUESTS];
+
+/* Offset from where switcher.S was compiled to where we've copied it */
+static unsigned long switcher_offset(void)
+{
+ return SWITC...
2007 May 09
1
[patch 3/9] lguest: the host code
...e SWITCHER_ADDR 0xFFC00000
+
+static struct vm_struct *switcher_vma;
+static struct page **switcher_page;
+
+static int cpu_had_pge;
+static struct {
+ unsigned long offset;
+ unsigned short segment;
+} lguest_entry;
+
+/* This One Big lock protects all inter-guest data structures. */
+DEFINE_MUTEX(lguest_lock);
+static DEFINE_PER_CPU(struct lguest *, last_guest);
+
+/* FIXME: Make dynamic. */
+#define MAX_LGUEST_GUESTS 16
+struct lguest lguests[MAX_LGUEST_GUESTS];
+
+/* Offset from where switcher.S was compiled to where we've copied it */
+static unsigned long switcher_offset(void)
+{
+ return SWITC...
2007 Apr 26
1
[PATCH] Fix lguest oops when guest dies while receiving I/O
...c
@@ -107,7 +107,8 @@ static int initialize(struct file *file,
setup_regs(lg->regs, args[2]);
setup_guest_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 14
5
[PATCH 1/6] lguest: host code tidyups
...;
+ unsigned long trapnum, errcode;
/* Trap pushed part */
- u32 eip;
- u32 cs;
- u32 eflags;
- u32 esp;
- u32 ss;
+ unsigned long eip;
+ unsigned long cs;
+ unsigned long eflags;
+ unsigned long esp;
+ unsigned long ss;
};
void free_pagetables(void);
@@ -175,14 +175,14 @@ extern struct mutex lguest_lock;
extern struct mutex lguest_lock;
/* core.c: */
-u32 lgread_u32(struct lguest *lg, u32 addr);
-void lgwrite_u32(struct lguest *lg, u32 val, u32 addr);
-void lgread(struct lguest *lg, void *buf, u32 addr, unsigned bytes);
-void lgwrite(struct lguest *lg, u32 addr, const void *buf, unsigned bytes...
2007 May 14
5
[PATCH 1/6] lguest: host code tidyups
...;
+ unsigned long trapnum, errcode;
/* Trap pushed part */
- u32 eip;
- u32 cs;
- u32 eflags;
- u32 esp;
- u32 ss;
+ unsigned long eip;
+ unsigned long cs;
+ unsigned long eflags;
+ unsigned long esp;
+ unsigned long ss;
};
void free_pagetables(void);
@@ -175,14 +175,14 @@ extern struct mutex lguest_lock;
extern struct mutex lguest_lock;
/* core.c: */
-u32 lgread_u32(struct lguest *lg, u32 addr);
-void lgwrite_u32(struct lguest *lg, u32 val, u32 addr);
-void lgread(struct lguest *lg, void *buf, u32 addr, unsigned bytes);
-void lgwrite(struct lguest *lg, u32 addr, const void *buf, unsigned bytes...
2007 Dec 20
5
[PATCH 0/16] lguest: introduce vcpu structure
this patch makes room for the vcpu structure in lguest, already used in
this very same way at lguest64. It's the first part of our plan to
have lguest and lguest64 unified too.
When two dogs hang out, you don't have new puppies right in the other day.
Some time has to be elapsed. They have to grow first. In this same spirit, having these
patches _do not_ mean smp guests can be launched
2007 Dec 20
5
[PATCH 0/16] lguest: introduce vcpu structure
this patch makes room for the vcpu structure in lguest, already used in
this very same way at lguest64. It's the first part of our plan to
have lguest and lguest64 unified too.
When two dogs hang out, you don't have new puppies right in the other day.
Some time has to be elapsed. They have to grow first. In this same spirit, having these
patches _do not_ mean smp guests can be launched
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
1
[PATCH] lguest32 kallsyms backtrace of guest.
...2(struct lguest *lg, u32 addr)
{
u32 val = 0;
Index: linux-2.6.21-rc5-mm2/drivers/lguest/lg.h
===================================================================
--- linux-2.6.21-rc5-mm2.orig/drivers/lguest/lg.h
+++ linux-2.6.21-rc5-mm2/drivers/lguest/lg.h
@@ -176,6 +176,8 @@ extern struct mutex lguest_lock;
/* core.c: */
/* Entry points in hypervisor */
const unsigned long *__lguest_default_idt_entries(void);
+u8 lgread_u8(struct lguest *lg, u32 addr);
+u16 lgread_u16(struct lguest *lg, u32 addr);
u32 lgread_u32(struct lguest *lg, u32 addr);
void lgwrite_u32(struct lguest *lg, u32 val, u32 addr)...
2007 Apr 18
1
[PATCH] lguest32 kallsyms backtrace of guest.
...2(struct lguest *lg, u32 addr)
{
u32 val = 0;
Index: linux-2.6.21-rc5-mm2/drivers/lguest/lg.h
===================================================================
--- linux-2.6.21-rc5-mm2.orig/drivers/lguest/lg.h
+++ linux-2.6.21-rc5-mm2/drivers/lguest/lg.h
@@ -176,6 +176,8 @@ extern struct mutex lguest_lock;
/* core.c: */
/* Entry points in hypervisor */
const unsigned long *__lguest_default_idt_entries(void);
+u8 lgread_u8(struct lguest *lg, u32 addr);
+u16 lgread_u16(struct lguest *lg, u32 addr);
u32 lgread_u32(struct lguest *lg, u32 addr);
void lgwrite_u32(struct lguest *lg, u32 val, u32 addr)...
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
...access.h>
+#include <asm/i387.h>
+#include "lguest.h"
+
+#define HV_OFFSET(x) (typeof(x))((unsigned long)(x)+lguest_hv_offset)
+
+unsigned long lguest_hv_addr;
+unsigned long lguest_hv_offset;
+int lguest_hv_pages;
+
+int lguest_vcpu_pages;
+int lguest_vcpu_order;
+
+DEFINE_MUTEX(lguest_lock);
+
+int lguest_address_ok(const struct lguest_guest_info *linfo, u64 addr)
+{
+ return addr / PAGE_SIZE < linfo->pfn_limit;
+}
+
+u8 lhread_u8(struct lguest_vcpu *vcpu, u64 addr)
+{
+ u8 val = 0;
+
+ if (!lguest_address_ok(vcpu->guest, addr)
+ || get_user(val, (u8 __user *)addr) != 0)...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...access.h>
+#include <asm/i387.h>
+#include "lguest.h"
+
+#define HV_OFFSET(x) (typeof(x))((unsigned long)(x)+lguest_hv_offset)
+
+unsigned long lguest_hv_addr;
+unsigned long lguest_hv_offset;
+int lguest_hv_pages;
+
+int lguest_vcpu_pages;
+int lguest_vcpu_order;
+
+DEFINE_MUTEX(lguest_lock);
+
+int lguest_address_ok(const struct lguest_guest_info *linfo, u64 addr)
+{
+ return addr / PAGE_SIZE < linfo->pfn_limit;
+}
+
+u8 lhread_u8(struct lguest_vcpu *vcpu, u64 addr)
+{
+ u8 val = 0;
+
+ if (!lguest_address_ok(vcpu->guest, addr)
+ || get_user(val, (u8 __user *)addr) != 0)...
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