Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel

[PATCH 23/24] hvc_xen: allow dom0_write_console for HVM guests

 

 

Xen devel RSS feed   Index | Next | Previous | View Threaded


stefano.stabellini at eu

Jul 26, 2012, 8:34 AM

Post #1 of 3 (57 views)
Permalink
[PATCH 23/24] hvc_xen: allow dom0_write_console for HVM guests

On ARM all guests are HVM guests, including Dom0.
Allow dom0_write_console to be called by an HVM domain.

Signed-off-by: Stefano Stabellini <stefano.stabellini [at] eu>
---
drivers/tty/hvc/hvc_xen.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
index 3c04fb8..949edc2 100644
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -616,12 +616,9 @@ static void xenboot_write_console(struct console *console, const char *string,
unsigned int linelen, off = 0;
const char *pos;

- if (!xen_pv_domain())
- return;
-
dom0_write_console(0, string, len);

- if (xen_initial_domain())
+ if (!xen_pv_domain())
return;

domU_write_console(0, "(early) ", 8);
--
1.7.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


konrad.wilk at oracle

Aug 1, 2012, 7:54 AM

Post #2 of 3 (51 views)
Permalink
Re: [PATCH 23/24] hvc_xen: allow dom0_write_console for HVM guests [In reply to]

On Thu, Jul 26, 2012 at 04:34:05PM +0100, Stefano Stabellini wrote:
> On ARM all guests are HVM guests, including Dom0.
> Allow dom0_write_console to be called by an HVM domain.

Um, but xen_hvm_domain() != xen_pv_domain() so won't this return without
printing anything?

>
> Signed-off-by: Stefano Stabellini <stefano.stabellini [at] eu>
> ---
> drivers/tty/hvc/hvc_xen.c | 5 +----
> 1 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
> index 3c04fb8..949edc2 100644
> --- a/drivers/tty/hvc/hvc_xen.c
> +++ b/drivers/tty/hvc/hvc_xen.c
> @@ -616,12 +616,9 @@ static void xenboot_write_console(struct console *console, const char *string,
> unsigned int linelen, off = 0;
> const char *pos;
>
> - if (!xen_pv_domain())
> - return;
> -
> dom0_write_console(0, string, len);
>
> - if (xen_initial_domain())
> + if (!xen_pv_domain())
> return;
>
> domU_write_console(0, "(early) ", 8);
> --
> 1.7.2.5

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


stefano.stabellini at eu

Aug 1, 2012, 9:04 AM

Post #3 of 3 (52 views)
Permalink
Re: [PATCH 23/24] hvc_xen: allow dom0_write_console for HVM guests [In reply to]

On Wed, 1 Aug 2012, Konrad Rzeszutek Wilk wrote:
> On Thu, Jul 26, 2012 at 04:34:05PM +0100, Stefano Stabellini wrote:
> > On ARM all guests are HVM guests, including Dom0.
> > Allow dom0_write_console to be called by an HVM domain.
>
> Um, but xen_hvm_domain() != xen_pv_domain() so won't this return without
> printing anything?

Nope, it would call dom0_write_console that issues a console hypercall.
However I am going to remove this patch and rely on the simple serial
emulator we have in Xen for early_printk stuff

> >
> > Signed-off-by: Stefano Stabellini <stefano.stabellini [at] eu>
> > ---
> > drivers/tty/hvc/hvc_xen.c | 5 +----
> > 1 files changed, 1 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
> > index 3c04fb8..949edc2 100644
> > --- a/drivers/tty/hvc/hvc_xen.c
> > +++ b/drivers/tty/hvc/hvc_xen.c
> > @@ -616,12 +616,9 @@ static void xenboot_write_console(struct console *console, const char *string,
> > unsigned int linelen, off = 0;
> > const char *pos;
> >
> > - if (!xen_pv_domain())
> > - return;
> > -
> > dom0_write_console(0, string, len);
> >
> > - if (xen_initial_domain())
> > + if (!xen_pv_domain())
> > return;
> >
> > domU_write_console(0, "(early) ", 8);
> > --
> > 1.7.2.5
>

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

Xen devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.