[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH 1/1] plat/xen: Add flush for xen console
Signed-off-by: Birlea Costin <costin.birlea@xxxxxxxxx> --- plat/xen/console.c | 14 ++++++++++++++ plat/xen/include/common/console.h | 3 +++ plat/xen/shutdown.c | 3 +++ 3 files changed, 20 insertions(+) diff --git a/plat/xen/console.c b/plat/xen/console.c index c0b35c7..3df06d4 100644 --- a/plat/xen/console.c +++ b/plat/xen/console.c @@ -203,6 +203,20 @@ static void hvconsole_input(evtchn_port_t port __unused, /* NOT IMPLEMENTED YET */ } +void hvconsole_flush() +{ + struct xencons_interface *intf; + + if (!console_ready) + return; + + intf = console_ring; + if (unlikely(!intf)) + return ; + + while (intf->out_cons < intf->out_prod) + ; +} void _libxenplat_init_console(void) { diff --git a/plat/xen/include/common/console.h b/plat/xen/include/common/console.h index c51c69b..b4f1b51 100644 --- a/plat/xen/include/common/console.h +++ b/plat/xen/include/common/console.h @@ -45,4 +45,7 @@ void _libxenplat_prepare_console(void); */ void _libxenplat_init_console(void); + +void hvconsole_flush(void); + #endif /* __CONSOLE_H__ */ diff --git a/plat/xen/shutdown.c b/plat/xen/shutdown.c index e1758ff..272ece4 100644 --- a/plat/xen/shutdown.c +++ b/plat/xen/shutdown.c @@ -40,6 +40,7 @@ #include <errno.h> #include <xen/xen.h> +#include <common/console.h> #if defined __X86_32__ #include <xen-x86/hypercall32.h> @@ -65,6 +66,8 @@ void ukplat_terminate(enum ukplat_gstate request) break; } + hvconsole_flush(); + for (;;) { struct sched_shutdown sched_shutdown = { .reason = reason }; -- 2.11.0 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |