search for: lhcall_get_wallclock

Displaying 18 results from an estimated 18 matches for "lhcall_get_wallclock".

2007 Jul 22
0
[PATCH] Fix lguest clock when jiffies not available
...diff -r 144835834edd drivers/lguest/hypercalls.c --- a/drivers/lguest/hypercalls.c Sat Jul 21 11:12:01 2007 +1000 +++ b/drivers/lguest/hypercalls.c Sun Jul 22 20:49:12 2007 +1000 @@ -44,12 +44,6 @@ static void do_hcall(struct lguest *lg, else guest_pagetable_flush_user(lg); break; - case LHCALL_GET_WALLCLOCK: { - struct timespec ts; - ktime_get_real_ts(&ts); - regs->eax = ts.tv_sec; - break; - } case LHCALL_BIND_DMA: regs->eax = bind_dma(lg, regs->edx, regs->ebx, regs->ecx >> 8, regs->ecx & 0xFF); @@ -160,6 +154,8 @@ static void initialize(struct lgues...
2007 Jul 22
0
[PATCH] Fix lguest clock when jiffies not available
...diff -r 144835834edd drivers/lguest/hypercalls.c --- a/drivers/lguest/hypercalls.c Sat Jul 21 11:12:01 2007 +1000 +++ b/drivers/lguest/hypercalls.c Sun Jul 22 20:49:12 2007 +1000 @@ -44,12 +44,6 @@ static void do_hcall(struct lguest *lg, else guest_pagetable_flush_user(lg); break; - case LHCALL_GET_WALLCLOCK: { - struct timespec ts; - ktime_get_real_ts(&ts); - regs->eax = ts.tv_sec; - break; - } case LHCALL_BIND_DMA: regs->eax = bind_dma(lg, regs->edx, regs->ebx, regs->ecx >> 8, regs->ecx & 0xFF); @@ -160,6 +154,8 @@ static void initialize(struct lgues...
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 Jul 03
2
[PATCH 1/2] lguest: handle dodgy/non-existent TSC. Host code.
Lguest currently requires a TSC, which breaks older machines and Matt Mackall who boots the host with "notsc". In addition, there is no good solution to changing TSC speeds (informing all the guests about the TSC impending change before it happens would be a great deal of code and have issues with disobedient guests). This patch makes the host determine if the TSC is both constant and
2007 Jul 03
2
[PATCH 1/2] lguest: handle dodgy/non-existent TSC. Host code.
Lguest currently requires a TSC, which breaks older machines and Matt Mackall who boots the host with "notsc". In addition, there is no good solution to changing TSC speeds (informing all the guests about the TSC impending change before it happens would be a great deal of code and have issues with disobedient guests). This patch makes the host determine if the TSC is both constant and
2007 May 09
1
[patch 2/9] lguest: the guest code
...XTERNAL_VECTOR + i; + if (vector != SYSCALL_VECTOR) { + set_intr_gate(vector, interrupt[i]); + set_irq_chip_and_handler(i, &lguest_irq_controller, + handle_level_irq); + } + } + irq_ctx_init(smp_processor_id()); +} + +static unsigned long lguest_get_wallclock(void) +{ + return hcall(LHCALL_GET_WALLCLOCK, 0, 0, 0); +} + +static void lguest_time_irq(unsigned int irq, struct irq_desc *desc) +{ + do_timer(hcall(LHCALL_TIMER_READ, 0, 0, 0)); + update_process_times(user_mode_vm(get_irq_regs())); +} + +static void lguest_time_init(void) +{ + set_irq_handler(0, lguest_time_irq); + hcall(LHCALL_TIMER_READ,...
2007 May 09
1
[patch 2/9] lguest: the guest code
...XTERNAL_VECTOR + i; + if (vector != SYSCALL_VECTOR) { + set_intr_gate(vector, interrupt[i]); + set_irq_chip_and_handler(i, &lguest_irq_controller, + handle_level_irq); + } + } + irq_ctx_init(smp_processor_id()); +} + +static unsigned long lguest_get_wallclock(void) +{ + return hcall(LHCALL_GET_WALLCLOCK, 0, 0, 0); +} + +static void lguest_time_irq(unsigned int irq, struct irq_desc *desc) +{ + do_timer(hcall(LHCALL_TIMER_READ, 0, 0, 0)); + update_process_times(user_mode_vm(get_irq_regs())); +} + +static void lguest_time_init(void) +{ + set_irq_handler(0, lguest_time_irq); + hcall(LHCALL_TIMER_READ,...
2007 Apr 18
1
[PATCH 0/8] lguest
As promised to Andrew, and with much thanks to Andi Kleen for feedback, this is the new series of lguest patches. Main change is the move to drivers/lguest (for future non-i386 expansion), but lots of cleanups driven by Andi's feedback and the documentation effort (which made me examine every line of code). It's not perfect, but it's definitely useful. Cheers, Rusty. List of
2007 Apr 18
1
[PATCH 0/8] lguest
As promised to Andrew, and with much thanks to Andi Kleen for feedback, this is the new series of lguest patches. Main change is the move to drivers/lguest (for future non-i386 expansion), but lots of cleanups driven by Andi's feedback and the documentation effort (which made me examine every line of code). It's not perfect, but it's definitely useful. Cheers, Rusty. List of
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...info->last_timer = now; + break; + } + case LHCALL_TIMER_START: + linfo->timer_on = 1; + if (regs->rdx != HZ) + kill_guest(linfo, "Bad clock speed %lli", regs->rdx); + linfo->last_timer = jiffies; + break; + case LHCALL_HALT: + linfo->halted = 1; + break; + case LHCALL_GET_WALLCLOCK: { + struct timeval tv; + do_gettimeofday(&tv); + regs->rax = tv.tv_sec; + break; + } + case LHCALL_BIND_DMA: + printk("Binding dma....\n"); + regs->rax = bind_dma(linfo, regs->rdx, regs->rbx, + regs->rcx >> 8, regs->rcx & 0xFF); + break; + c...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...info->last_timer = now; + break; + } + case LHCALL_TIMER_START: + linfo->timer_on = 1; + if (regs->rdx != HZ) + kill_guest(linfo, "Bad clock speed %lli", regs->rdx); + linfo->last_timer = jiffies; + break; + case LHCALL_HALT: + linfo->halted = 1; + break; + case LHCALL_GET_WALLCLOCK: { + struct timeval tv; + do_gettimeofday(&tv); + regs->rax = tv.tv_sec; + break; + } + case LHCALL_BIND_DMA: + printk("Binding dma....\n"); + regs->rax = bind_dma(linfo, regs->rdx, regs->rbx, + regs->rcx >> 8, regs->rcx & 0xFF); + break; + c...
2007 Jul 20
2
[PATCH 1/7] lguest: documentation pt I: Preparation
The netfilter code had very good documentation: the Netfilter Hacking HOWTO. Noone ever read it. So this time I'm trying something different, using a bit of Knuthiness. Start with drivers/lguest/README. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- Documentation/lguest/extract | 58 +++++++++++++++++++++++++++++++++ Documentation/lguest/lguest.c | 9
2007 Jul 20
2
[PATCH 1/7] lguest: documentation pt I: Preparation
The netfilter code had very good documentation: the Netfilter Hacking HOWTO. Noone ever read it. So this time I'm trying something different, using a bit of Knuthiness. Start with drivers/lguest/README. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- Documentation/lguest/extract | 58 +++++++++++++++++++++++++++++++++ Documentation/lguest/lguest.c | 9
2007 Jun 07
2
[PATCH 1/7] lguest documentation: infrastructure and Chapter I
The netfilter code had very good documentation: the Netfilter Hacking HOWTO. Noone ever read it. So this time I'm trying something different, using a bit of Knuthiness. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- Documentation/lguest/extract | 58 +++++++++++++++++++++++++++++++++ Documentation/lguest/lguest.c | 9 +++-- drivers/lguest/Makefile
2007 Jun 07
2
[PATCH 1/7] lguest documentation: infrastructure and Chapter I
The netfilter code had very good documentation: the Netfilter Hacking HOWTO. Noone ever read it. So this time I'm trying something different, using a bit of Knuthiness. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- Documentation/lguest/extract | 58 +++++++++++++++++++++++++++++++++ Documentation/lguest/lguest.c | 9 +++-- drivers/lguest/Makefile
2007 May 09
1
[patch 3/9] lguest: the host code
...+ break; + } + case LHCALL_FLUSH_TLB: + if (regs->edx) + guest_pagetable_clear_all(lg); + else + guest_pagetable_flush_user(lg); + break; + case LHCALL_TIMER_READ: { + u32 now = jiffies; + mb(); + regs->eax = now - lg->last_timer; + lg->last_timer = now; + break; + } + case LHCALL_GET_WALLCLOCK: { + struct timespec ts; + ktime_get_real_ts(&ts); + regs->eax = ts.tv_sec; + break; + } + case LHCALL_BIND_DMA: + regs->eax = bind_dma(lg, regs->edx, regs->ebx, + regs->ecx >> 8, regs->ecx & 0xFF); + break; + case LHCALL_SEND_DMA: + send_dma(lg, regs-...
2007 May 09
1
[patch 3/9] lguest: the host code
...+ break; + } + case LHCALL_FLUSH_TLB: + if (regs->edx) + guest_pagetable_clear_all(lg); + else + guest_pagetable_flush_user(lg); + break; + case LHCALL_TIMER_READ: { + u32 now = jiffies; + mb(); + regs->eax = now - lg->last_timer; + lg->last_timer = now; + break; + } + case LHCALL_GET_WALLCLOCK: { + struct timespec ts; + ktime_get_real_ts(&ts); + regs->eax = ts.tv_sec; + break; + } + case LHCALL_BIND_DMA: + regs->eax = bind_dma(lg, regs->edx, regs->ebx, + regs->ecx >> 8, regs->ecx & 0xFF); + break; + case LHCALL_SEND_DMA: + send_dma(lg, regs-...