From patchwork Tue Dec 4 15:04:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 203675 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4050D2C008A for ; Wed, 5 Dec 2012 02:05:50 +1100 (EST) Received: from localhost ([::1]:57615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfu4C-0005Rt-7l for incoming@patchwork.ozlabs.org; Tue, 04 Dec 2012 10:05:48 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfu3n-0004u5-8q for qemu-devel@nongnu.org; Tue, 04 Dec 2012 10:05:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tfu3j-0000tN-Pf for qemu-devel@nongnu.org; Tue, 04 Dec 2012 10:05:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfu3j-0000t2-J1 for qemu-devel@nongnu.org; Tue, 04 Dec 2012 10:05:19 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qB4F4sgg002778 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 4 Dec 2012 10:04:54 -0500 Received: from localhost (ovpn-113-104.phx2.redhat.com [10.3.113.104]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qB4F4r78001467; Tue, 4 Dec 2012 10:04:54 -0500 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Tue, 4 Dec 2012 13:04:46 -0200 Message-Id: <1354633488-24112-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1354633488-24112-1-git-send-email-lcapitulino@redhat.com> References: <1354633488-24112-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: aliguori@us.ibm.com, mdroth@linux.vnet.ibm.com, agl@us.ibm.com Subject: [Qemu-devel] [RFC 1/3] virtio-balloon: drop old stats code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Next commit will re-enable balloon stats with a different interface, but this old code conflicts with it, drop it then. Signed-off-by: Luiz Capitulino --- hw/virtio-balloon.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index dd1a650..4398025 100644 --- a/hw/virtio-balloon.c +++ b/hw/virtio-balloon.c @@ -164,28 +164,6 @@ static uint32_t virtio_balloon_get_features(VirtIODevice *vdev, uint32_t f) static void virtio_balloon_stat(void *opaque, BalloonInfo *info) { VirtIOBalloon *dev = opaque; - -#if 0 - /* Disable guest-provided stats for now. For more details please check: - * https://bugzilla.redhat.com/show_bug.cgi?id=623903 - * - * If you do enable it (which is probably not going to happen as we - * need a new command for it), remember that you also need to fill the - * appropriate members of the BalloonInfo structure so that the stats - * are returned to the client. - */ - if (dev->vdev.guest_features & (1 << VIRTIO_BALLOON_F_STATS_VQ)) { - virtqueue_push(dev->svq, &dev->stats_vq_elem, dev->stats_vq_offset); - virtio_notify(&dev->vdev, dev->svq); - return; - } -#endif - - /* Stats are not supported. Clear out any stale values that might - * have been set by a more featureful guest kernel. - */ - reset_stats(dev); - info->actual = ram_size - ((uint64_t) dev->actual << VIRTIO_BALLOON_PFN_SHIFT); }