All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: penberg@kernel.org
Cc: kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com,
	gorcunov@gmail.com, Sasha Levin <levinsasha928@gmail.com>
Subject: [PATCH 7/7] kvm tools: Add guest compatability warning to virtio-balloon
Date: Thu, 18 Aug 2011 15:18:37 +0300	[thread overview]
Message-ID: <1313669917-21192-7-git-send-email-levinsasha928@gmail.com> (raw)
In-Reply-To: <1313669917-21192-1-git-send-email-levinsasha928@gmail.com>

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
 tools/kvm/virtio/balloon.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/tools/kvm/virtio/balloon.c b/tools/kvm/virtio/balloon.c
index c5853a5..05bb196 100644
--- a/tools/kvm/virtio/balloon.c
+++ b/tools/kvm/virtio/balloon.c
@@ -11,6 +11,7 @@
 #include "kvm/threadpool.h"
 #include "kvm/irq.h"
 #include "kvm/ioeventfd.h"
+#include "kvm/guest_compat.h"
 
 #include <linux/virtio_ring.h>
 #include <linux/virtio_balloon.h>
@@ -48,6 +49,7 @@ struct bln_dev {
 	u16			stat_count;
 	int			stat_waitfd;
 
+	int			compat_id;
 	struct virtio_balloon_config config;
 };
 
@@ -211,6 +213,8 @@ static bool virtio_bln_pci_io_out(struct ioport *ioport, struct kvm *kvm, u16 po
 		struct virt_queue *queue;
 		void *p;
 
+		compat__remove_message(bdev.compat_id);
+
 		queue			= &bdev.vqs[bdev.queue_selector];
 		queue->pfn		= ioport__read32(data);
 		p			= guest_pfn_to_host(kvm, queue->pfn);
@@ -366,4 +370,10 @@ void virtio_bln__init(struct kvm *kvm)
 	memset(&bdev.config, 0, sizeof(struct virtio_balloon_config));
 
 	pci__register(&bdev.pci_hdr, dev);
+
+	bdev.compat_id = compat__add_message("virtio-balloon device was not detected",
+						"While you have requested a virtio-balloon device, "
+						"the guest kernel didn't seem to detect it.\n"
+						"Please make sure that the kernel was compiled"
+						"with CONFIG_VIRTIO_BALLOON.");
 }
-- 
1.7.6


      parent reply	other threads:[~2011-08-18 12:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-18 12:18 [PATCH 1/7] kvm tools: Guest kernel compatability Sasha Levin
2011-08-18 12:18 ` [PATCH 2/7] kvm tools: Add guest compatability warning to virtio-rng Sasha Levin
2011-08-18 12:18 ` [PATCH 3/7] kvm tools: Add guest compatability warning to virtio-blk Sasha Levin
2011-08-18 12:18 ` [PATCH 4/7] kvm tools: Add guest compatability warning to virtio-9p Sasha Levin
2011-08-18 12:18 ` [PATCH 5/7] kvm tools: Add guest compatability warning to virtio-net Sasha Levin
2011-08-18 12:18 ` [PATCH 6/7] kvm tools: Add guest compatability warning to virtio-console Sasha Levin
2011-08-18 12:18 ` Sasha Levin [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=1313669917-21192-7-git-send-email-levinsasha928@gmail.com \
    --to=levinsasha928@gmail.com \
    --cc=asias.hejun@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penberg@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.