diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-23 11:22:45 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-23 11:22:45 -0700 |
commit | a56e88ec05df50110f2bf578b6e17128f37111ed (patch) | |
tree | fe3ee0bcd1cef2d28ffd62a0c012ad972c581049 /drivers/xen/grant-table.c | |
parent | 4b162c530d9c101381500e586fedb1340595a6ff (diff) | |
parent | 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 (diff) | |
download | linux-a56e88ec05df50110f2bf578b6e17128f37111ed.tar.bz2 |
Merge tag 'for-linus-4.13b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen fixes from Juergen Gross:
"Some fixes and cleanups for running under Xen"
* tag 'for-linus-4.13b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
xen/balloon: don't online new memory initially
xen/x86: fix cpu hotplug
xen/grant-table: log the lack of grants
xen/x86: Don't BUG on CPU0 offlining
Diffstat (limited to 'drivers/xen/grant-table.c')
-rw-r--r-- | drivers/xen/grant-table.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index d6786b87e13b..2c6a9114d332 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c @@ -42,6 +42,7 @@ #include <linux/delay.h> #include <linux/hardirq.h> #include <linux/workqueue.h> +#include <linux/ratelimit.h> #include <xen/xen.h> #include <xen/interface/xen.h> @@ -1072,8 +1073,14 @@ static int gnttab_expand(unsigned int req_entries) cur = nr_grant_frames; extra = ((req_entries + (grefs_per_grant_frame-1)) / grefs_per_grant_frame); - if (cur + extra > gnttab_max_grant_frames()) + if (cur + extra > gnttab_max_grant_frames()) { + pr_warn_ratelimited("xen/grant-table: max_grant_frames reached" + " cur=%u extra=%u limit=%u" + " gnttab_free_count=%u req_entries=%u\n", + cur, extra, gnttab_max_grant_frames(), + gnttab_free_count, req_entries); return -ENOSPC; + } rc = gnttab_map(cur, cur + extra - 1); if (rc == 0) |