[RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks

2008-06-03 Thread Christian Borntraeger
This patch tries to change hvc_console to not use request_irq/free_irq if the backend does not use irqs. This allows virtio_console to use hvc_console without having a linker reference to request_irq/free_irq. The irq specific code is moved to hvc_irq.c and selected by the drivers that use irqs

[RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks (not word wrapped)

2008-06-03 Thread Christian Borntraeger
This patch tries to change hvc_console to not use request_irq/free_irq if the backend does not use irqs. This allows virtio_console to use hvc_console without having a linker reference to request_irq/free_irq. The irq specific code is moved to hvc_irq.c and selected by the drivers that use irqs

[RFC 2/3] virtio_console: use virtqueue notification for hvc_console

2008-06-03 Thread Christian Borntraeger
This patch exploits the new notifier callbacks of the hvc_console. We can use the virtio callbacks instead of the polling code. I also added a small Kconfig change that allows the user to specify the virtio console in menuconfig. Signed-off-by: Christian Borntraeger [EMAIL PROTECTED] ---

[PATCH 1/5] Add structs and functions for paravirt clocksource.

2008-06-03 Thread Gerd Hoffmann
This patch adds structs for the paravirt clocksource ABI used by both xen and kvm (pvclock-abi.h). It also adds some helper functions to read system time and wall clock time from a paravirtual clocksource (pvclock.[ch]). They are based on the xen code. They are enabled using

[PATCH 2/5] Make xen use the paravirt clocksource structs and functions.

2008-06-03 Thread Gerd Hoffmann
This patch updates the xen guest to use the pvclock structs and helper functions. Signed-off-by: Gerd Hoffmann [EMAIL PROTECTED] --- arch/x86/xen/Kconfig|1 + arch/x86/xen/time.c | 130 --- include/xen/interface/xen.h |5 +- 3

[PATCH 4/5] Make kvm guest use the paravirt clocksource structs and functions.

2008-06-03 Thread Gerd Hoffmann
This patch updates the kvm host code to use the pvclock structs and functions, thereby making it compatible with Xen. The patch also fixes an initialization bug: on SMP systems the per-cpu has two different locations early at boot and after CPU bringup. kvmclock must take that in account when

[PATCH 5/5] Remove now unused structs from kvm_para.h

2008-06-03 Thread Gerd Hoffmann
The kvm_* structs are obsoleted by the pvclock_* ones. Now all users have been switched over and the old structs can be dropped. Signed-off-by: Gerd Hoffmann [EMAIL PROTECTED] --- include/asm-x86/kvm_para.h | 18 -- 1 files changed, 0 insertions(+), 18 deletions(-) diff --git

Re: [PATCH 5/5] Remove now unused structs from kvm_para.h

2008-06-03 Thread David Miller
You sent these patches to kvm-owner, ie. the mailing list owner, and not the list itself which would be plain kvm. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

[PATCH 0/5] paravirt clock source patches, #4

2008-06-03 Thread Gerd Hoffmann
paravirt clock source patches, next round. There is now a pvclock-abi.h file with the structs and some longish comments in it and everybody is switched over to use the stuff in there. cheers, Gerd ___ Virtualization mailing list

[PATCH 3/5] Make kvm host use the paravirt clocksource structs.

2008-06-03 Thread Gerd Hoffmann
This patch updates the kvm host code to use the pvclock structs. It also makes the paravirt clock compatible with Xen. Signed-off-by: Gerd Hoffmann [EMAIL PROTECTED] --- arch/x86/kvm/x86.c | 75 --- include/asm-x86/kvm_host.h |4 ++- 2 files

Re: [PATCH 0/5] paravirt clock source patches, #4

2008-06-03 Thread Jeremy Fitzhardinge
Gerd Hoffmann wrote: paravirt clock source patches, next round. There is now a pvclock-abi.h file with the structs and some longish comments in it and everybody is switched over to use the stuff in there. This all looks pretty good. How do you want this to get into the kernel? J

Re: [PATCH 0/5] paravirt clock source patches, #4

2008-06-03 Thread Gerd Hoffmann
Jeremy Fitzhardinge wrote: Gerd Hoffmann wrote: paravirt clock source patches, next round. There is now a pvclock-abi.h file with the structs and some longish comments in it and everybody is switched over to use the stuff in there. This all looks pretty good. How do you want this to get

Re: [PATCH 1/5] Add structs and functions for paravirt clocksource.

2008-06-03 Thread Jeremy Fitzhardinge
Gerd Hoffmann wrote: +/* + * These structs MUST NOT be changed. + * They are the ABI between hypervisor and guest OS. + * Both Xen and KVM are using this. + * + * pvclock_vcpu_time_info holds the system time and the tsc timestamp + * of the last update. So the guest can use the tsc delta to

Re: [PATCH 2/5] Make xen use the paravirt clocksource structs and functions.

2008-06-03 Thread Jeremy Fitzhardinge
Gerd Hoffmann wrote: This patch updates the xen guest to use the pvclock structs and helper functions. Signed-off-by: Gerd Hoffmann [EMAIL PROTECTED] --- arch/x86/xen/Kconfig|1 + arch/x86/xen/time.c | 130 ---

Re: [PATCH 0/5] paravirt clock source patches, #4

2008-06-03 Thread Gerd Hoffmann
Jeremy Fitzhardinge wrote: Gerd Hoffmann wrote: paravirt clock source patches, next round. There is now a pvclock-abi.h file with the structs and some longish comments in it and everybody is switched over to use the stuff in there. This all looks pretty good. How do you want this to get

[PATCH 3/5] Make kvm host use the paravirt clocksource structs.

2008-06-03 Thread Gerd Hoffmann
This patch updates the kvm host code to use the pvclock structs. It also makes the paravirt clock compatible with Xen. Signed-off-by: Gerd Hoffmann [EMAIL PROTECTED] --- arch/x86/kvm/x86.c | 75 --- include/asm-x86/kvm_host.h |4 ++- 2 files

[PATCH 5/5] Remove now unused structs from kvm_para.h

2008-06-03 Thread Gerd Hoffmann
The kvm_* structs are obsoleted by the pvclock_* ones. Now all users have been switched over and the old structs can be dropped. Signed-off-by: Gerd Hoffmann [EMAIL PROTECTED] --- include/asm-x86/kvm_para.h | 18 -- 1 files changed, 0 insertions(+), 18 deletions(-) diff --git

[PATCH 2/5] Make xen use the paravirt clocksource structs and functions.

2008-06-03 Thread Gerd Hoffmann
This patch updates the xen guest to use the pvclock structs and helper functions. Signed-off-by: Gerd Hoffmann [EMAIL PROTECTED] --- arch/x86/xen/Kconfig|1 + arch/x86/xen/time.c | 132 --- include/xen/interface/xen.h |7 +- 3

[PATCH 0/5] paravirt clock source patches, #5

2008-06-03 Thread Gerd Hoffmann
paravirt clock source patches, next round. There is now a pvclock-abi.h file with the structs and some longish comments in it and everybody is switched over to use the stuff in there. Some minor tweaks after super-fast review by Jeremy. The queue is on top of the kvm git tree. The first two

[PATCH 1/5] Add structs and functions for paravirt clocksource.

2008-06-03 Thread Gerd Hoffmann
This patch adds structs for the paravirt clocksource ABI used by both xen and kvm (pvclock-abi.h). It also adds some helper functions to read system time and wall clock time from a paravirtual clocksource (pvclock.[ch]). They are based on the xen code. They are enabled using

[PATCH 4/5] Make kvm guest use the paravirt clocksource structs and functions.

2008-06-03 Thread Gerd Hoffmann
This patch updates the kvm host code to use the pvclock structs and functions, thereby making it compatible with Xen. The patch also fixes an initialization bug: on SMP systems the per-cpu has two different locations early at boot and after CPU bringup. kvmclock must take that in account when

Re: [RFC 2/3] virtio_console: use virtqueue notification for hvc_console

2008-06-03 Thread Arnd Bergmann
On Tuesday 03 June 2008, Christian Borntraeger wrote: +/* The hvc device */ +struct hvc_struct *hvc; + I guess this should be static, a three letter identifier for a global variable is not really unique. Arnd ___ Virtualization mailing

Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks (not word wrapped)

2008-06-03 Thread Arnd Bergmann
On Tuesday 03 June 2008, Christian Borntraeger wrote: @@ -42,22 +42,48 @@ */ #define HVC_ALLOC_TTY_ADAPTERS 8 +struct hvc_struct { + spinlock_t lock; + int index; + struct tty_struct *tty; + unsigned int count; + int do_wakeup; + char *outbuf; +

Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks

2008-06-03 Thread Rusty Russell
On Tuesday 03 June 2008 22:45:22 Christian Borntraeger wrote: This patch tries to change hvc_console to not use request_irq/free_irq if the backend does not use irqs. This allows virtio_console to use hvc_console without having a linker reference to request_irq/free_irq. Two questions. Is it