search for: cons_offset

Displaying 6 results from an estimated 6 matches for "cons_offset".

2007 May 09
0
[patch 6/9] lguest: the console driver
...st_dma dma; + + /* FIXME: what if it's over a page boundary? */ + dma.len[0] = count; + dma.len[1] = 0; + dma.addr[0] = __pa(buf); + + hcall(LHCALL_SEND_DMA, LGUEST_CONSOLE_DMA_KEY, __pa(&dma), 0); + return count; +} + +static int get_chars(u32 vtermno, char *buf, int count) +{ + static int cons_offset; + + if (!cons_input.used_len) + return 0; + + if (cons_input.used_len - cons_offset < count) + count = cons_input.used_len - cons_offset; + + memcpy(buf, inbuf + cons_offset, count); + cons_offset += count; + if (cons_offset == cons_input.used_len) { + cons_offset = 0; + cons_input.used_len...
2007 May 09
0
[patch 6/9] lguest: the console driver
...st_dma dma; + + /* FIXME: what if it's over a page boundary? */ + dma.len[0] = count; + dma.len[1] = 0; + dma.addr[0] = __pa(buf); + + hcall(LHCALL_SEND_DMA, LGUEST_CONSOLE_DMA_KEY, __pa(&dma), 0); + return count; +} + +static int get_chars(u32 vtermno, char *buf, int count) +{ + static int cons_offset; + + if (!cons_input.used_len) + return 0; + + if (cons_input.used_len - cons_offset < count) + count = cons_input.used_len - cons_offset; + + memcpy(buf, inbuf + cons_offset, count); + cons_offset += count; + if (cons_offset == cons_input.used_len) { + cons_offset = 0; + cons_input.used_len...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 11/13] x86_64 HVC attempt.
...+= hvc_rtas.o obj-$(CONFIG_HVC_DRIVER) += hvc_console.o Index: work-pv/drivers/char/hvc_lguest.c =================================================================== --- work-pv.orig/drivers/char/hvc_lguest.c +++ work-pv/drivers/char/hvc_lguest.c @@ -25,7 +25,6 @@ static int cons_irq; static int cons_offset; static char inbuf[256]; static struct lguest_dma cons_input = { .used_len = 0, - .addr[0] = __pa(inbuf), .len[0] = sizeof(inbuf), .len[1] = 0 }; @@ -66,6 +65,12 @@ struct hv_ops lguest_cons = { static int __init cons_init(void) { + /* + * Can't initialize this in the c...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 11/13] x86_64 HVC attempt.
...+= hvc_rtas.o obj-$(CONFIG_HVC_DRIVER) += hvc_console.o Index: work-pv/drivers/char/hvc_lguest.c =================================================================== --- work-pv.orig/drivers/char/hvc_lguest.c +++ work-pv/drivers/char/hvc_lguest.c @@ -25,7 +25,6 @@ static int cons_irq; static int cons_offset; static char inbuf[256]; static struct lguest_dma cons_input = { .used_len = 0, - .addr[0] = __pa(inbuf), .len[0] = sizeof(inbuf), .len[1] = 0 }; @@ -66,6 +65,12 @@ struct hv_ops lguest_cons = { static int __init cons_init(void) { + /* + * Can't initialize this in the 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
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