xen/gnttab: Log when grant_table_init() fails
PATCH 1/1 xen/gnttab: Log when grant_table_init() fails
... so debug builds can see what went wrong, rather than getting an unqualified -EINVAL out domain creation.
Signed-off-by Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>
CC: Volodymyr Babchuk <[email protected]>
--- xen/common/grant_table.c | 4 ++++ 1 file changed, 4 insertions(+)
xen/common/grant_table.c +4 -0
@@ -1920,7 +1920,11 @@ int grant_table_init(struct domain *d, int max_grant_frames,if ( max_grant_frames <INITIAL_NR_GRANT_FRAMES || max_grant_frames > opt_max_grant_frames || max_maptrack_frames > opt_max_maptrack_frames ) + { +dprintk (XENLOG_INFO ,"Bad grant table sizes: grant %u, maptrack %u\n" , + max_grant_frames, max_maptrack_frames);return -EINVAL ; + } if ( (gt = xzalloc(struct grant_table)) == NULL )return -ENOMEM ;
Signature · 1 line
2.11.0
Quoted 4 lines · Andrew Cooper
... so debug builds can see what went wrong, rather than getting an unqualified
-EINVALout domain creation.Signed-off-by Andrew Cooper <[email protected]>
Acked-by Jan Beulich <[email protected]>