LKML Archive on
help / color / mirror / Atom feed
From: Nadav Amit <>
To: Greg Kroah-Hartman <>
Cc: Xavier Deguillard <>,
	<>, Arnd Bergmann <>,
	Nadav Amit <>
Subject: [PATCH 6/7] vmw_balloon: fix VMCI use when balloon built into kernel
Date: Wed, 13 Jun 2018 04:03:58 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Currently, when all modules, including VMCI and VMware balloon are built
into the kernel, the initialization of the balloon happens before the
VMCI is probed. As a result, the balloon fails to initialize the VMCI
doorbell, which it uses to get asynchronous requests for balloon size

The problem can be seen in the logs, in the form of the following
	"vmw_balloon: failed to initialize vmci doorbell"

The driver would work correctly but slightly less efficiently, probing
for requests periodically. This patch changes the balloon to be
initialized using late_initcall() instead of module_init() to address
this issue. It does not address a situation in which VMCI is built as a
module and the balloon is built into the kernel.

Signed-off-by: Nadav Amit <>
 drivers/misc/vmw_balloon.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c
index 6e0b09b79fb5..e9502a56aa4b 100644
--- a/drivers/misc/vmw_balloon.c
+++ b/drivers/misc/vmw_balloon.c
@@ -1295,7 +1295,14 @@ static int __init vmballoon_init(void)
 	return 0;
+ * Using late_initcall() instead of module_init() allows the balloon to use the
+ * VMCI doorbell even when the balloon is built into the kernel. Otherwise the
+ * VMCI is probed only after the balloon is initialized. If the balloon is used
+ * as a module, late_initcall() is equivalent to module_init().
+ */
 static void __exit vmballoon_exit(void)

  parent reply	other threads:[~2018-06-13 18:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-13 11:03 [PATCH 0/7] vmw_balloon: addressing bugs and issues Nadav Amit
2018-06-13 11:03 ` [PATCH 1/7] vmw_balloon: update copyright message Nadav Amit
2018-06-13 18:20   ` Greg Kroah-Hartman
2018-06-13 18:24     ` Nadav Amit
2018-06-13 11:03 ` [PATCH 2/7] vmw_balloon: update maintainers list Nadav Amit
2018-06-13 11:03 ` [PATCH 3/7] vmw_balloon: fix inflation of 64-bit GFNs Nadav Amit
2018-06-13 18:21   ` Greg Kroah-Hartman
2018-06-13 18:27     ` Nadav Amit
2018-06-13 11:03 ` [PATCH 4/7] vmw_balloon: do not use 2MB without batching Nadav Amit
2018-06-13 11:03 ` [PATCH 5/7] vmw_balloon: VMCI_DOORBELL_SET does not check status Nadav Amit
2018-06-13 11:03 ` Nadav Amit [this message]
2018-06-13 11:03 ` [PATCH 7/7] vmw_balloon: remove inflation rate limiting Nadav Amit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH 6/7] vmw_balloon: fix VMCI use when balloon built into kernel' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).