Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-28 Thread Konrad Rzeszutek Wilk
On Sat, Oct 26, 2013 at 09:27:08AM +0100, Ian Campbell wrote: > On Fri, 2013-10-25 at 15:38 -0400, Konrad Rzeszutek Wilk wrote: > > On Thu, Oct 24, 2013 at 05:43:54PM +0100, Ian Campbell wrote: > > > But stepping back how/why is this function called on x86 when not > > > running under Xen?

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-28 Thread Konrad Rzeszutek Wilk
On Sat, Oct 26, 2013 at 09:27:08AM +0100, Ian Campbell wrote: On Fri, 2013-10-25 at 15:38 -0400, Konrad Rzeszutek Wilk wrote: On Thu, Oct 24, 2013 at 05:43:54PM +0100, Ian Campbell wrote: But stepping back how/why is this function called on x86 when not running under Xen? Wouldn't the use

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-26 Thread Ian Campbell
On Fri, 2013-10-25 at 15:38 -0400, Konrad Rzeszutek Wilk wrote: > On Thu, Oct 24, 2013 at 05:43:54PM +0100, Ian Campbell wrote: > > But stepping back how/why is this function called on x86 when not > > running under Xen? Wouldn't the use have to be using console=hvc or > > earlyprintk=xen or

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-26 Thread Ian Campbell
On Fri, 2013-10-25 at 15:38 -0400, Konrad Rzeszutek Wilk wrote: On Thu, Oct 24, 2013 at 05:43:54PM +0100, Ian Campbell wrote: But stepping back how/why is this function called on x86 when not running under Xen? Wouldn't the use have to be using console=hvc or earlyprintk=xen or something --

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-25 Thread Konrad Rzeszutek Wilk
On Thu, Oct 24, 2013 at 05:43:54PM +0100, Ian Campbell wrote: > On Thu, 2013-10-24 at 17:30 +0100, Julien Grall wrote: > > > I'm sure the solution "move xen call earlier" will come up in few mails, > > so there was a discussion for swiotlb few weeks ago > >

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-25 Thread Konrad Rzeszutek Wilk
On Thu, Oct 24, 2013 at 05:43:54PM +0100, Ian Campbell wrote: On Thu, 2013-10-24 at 17:30 +0100, Julien Grall wrote: I'm sure the solution move xen call earlier will come up in few mails, so there was a discussion for swiotlb few weeks ago (https://lkml.org/lkml/2013/8/29/609). And the

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-24 Thread Ian Campbell
On Thu, 2013-10-24 at 17:30 +0100, Julien Grall wrote: > I'm sure the solution "move xen call earlier" will come up in few mails, > so there was a discussion for swiotlb few weeks ago > (https://lkml.org/lkml/2013/8/29/609). And the final decision was to > avoid specific Xen call in

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-24 Thread Julien Grall
On 10/24/2013 03:49 PM, Konrad Rzeszutek Wilk wrote: On Wed, Oct 23, 2013 at 11:08:01PM +0100, Julien Grall wrote: On 10/23/2013 05:15 PM, Konrad Rzeszutek Wilk wrote: On Sun, Oct 06, 2013 at 09:52:40PM +0100, Julien Grall wrote: Actually, I looked closer the code, with the new solution

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-24 Thread Konrad Rzeszutek Wilk
On Wed, Oct 23, 2013 at 11:08:01PM +0100, Julien Grall wrote: > > > On 10/23/2013 05:15 PM, Konrad Rzeszutek Wilk wrote: > >On Sun, Oct 06, 2013 at 09:52:40PM +0100, Julien Grall wrote: > >>On 09/30/2013 03:45 PM, Konrad Rzeszutek Wilk wrote: > >>>On Fri, Sep 27, 2013 at 10:49:37PM +0100, Julien

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-24 Thread Konrad Rzeszutek Wilk
On Wed, Oct 23, 2013 at 11:08:01PM +0100, Julien Grall wrote: On 10/23/2013 05:15 PM, Konrad Rzeszutek Wilk wrote: On Sun, Oct 06, 2013 at 09:52:40PM +0100, Julien Grall wrote: On 09/30/2013 03:45 PM, Konrad Rzeszutek Wilk wrote: On Fri, Sep 27, 2013 at 10:49:37PM +0100, Julien Grall

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-24 Thread Julien Grall
On 10/24/2013 03:49 PM, Konrad Rzeszutek Wilk wrote: On Wed, Oct 23, 2013 at 11:08:01PM +0100, Julien Grall wrote: On 10/23/2013 05:15 PM, Konrad Rzeszutek Wilk wrote: On Sun, Oct 06, 2013 at 09:52:40PM +0100, Julien Grall wrote: Actually, I looked closer the code, with the new solution

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-24 Thread Ian Campbell
On Thu, 2013-10-24 at 17:30 +0100, Julien Grall wrote: I'm sure the solution move xen call earlier will come up in few mails, so there was a discussion for swiotlb few weeks ago (https://lkml.org/lkml/2013/8/29/609). And the final decision was to avoid specific Xen call in arch_setup. It

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-23 Thread Julien Grall
On 10/23/2013 05:15 PM, Konrad Rzeszutek Wilk wrote: On Sun, Oct 06, 2013 at 09:52:40PM +0100, Julien Grall wrote: On 09/30/2013 03:45 PM, Konrad Rzeszutek Wilk wrote: On Fri, Sep 27, 2013 at 10:49:37PM +0100, Julien Grall wrote: On 09/27/2013 10:25 PM, Konrad Rzeszutek Wilk wrote: @@

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-23 Thread Konrad Rzeszutek Wilk
On Sun, Oct 06, 2013 at 09:52:40PM +0100, Julien Grall wrote: > On 09/30/2013 03:45 PM, Konrad Rzeszutek Wilk wrote: > >On Fri, Sep 27, 2013 at 10:49:37PM +0100, Julien Grall wrote: > >>On 09/27/2013 10:25 PM, Konrad Rzeszutek Wilk wrote: > >> > >>>@@ -641,7 +641,20 @@ struct console

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-23 Thread Konrad Rzeszutek Wilk
On Sun, Oct 06, 2013 at 09:52:40PM +0100, Julien Grall wrote: On 09/30/2013 03:45 PM, Konrad Rzeszutek Wilk wrote: On Fri, Sep 27, 2013 at 10:49:37PM +0100, Julien Grall wrote: On 09/27/2013 10:25 PM, Konrad Rzeszutek Wilk wrote: @@ -641,7 +641,20 @@ struct console xenboot_console = {

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-23 Thread Julien Grall
On 10/23/2013 05:15 PM, Konrad Rzeszutek Wilk wrote: On Sun, Oct 06, 2013 at 09:52:40PM +0100, Julien Grall wrote: On 09/30/2013 03:45 PM, Konrad Rzeszutek Wilk wrote: On Fri, Sep 27, 2013 at 10:49:37PM +0100, Julien Grall wrote: On 09/27/2013 10:25 PM, Konrad Rzeszutek Wilk wrote: @@

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-06 Thread Julien Grall
On 09/30/2013 03:45 PM, Konrad Rzeszutek Wilk wrote: On Fri, Sep 27, 2013 at 10:49:37PM +0100, Julien Grall wrote: On 09/27/2013 10:25 PM, Konrad Rzeszutek Wilk wrote: @@ -641,7 +641,20 @@ struct console xenboot_console = { void xen_raw_console_write(const char *str) { -

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-06 Thread Julien Grall
On 09/30/2013 03:45 PM, Konrad Rzeszutek Wilk wrote: On Fri, Sep 27, 2013 at 10:49:37PM +0100, Julien Grall wrote: On 09/27/2013 10:25 PM, Konrad Rzeszutek Wilk wrote: @@ -641,7 +641,20 @@ struct console xenboot_console = { void xen_raw_console_write(const char *str) { -

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-09-30 Thread Konrad Rzeszutek Wilk
On Fri, Sep 27, 2013 at 10:49:37PM +0100, Julien Grall wrote: > On 09/27/2013 10:25 PM, Konrad Rzeszutek Wilk wrote: > > >@@ -641,7 +641,20 @@ struct console xenboot_console = { > > > > void xen_raw_console_write(const char *str) > > { > >-dom0_write_console(0, str, strlen(str)); > >+

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-09-30 Thread Konrad Rzeszutek Wilk
On Fri, Sep 27, 2013 at 10:49:37PM +0100, Julien Grall wrote: On 09/27/2013 10:25 PM, Konrad Rzeszutek Wilk wrote: @@ -641,7 +641,20 @@ struct console xenboot_console = { void xen_raw_console_write(const char *str) { -dom0_write_console(0, str, strlen(str)); +ssize_t len =

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-09-27 Thread Julien Grall
On 09/27/2013 10:25 PM, Konrad Rzeszutek Wilk wrote: @@ -641,7 +641,20 @@ struct console xenboot_console = { void xen_raw_console_write(const char *str) { - dom0_write_console(0, str, strlen(str)); + ssize_t len = strlen(str); + int rc = 0; + + if (xen_domain()) { +

[PATCH] xen/hvc-console: Make it work with HVM guests.

2013-09-27 Thread Konrad Rzeszutek Wilk
Signed-off-by: Konrad Rzeszutek Wilk --- drivers/tty/hvc/hvc_xen.c | 17 +++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index e61c36c..513a79b 100644 --- a/drivers/tty/hvc/hvc_xen.c +++

[PATCH] xen/hvc-console: Make it work with HVM guests.

2013-09-27 Thread Konrad Rzeszutek Wilk
Signed-off-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- drivers/tty/hvc/hvc_xen.c | 17 +++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index e61c36c..513a79b 100644 --- a/drivers/tty/hvc/hvc_xen.c

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-09-27 Thread Julien Grall
On 09/27/2013 10:25 PM, Konrad Rzeszutek Wilk wrote: @@ -641,7 +641,20 @@ struct console xenboot_console = { void xen_raw_console_write(const char *str) { - dom0_write_console(0, str, strlen(str)); + ssize_t len = strlen(str); + int rc = 0; + + if (xen_domain()) { +