diff mbox series

[1/2] tools/xenstored: Make gnttab interface mandatory

Message ID 20190709152845.18217-2-andrew.cooper3@citrix.com (mailing list archive)
State New, archived
Headers show
Series tools/xenstored: Reduce the useage of unstable interface | expand

Commit Message

Andrew Cooper July 9, 2019, 3:28 p.m. UTC
xenstored currently requires an libxc and evtchn interface, but leaves
the gnttab interface as optional.

gnttab is ubiquitous these days, and in practice mandatory in all cases
where xenstored isn't running as root in dom0 (due to the inability to
foreign map by MFN).

The toolstack has unconditionally set up grant details for many years
now, and longterm it would be good to phase out the use of libxc.  This
requires that xenstored map the store ring by grant map, rather than
foreign map.

No practical change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Ian Jackson <Ian.Jackson@citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Juergen Gross <jgross@suse.com>
---
 tools/xenstore/xenstored_domain.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Jürgen Groß July 10, 2019, 12:30 p.m. UTC | #1
On 09.07.19 17:28, Andrew Cooper wrote:
> xenstored currently requires an libxc and evtchn interface, but leaves
> the gnttab interface as optional.
> 
> gnttab is ubiquitous these days, and in practice mandatory in all cases
> where xenstored isn't running as root in dom0 (due to the inability to
> foreign map by MFN).
> 
> The toolstack has unconditionally set up grant details for many years
> now, and longterm it would be good to phase out the use of libxc.  This
> requires that xenstored map the store ring by grant map, rather than
> foreign map.
> 
> No practical change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen
diff mbox series

Patch

diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_domain.c
index fa6655033a..463ebba643 100644
--- a/tools/xenstore/xenstored_domain.c
+++ b/tools/xenstore/xenstored_domain.c
@@ -641,9 +641,9 @@  void domain_init(void)
 
 	*xgt_handle = xengnttab_open(NULL, 0);
 	if (*xgt_handle == NULL)
-		xprintf("WARNING: Failed to open connection to gnttab\n");
-	else
-		talloc_set_destructor(xgt_handle, close_xgt_handle);
+		barf_perror("Failed to open connection to gnttab");
+
+	talloc_set_destructor(xgt_handle, close_xgt_handle);
 
 	xce_handle = xenevtchn_open(NULL, 0);