Re: [Xen-devel] xenconsole: Define and use a macro INVALID_XEN_PFN instead of -1

2017-10-18 Thread Jan Beulich
>>> On 18.10.17 at 15:05, wrote: > On 10/18/2017 12:53 PM, Wei Liu wrote: >> On Wed, Oct 18, 2017 at 04:02:45AM -0600, Jan Beulich wrote: >> On 17.10.17 at 18:46, wrote: --- a/xen/include/public/xen.h +++ b/xen/include/public/xen.h @@ -37,6 +37,8 @@ #error "Unsupported a

Re: [Xen-devel] xenconsole: Define and use a macro INVALID_XEN_PFN instead of -1

2017-10-18 Thread Julien Grall
Hi Wei, On 10/18/2017 12:53 PM, Wei Liu wrote: On Wed, Oct 18, 2017 at 04:02:45AM -0600, Jan Beulich wrote: On 17.10.17 at 18:46, wrote: --- a/xen/include/public/xen.h +++ b/xen/include/public/xen.h @@ -37,6 +37,8 @@ #error "Unsupported architecture" #endif +#define INVALID_XEN_PFN (~(

Re: [Xen-devel] xenconsole: Define and use a macro INVALID_XEN_PFN instead of -1

2017-10-18 Thread Wei Liu
On Wed, Oct 18, 2017 at 04:02:45AM -0600, Jan Beulich wrote: > >>> On 17.10.17 at 18:46, wrote: > > --- a/tools/console/daemon/io.c > > +++ b/tools/console/daemon/io.c > > @@ -658,12 +658,12 @@ static void console_unmap_interface(struct console > > *con) > > { > > if (con->interface == NULL)

Re: [Xen-devel] xenconsole: Define and use a macro INVALID_XEN_PFN instead of -1

2017-10-18 Thread Jan Beulich
>>> On 17.10.17 at 18:46, wrote: > --- a/tools/console/daemon/io.c > +++ b/tools/console/daemon/io.c > @@ -658,12 +658,12 @@ static void console_unmap_interface(struct console *con) > { > if (con->interface == NULL) > return; > - if (xgt_handle && con->ring_ref == -1) > +

[Xen-devel] xenconsole: Define and use a macro INVALID_XEN_PFN instead of -1

2017-10-17 Thread Bhupinder Thakur
xenconsole will use a new macro INVALID_XEN_PFN instead of -1 for initializing ring-ref. Signed-off-by: Bhupinder Thakur --- CC: Ian Jackson CC: Wei Liu CC: Andrew Cooper CC: George Dunlap CC: Jan Beulich CC: Konrad Rzeszutek Wilk CC: Stefano Stabellini CC: Julien Grall tools/console/d