Displaying 20 results from an estimated 43 matches for "run_guest".
2007 May 10
4
[PATCH 0/5] lguest feedback tidyups
Hi all,
Gratefully-received recent feedback from CC'd was applied to excellent
effect (and the advice from Matt Mackall about my personal appearance is
best unrequited).
The patch is split in 5 parts to correspond with the 9 parts Andrew
sent out before, but here's the summary:
1) Sparse (thanks Christoph Hellwig):
- lguest_const can be static now
- lguest.c should include
2007 May 10
4
[PATCH 0/5] lguest feedback tidyups
Hi all,
Gratefully-received recent feedback from CC'd was applied to excellent
effect (and the advice from Matt Mackall about my personal appearance is
best unrequited).
The patch is split in 5 parts to correspond with the 9 parts Andrew
sent out before, but here's the summary:
1) Sparse (thanks Christoph Hellwig):
- lguest_const can be static now
- lguest.c should include
2007 May 14
5
[PATCH 1/6] lguest: host code tidyups
...t_address_ok(lg, addr, bytes)
|| copy_to_user((void __user *)addr, b, bytes) != 0)
- kill_guest(lg, "bad write address %u len %u", addr, bytes);
+ kill_guest(lg, "bad write address %#lx len %u", addr, bytes);
}
static void set_ts(void)
@@ -294,7 +295,7 @@ static void run_guest_once(struct lguest
: "memory", "%edx", "%ecx", "%edi", "%esi");
}
-int run_guest(struct lguest *lg, char *__user user)
+int run_guest(struct lguest *lg, unsigned long __user *user)
{
while (!lg->dead) {
unsigned int cr2 = 0; /* D...
2007 May 14
5
[PATCH 1/6] lguest: host code tidyups
...t_address_ok(lg, addr, bytes)
|| copy_to_user((void __user *)addr, b, bytes) != 0)
- kill_guest(lg, "bad write address %u len %u", addr, bytes);
+ kill_guest(lg, "bad write address %#lx len %u", addr, bytes);
}
static void set_ts(void)
@@ -294,7 +295,7 @@ static void run_guest_once(struct lguest
: "memory", "%edx", "%ecx", "%edi", "%esi");
}
-int run_guest(struct lguest *lg, char *__user user)
+int run_guest(struct lguest *lg, unsigned long __user *user)
{
while (!lg->dead) {
unsigned int cr2 = 0; /* D...
2007 Jul 12
1
[PATCH] lguest: disable SYSENTER for guests
...such a thing?)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
drivers/lguest/core.c | 7 +++++++
1 file changed, 7 insertions(+)
===================================================================
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -338,6 +338,10 @@ int run_guest(struct lguest *lg, unsigne
if (lg->ts)
set_ts();
+ /* Don't let Guest do SYSENTER: we can't handle it. */
+ if (boot_cpu_has(X86_FEATURE_SEP))
+ wrmsr(MSR_IA32_SYSENTER_CS, 0, 0);
+
run_guest_once(lg, lguest_pages(raw_smp_processor_id()));
/* Save cr2 now if we page-...
2007 Jul 12
1
[PATCH] lguest: disable SYSENTER for guests
...such a thing?)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
drivers/lguest/core.c | 7 +++++++
1 file changed, 7 insertions(+)
===================================================================
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -338,6 +338,10 @@ int run_guest(struct lguest *lg, unsigne
if (lg->ts)
set_ts();
+ /* Don't let Guest do SYSENTER: we can't handle it. */
+ if (boot_cpu_has(X86_FEATURE_SEP))
+ wrmsr(MSR_IA32_SYSENTER_CS, 0, 0);
+
run_guest_once(lg, lguest_pages(raw_smp_processor_id()));
/* Save cr2 now if we page-...
2007 May 04
1
[PATCH 1/3] Documentation and example updates
1) Example code: old libc headers don't have SIOCBRADDIF, and old zlibs
don't have gzdirect() -- it's a sanity check anyway.
2) Some people don't build in their source directories, so .config
isn't there (thanks to Tony Breeds <tony@bakeyournoodle.com>).
3) Point out that guest and host kernel are usually the same.
4) Set the "no checksum" option on the
2007 May 04
1
[PATCH 1/3] Documentation and example updates
1) Example code: old libc headers don't have SIOCBRADDIF, and old zlibs
don't have gzdirect() -- it's a sanity check anyway.
2) Some people don't build in their source directories, so .config
isn't there (thanks to Tony Breeds <tony@bakeyournoodle.com>).
3) Point out that guest and host kernel are usually the same.
4) Set the "no checksum" option on the
2007 Apr 30
0
[PATCH] lguest: properly kill guest userspace programs accessing kernel mem
...| 2 +-
drivers/lguest/lg.h | 2 +-
drivers/lguest/page_tables.c | 12 ++++++++----
3 files changed, 10 insertions(+), 6 deletions(-)
===================================================================
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -346,7 +346,7 @@ int run_guest(struct lguest *lg, char *_
}
break;
case 14: /* We've intercepted a page fault. */
- if (demand_page(lg, cr2, lg->regs->errcode & 2))
+ if (demand_page(lg, cr2, lg->regs->errcode))
continue;
/* If lguest_data is NULL, this won't hurt. */
===========...
2007 Apr 30
0
[PATCH] lguest: properly kill guest userspace programs accessing kernel mem
...| 2 +-
drivers/lguest/lg.h | 2 +-
drivers/lguest/page_tables.c | 12 ++++++++----
3 files changed, 10 insertions(+), 6 deletions(-)
===================================================================
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -346,7 +346,7 @@ int run_guest(struct lguest *lg, char *_
}
break;
case 14: /* We've intercepted a page fault. */
- if (demand_page(lg, cr2, lg->regs->errcode & 2))
+ if (demand_page(lg, cr2, lg->regs->errcode))
continue;
/* If lguest_data is NULL, this won't hurt. */
===========...
2007 Jul 20
2
[PATCH] Remove -static from Documentation/lguest/Makefile
...i->desc->type == LGUEST_DEVICE_T_CONSOLE ? "console"
- : i->desc->type == LGUEST_DEVICE_T_BLOCK ? "block"
- : "unknown");
- descs[num] = *i->desc;
- free(i->desc);
- i->desc = &descs[num];
- }
-}
-
static void __attribute__((noreturn))
run_guest(int lguest_fd, struct device_list *device_list)
{
@@ -934,8 +913,8 @@ static void usage(void)
int main(int argc, char *argv[])
{
- unsigned long mem, pgdir, start, page_offset, initrd_size = 0;
- int c, lguest_fd;
+ unsigned long mem = 0, pgdir, start, page_offset, initrd_size = 0;
+ int i, c,...
2007 Jul 20
2
[PATCH] Remove -static from Documentation/lguest/Makefile
...i->desc->type == LGUEST_DEVICE_T_CONSOLE ? "console"
- : i->desc->type == LGUEST_DEVICE_T_BLOCK ? "block"
- : "unknown");
- descs[num] = *i->desc;
- free(i->desc);
- i->desc = &descs[num];
- }
-}
-
static void __attribute__((noreturn))
run_guest(int lguest_fd, struct device_list *device_list)
{
@@ -934,8 +913,8 @@ static void usage(void)
int main(int argc, char *argv[])
{
- unsigned long mem, pgdir, start, page_offset, initrd_size = 0;
- int c, lguest_fd;
+ unsigned long mem = 0, pgdir, start, page_offset, initrd_size = 0;
+ int i, c,...
2007 Jul 03
2
[PATCH 1/2] lguest: handle dodgy/non-existent TSC. Host code.
...+int check_tsc_unstable(void)
{
return tsc_unstable;
}
+EXPORT_SYMBOL_GPL(check_tsc_unstable);
unsigned long native_calculate_cpu_khz(void)
{
===================================================================
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -332,14 +332,6 @@ int run_guest(struct lguest *lg, unsigne
continue;
}
- /* If the Guest hasn't been told the clock multiplier to use or
- * it's changed, we update it here. */
- if (unlikely(lg->tsc_khz != tsc_khz) && lg->lguest_data) {
- lg->tsc_khz = tsc_khz;
- if (put_user(lg->tsc_...
2007 Jul 03
2
[PATCH 1/2] lguest: handle dodgy/non-existent TSC. Host code.
...+int check_tsc_unstable(void)
{
return tsc_unstable;
}
+EXPORT_SYMBOL_GPL(check_tsc_unstable);
unsigned long native_calculate_cpu_khz(void)
{
===================================================================
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -332,14 +332,6 @@ int run_guest(struct lguest *lg, unsigne
continue;
}
- /* If the Guest hasn't been told the clock multiplier to use or
- * it's changed, we update it here. */
- if (unlikely(lg->tsc_khz != tsc_khz) && lg->lguest_data) {
- lg->tsc_khz = tsc_khz;
- if (put_user(lg->tsc_...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 2/13] [Mostly resend] virtio additions
..._fd);
+
+ verbose("device %u: rng\n", devices.device_num);
+}
+/* That's the end of device setup. */
+
/*L:220 Finally we reach the core of the Launcher, which runs the
Guest, serves
* its input and output, and finally, lays it to rest. */
static void __attribute__((noreturn)) run_guest(int lguest_fd)
@@ -1581,6 +1630,7 @@ static struct option opts[] = {
{ "verbose", 0, NULL, 'v' },
{ "tunnet", 1, NULL, 't' },
{ "block", 1, NULL, 'b' },
+ { "rng", 0, NULL, 'r' },
{ "initrd", 1,...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 2/13] [Mostly resend] virtio additions
..._fd);
+
+ verbose("device %u: rng\n", devices.device_num);
+}
+/* That's the end of device setup. */
+
/*L:220 Finally we reach the core of the Launcher, which runs the
Guest, serves
* its input and output, and finally, lays it to rest. */
static void __attribute__((noreturn)) run_guest(int lguest_fd)
@@ -1581,6 +1630,7 @@ static struct option opts[] = {
{ "verbose", 0, NULL, 'v' },
{ "tunnet", 1, NULL, 't' },
{ "block", 1, NULL, 'b' },
+ { "rng", 0, NULL, 'r' },
{ "initrd", 1,...
2012 Apr 10
7
[PATCH v3 1/2] xen: enter/exit lazy_mmu_mode around m2p_override calls
This patch is a significant performance improvement for the
m2p_override: about 6% using the gntdev device.
Each m2p_add/remove_override call issues a MULTI_grant_table_op and a
__flush_tlb_single if kmap_op != NULL. Batching all the calls together
is a great performance benefit because it means issuing one hypercall
total rather than two hypercall per page.
If paravirt_lazy_mode is set
2016 Jan 21
1
[PATCH] tools/virtio: add ringtest utilities
...urn;
+
+ cpu = strtol(arg, &endptr, 0);
+ assert(!*endptr);
+
+ assert(cpu >= 0 || cpu < CPU_SETSIZE);
+
+ self = pthread_self();
+ CPU_ZERO(&cpuset);
+ CPU_SET(cpu, &cpuset);
+
+ ret = pthread_setaffinity_np(self, sizeof(cpu_set_t), &cpuset);
+ assert(!ret);
+}
+
+static void run_guest(void)
+{
+ int completed_before;
+ int completed = 0;
+ int started = 0;
+ int bufs = runcycles;
+ int spurious = 0;
+ int r;
+ unsigned len;
+ void *buf;
+ int tokick = batch;
+
+ for (;;) {
+ if (do_sleep)
+ disable_call();
+ completed_before = completed;
+ do {
+ if (started < bufs &am...
2016 Jan 21
1
[PATCH] tools/virtio: add ringtest utilities
...urn;
+
+ cpu = strtol(arg, &endptr, 0);
+ assert(!*endptr);
+
+ assert(cpu >= 0 || cpu < CPU_SETSIZE);
+
+ self = pthread_self();
+ CPU_ZERO(&cpuset);
+ CPU_SET(cpu, &cpuset);
+
+ ret = pthread_setaffinity_np(self, sizeof(cpu_set_t), &cpuset);
+ assert(!ret);
+}
+
+static void run_guest(void)
+{
+ int completed_before;
+ int completed = 0;
+ int started = 0;
+ int bufs = runcycles;
+ int spurious = 0;
+ int r;
+ unsigned len;
+ void *buf;
+ int tokick = batch;
+
+ for (;;) {
+ if (do_sleep)
+ disable_call();
+ completed_before = completed;
+ do {
+ if (started < bufs &am...
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