use hvc for xen console
Subsystems (3)
Hi,
Here is a patch (on top of the paravirt patch queue) which makes xen guests use the hvc_console.c infrastructure for the console, thereby greatly reducing the amount console code. xvc0 is gone too, hvc0 is used instead.
cheers,
Gerd
Signature · 1 line
Gerd Hoffmann <[email protected]>
Quoted 3 lines · Gerd Hoffmann
Hi,
Here is a patch (on top of the paravirt patch queue) which makes xen
Oops, forgot the patch here is it ...
--- arch/i386/Kconfig.debug | 24 ++++---- arch/i386/xen/Kconfig | 1 drivers/char/hvc_console.c | 4 + drivers/xen/console/Makefile | 3 - drivers/xen/console/hvc_xen.c | 124 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 143 insertions(+), 13 deletions(-)
arch/i386/Kconfig.debug +12 -12
@@ -6,18 +6,18 @@ config TRACE_IRQFLAGS_SUPPORT source "lib/Kconfig.debug" -config EARLY_PRINTK - bool "Early printk" if EMBEDDED && DEBUG_KERNEL - default y - help - Write kernel log output directly into the VGA buffer or to a serial - port. - - This is useful for kernel debugging when your machine crashes very - early before the console code is initialized. For normal operation - it is not recommended because it looks ugly and doesn't cooperate - with klogd/syslogd or the X server. You should normally N here, - unless you want to debug such a crash. +#config EARLY_PRINTK +# bool "Early printk" if EMBEDDED && DEBUG_KERNEL +# default y +# help +# Write kernel log output directly into the VGA buffer or to a serial +# port. +# +# This is useful for kernel debugging when your machine crashes very +# early before the console code is initialized. For normal operation +# it is not recommended because it looks ugly and doesn't cooperate +# with klogd/syslogd or the X server. You should normally N here, +# unless you want to debug such a crash. config DEBUG_STACKOVERFLOW bool "Check for stack overflows"
arch/i386/xen/Kconfig +1 -0
@@ -5,6 +5,7 @@ config XEN bool "Enable support for Xen hypervisor" depends PARAVIRT + select HVC_DRIVER default y help This is the Linux Xen port.
drivers/char/hvc_console.c +4 -0
@@ -49,6 +49,10 @@#define TIMEOUT (10) +#ifndef NO_IRQ +#define NO_IRQ 0 +#endif +/* * Wait this long per iteration while trying to push buffered data to the * hypervisor before allowing the tty to complete a close operation.
drivers/xen/console/Makefile +2 -1
@@ -1,2 +1,3 @@ -obj-y := console.o xencons_ring.o +#obj-y := console.o xencons_ring.o +obj-y := hvc_xen.o xencons_ring.o
drivers/xen/console/hvc_xen.c new file +124 -0
124 lines not on this page · raw message
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/virtualization
Quoted 6 lines · Gerd Hoffmann
Quoted 3 lines · Gerd Hoffmann
Hi,
Here is a patch (on top of the paravirt patch queue) which makes xen
Oops, forgot the patch here is it ...
New version of the patch, drops the dependency on xencons_ring.c, drops a bunch of glue code, features a irq-driven console.
cheers,
Gerd
Signature · 1 line
Gerd Hoffmann <[email protected]>
--- arch/i386/Kconfig.debug | 24 +++---- arch/i386/xen/Kconfig | 1 arch/i386/xen/events.c | 3 drivers/char/hvc_console.c | 4 + drivers/xen/console/Makefile | 3 drivers/xen/console/hvc_xen.c | 135 ++++++++++++++++++++++++++++++++++++++++++ include/xen/events.h | 1 7 files changed, 157 insertions(+), 14 deletions(-)
arch/i386/Kconfig.debug +12 -12
@@ -6,18 +6,18 @@ config TRACE_IRQFLAGS_SUPPORT source "lib/Kconfig.debug" -config EARLY_PRINTK - bool "Early printk" if EMBEDDED && DEBUG_KERNEL - default y - help - Write kernel log output directly into the VGA buffer or to a serial - port. - - This is useful for kernel debugging when your machine crashes very - early before the console code is initialized. For normal operation - it is not recommended because it looks ugly and doesn't cooperate - with klogd/syslogd or the X server. You should normally N here, - unless you want to debug such a crash. +#config EARLY_PRINTK +# bool "Early printk" if EMBEDDED && DEBUG_KERNEL +# default y +# help +# Write kernel log output directly into the VGA buffer or to a serial +# port. +# +# This is useful for kernel debugging when your machine crashes very +# early before the console code is initialized. For normal operation +# it is not recommended because it looks ugly and doesn't cooperate +# with klogd/syslogd or the X server. You should normally N here, +# unless you want to debug such a crash. config DEBUG_STACKOVERFLOW bool "Check for stack overflows"
arch/i386/xen/Kconfig +1 -0
@@ -5,6 +5,7 @@ config XEN bool "Enable support for Xen hypervisor" depends PARAVIRT + select HVC_DRIVER default y help This is the Linux Xen port.
drivers/char/hvc_console.c +4 -0
@@ -49,6 +49,10 @@#define TIMEOUT (10) +#ifndef NO_IRQ +#define NO_IRQ 0 +#endif +/* * Wait this long per iteration while trying to push buffered data to the * hypervisor before allowing the tty to complete a close operation.
drivers/xen/console/Makefile +2 -1
@@ -1,2 +1,3 @@ -obj-y := console.o xencons_ring.o +#obj-y := console.o xencons_ring.o +obj-y := hvc_xen.o
drivers/xen/console/hvc_xen.c new file +135 -0
135 lines not on this page · raw message
arch/i386/xen/events.c +2 -1
@@ -202,7 +202,7 @@ static int find_unbound_irq(void)return irq; } -static int bind_evtchn_to_irq (unsigned int evtchn) +int bind_evtchn_to_irq (unsigned int evtchn) {int irq;
@@ -226,6 +226,7 @@ static int bind_evtchn_to_irq(unsigned ireturn irq; } +EXPORT_SYMBOL_GPL (bind_evtchn_to_irq);static int bind_virq_to_irq (unsigned int virq,unsigned int cpu) {
include/xen/events.h +1 -0
@@ -5,6 +5,7 @@#include <xen/interface/event_channel.h> #include <asm/hypercall.h> +int bind_evtchn_to_irq (unsigned int evtchn); int bind_evtchn_to_irqhandler(unsigned int evtchn, irqreturn_t (*handler)(int, void *), unsigned long irqflags, const char *devname,
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/virtualization