[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 05/22] char: optionally redirect {, g}printk output to QEMU debug log



On Sat, Jan 6, 2018 at 2:54 PM, Anthony Liguori <aliguori@xxxxxxxx> wrote:
> From: Matt Wilson <msw@xxxxxxxxxx>
>
> When using Vixen, it is helpful to get the Xen messages in a
> separate channel than the console output.  Add an option to
> output to the QEMU backdoor logging port.
>
> Signed-off-by: Matt Wilson <msw@xxxxxxxxxx>
> Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>
> ---
>  xen/drivers/char/console.c | 24 +++++++++++++++++++++---
>  1 file changed, 21 insertions(+), 3 deletions(-)
>
> diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
> index 19d0e74..b9412c5 100644
> --- a/xen/drivers/char/console.c
> +++ b/xen/drivers/char/console.c
> @@ -85,6 +85,11 @@ static int __read_mostly sercon_handle = -1;
>
>  static DEFINE_SPINLOCK(console_lock);
>
> +/* send all printk output to QEMU debug log. Input does not change,
> + * nor does dom0 output.
> + */
> +static bool_t __read_mostly qemu_debug = false;
> +
>  /*
>   * To control the amount of printing, thresholds are added.
>   * These thresholds correspond to the XENLOG logging levels.
> @@ -564,10 +569,21 @@ static void __putstr(const char *str)
>  {
>      ASSERT(spin_is_locked(&console_lock));
>
> -    sercon_puts(str);
> -    video_puts(str);
> +    if ( qemu_debug )
> +    {
> +        char c;
> +        while ( (c = *str++) != '\0' )
> +        {
> +            outb(c, 0x12);
> +        }

Yeah, this has no hope of working on ARM Matt.  Shame on you ;-P

Regards,

Anthony Liguori

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.