Re: [Xen-devel] [PATCH 20/25 v6] xen/arm: vpl011: Add a new console_close_evtchn function in xenconsole

2017-07-18 Thread Stefano Stabellini
On Mon, 17 Jul 2017, Bhupinder Thakur wrote:
> This patch introduces a console_close_evtchn console_cleanup function. This 
> function
> closes the console event channel.
> 
> Signed-off-by: Bhupinder Thakur 

Reviewed-by: Stefano Stabellini 


> ---
> CC: Ian Jackson 
> CC: Wei Liu 
> CC: Stefano Stabellini 
> CC: Julien Grall 
> 
> Changes since v5:
> - Split this change in a separate patch.
> 
>  tools/console/daemon/io.c | 12 +---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
> index 93fc8cc..54c91aa 100644
> --- a/tools/console/daemon/io.c
> +++ b/tools/console/daemon/io.c
> @@ -800,6 +800,14 @@ static void cleanup_domain(struct domain *d)
>   remove_domain(d);
>  }
>  
> +static void console_close_evtchn(struct console *con)
> +{
> + if (con->xce_handle != NULL)
> + xenevtchn_close(con->xce_handle);
> +
> + con->xce_handle = NULL;
> +}
> +
>  static void shutdown_domain(struct domain *d)
>  {
>   struct console *con = &d->console;
> @@ -807,9 +815,7 @@ static void shutdown_domain(struct domain *d)
>   d->is_dead = true;
>   watch_domain(d, false);
>   console_unmap_interface(con);
> - if (con->xce_handle != NULL)
> - xenevtchn_close(con->xce_handle);
> - con->xce_handle = NULL;
> + console_close_evtchn(con);
>  }
>  
>  static unsigned enum_pass = 0;
> -- 
> 2.7.4
> 

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH 20/25 v6] xen/arm: vpl011: Add a new console_close_evtchn function in xenconsole

2017-07-18 Thread Wei Liu
On Mon, Jul 17, 2017 at 06:36:50PM +0530, Bhupinder Thakur wrote:
> This patch introduces a console_close_evtchn console_cleanup function. This 
> function
> closes the console event channel.
> 
> Signed-off-by: Bhupinder Thakur 

Acked-by: Wei Liu 

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 20/25 v6] xen/arm: vpl011: Add a new console_close_evtchn function in xenconsole

2017-07-17 Thread Bhupinder Thakur
This patch introduces a console_close_evtchn console_cleanup function. This 
function
closes the console event channel.

Signed-off-by: Bhupinder Thakur 
---
CC: Ian Jackson 
CC: Wei Liu 
CC: Stefano Stabellini 
CC: Julien Grall 

Changes since v5:
- Split this change in a separate patch.

 tools/console/daemon/io.c | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
index 93fc8cc..54c91aa 100644
--- a/tools/console/daemon/io.c
+++ b/tools/console/daemon/io.c
@@ -800,6 +800,14 @@ static void cleanup_domain(struct domain *d)
remove_domain(d);
 }
 
+static void console_close_evtchn(struct console *con)
+{
+   if (con->xce_handle != NULL)
+   xenevtchn_close(con->xce_handle);
+
+   con->xce_handle = NULL;
+}
+
 static void shutdown_domain(struct domain *d)
 {
struct console *con = &d->console;
@@ -807,9 +815,7 @@ static void shutdown_domain(struct domain *d)
d->is_dead = true;
watch_domain(d, false);
console_unmap_interface(con);
-   if (con->xce_handle != NULL)
-   xenevtchn_close(con->xce_handle);
-   con->xce_handle = NULL;
+   console_close_evtchn(con);
 }
 
 static unsigned enum_pass = 0;
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel