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 i

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 *outbu

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 mai

[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 fil

[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 CONFIG_PARAVIRT_CLOCK

[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 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 reg

[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 pat

[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 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

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

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 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 > --- > inclu

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 de

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 https://lists.linux-foundation.org/mailman/listinfo/virtuali

[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 fil

[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 CONFIG_PARAVIRT_CLOCK

[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 reg

[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 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 Virtualization@lists.

[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

[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]> --- d

[RFC 3/3] s390: use virtio_console for KVM on s390

2008-06-03 Thread Christian Borntraeger
This patch enables virtio_console as the default console on kvm for s390. We currently use the same notify hack as lguest for early console output. I will try to address this for lguest and s390 later. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> --- arch/s390/Kconfig |

[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 (S

[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 (S

[RFC 0/3]: hvc_console rework for platform without hard irqs

2008-06-03 Thread Christian Borntraeger
This patch set if my first attempt to make virtio_console usable on s390. To do so, I had to change hvc_console, because s390 has no request_irq and no free_irq. I want to get feedback from the main users of hvc_console before I proceed. The basic idea of this patch set is to remove the calls to r