From patchwork Fri Jul 15 02:47:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Liang Z" X-Patchwork-Id: 648642 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rrHKs3Nc1z9s6r for ; Fri, 15 Jul 2016 12:57:20 +1000 (AEST) Received: from localhost ([::1]:58057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNtJV-00086i-KX for incoming@patchwork.ozlabs.org; Thu, 14 Jul 2016 22:57:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNtI8-00077o-9o for qemu-devel@nongnu.org; Thu, 14 Jul 2016 22:55:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNtI2-0006f1-Cu for qemu-devel@nongnu.org; Thu, 14 Jul 2016 22:55:51 -0400 Received: from mga11.intel.com ([192.55.52.93]:43393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNtI2-0006el-4J for qemu-devel@nongnu.org; Thu, 14 Jul 2016 22:55:46 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 14 Jul 2016 19:55:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.28,365,1464678000"; d="scan'208"; a="1007200654" Received: from ll.sh.intel.com (HELO localhost) ([10.239.13.123]) by fmsmga001.fm.intel.com with ESMTP; 14 Jul 2016 19:55:43 -0700 From: Liang Li To: qemu-devel@nongnu.org Date: Fri, 15 Jul 2016 10:47:21 +0800 Message-Id: <1468550849-22172-2-git-send-email-liang.z.li@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1468550849-22172-1-git-send-email-liang.z.li@intel.com> References: <1468550849-22172-1-git-send-email-liang.z.li@intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.93 Subject: [Qemu-devel] [QEMU v2 1/9] virtio-balloon: Remove needless precompiled directive X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, Liang Li , kvm@vger.kernel.org, quintela@redhat.com, mst@redhat.com, dgilbert@redhat.com, amit.shah@redhat.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Since there in wrapper around madvise(), the virtio-balloon code is able to work without the precompiled directive, the directive can be removed. Signed-off-by: Liang Li Suggested-by: Thomas Huth --- hw/virtio/virtio-balloon.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 1a22e6d..62931b3 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -34,13 +34,11 @@ static void balloon_page(void *addr, int deflate) { -#if defined(__linux__) if (!qemu_balloon_is_inhibited() && (!kvm_enabled() || kvm_has_sync_mmu())) { qemu_madvise(addr, BALLOON_PAGE_SIZE, deflate ? QEMU_MADV_WILLNEED : QEMU_MADV_DONTNEED); } -#endif } static const char *balloon_stat_names[] = {