From patchwork Sun Oct 7 12:38:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 189826 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 1B15A2C0193 for ; Mon, 8 Oct 2012 00:35:23 +1100 (EST) Received: from localhost ([::1]:60568 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKq92-0008EF-4o for incoming@patchwork.ozlabs.org; Sun, 07 Oct 2012 08:39:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKq8H-0007IT-G8 for qemu-devel@nongnu.org; Sun, 07 Oct 2012 08:38:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKq8G-0002ml-7R for qemu-devel@nongnu.org; Sun, 07 Oct 2012 08:38:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKq8G-0002md-07 for qemu-devel@nongnu.org; Sun, 07 Oct 2012 08:38:56 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q97CcrPi029272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 7 Oct 2012 08:38:53 -0400 Received: from s01.tlv.redhat.com (s01.tlv.redhat.com [10.35.255.8]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q97CcVYZ002159; Sun, 7 Oct 2012 08:38:51 -0400 From: Avi Kivity To: qemu-devel@nongnu.org, Anthony Liguori , liu ping fan , "Michael S. Tsirkin" , Paolo Bonzini , Blue Swirl Date: Sun, 7 Oct 2012 14:38:14 +0200 Message-Id: <1349613508-22980-10-git-send-email-avi@redhat.com> In-Reply-To: <1349613508-22980-1-git-send-email-avi@redhat.com> References: <1349613508-22980-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v1 09/23] memory: use new MEMORY_LISTENER_DEFAULT_OPS 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 Removes quite a bit of useless code. Signed-off-by: Avi Kivity --- exec.c | 98 ++---------------------------------------------------------------- 1 file changed, 2 insertions(+), 96 deletions(-) diff --git a/exec.c b/exec.c index 5c703b9..1fd6a10 100644 --- a/exec.c +++ b/exec.c @@ -3202,32 +3202,12 @@ static void core_region_add(MemoryListener *listener, cpu_register_physical_memory_log(section, section->readonly); } -static void core_region_del(MemoryListener *listener, - MemoryRegionSection *section) -{ -} - static void core_region_nop(MemoryListener *listener, MemoryRegionSection *section) { cpu_register_physical_memory_log(section, section->readonly); } -static void core_log_start(MemoryListener *listener, - MemoryRegionSection *section) -{ -} - -static void core_log_stop(MemoryListener *listener, - MemoryRegionSection *section) -{ -} - -static void core_log_sync(MemoryListener *listener, - MemoryRegionSection *section) -{ -} - static void core_log_global_start(MemoryListener *listener) { cpu_physical_memory_set_dirty_tracking(1); @@ -3238,26 +3218,6 @@ static void core_log_global_stop(MemoryListener *listener) cpu_physical_memory_set_dirty_tracking(0); } -static void core_eventfd_add(MemoryListener *listener, - MemoryRegionSection *section, - bool match_data, uint64_t data, EventNotifier *e) -{ -} - -static void core_eventfd_del(MemoryListener *listener, - MemoryRegionSection *section, - bool match_data, uint64_t data, EventNotifier *e) -{ -} - -static void io_begin(MemoryListener *listener) -{ -} - -static void io_commit(MemoryListener *listener) -{ -} - static void io_region_add(MemoryListener *listener, MemoryRegionSection *section) { @@ -3276,75 +3236,21 @@ static void io_region_del(MemoryListener *listener, isa_unassign_ioport(section->offset_within_address_space, section->size); } -static void io_region_nop(MemoryListener *listener, - MemoryRegionSection *section) -{ -} - -static void io_log_start(MemoryListener *listener, - MemoryRegionSection *section) -{ -} - -static void io_log_stop(MemoryListener *listener, - MemoryRegionSection *section) -{ -} - -static void io_log_sync(MemoryListener *listener, - MemoryRegionSection *section) -{ -} - -static void io_log_global_start(MemoryListener *listener) -{ -} - -static void io_log_global_stop(MemoryListener *listener) -{ -} - -static void io_eventfd_add(MemoryListener *listener, - MemoryRegionSection *section, - bool match_data, uint64_t data, EventNotifier *e) -{ -} - -static void io_eventfd_del(MemoryListener *listener, - MemoryRegionSection *section, - bool match_data, uint64_t data, EventNotifier *e) -{ -} - static MemoryListener core_memory_listener = { + MEMORY_LISTENER_DEFAULT_OPS, .begin = core_begin, .commit = core_commit, .region_add = core_region_add, - .region_del = core_region_del, .region_nop = core_region_nop, - .log_start = core_log_start, - .log_stop = core_log_stop, - .log_sync = core_log_sync, .log_global_start = core_log_global_start, .log_global_stop = core_log_global_stop, - .eventfd_add = core_eventfd_add, - .eventfd_del = core_eventfd_del, .priority = 0, }; static MemoryListener io_memory_listener = { - .begin = io_begin, - .commit = io_commit, + MEMORY_LISTENER_DEFAULT_OPS, .region_add = io_region_add, .region_del = io_region_del, - .region_nop = io_region_nop, - .log_start = io_log_start, - .log_stop = io_log_stop, - .log_sync = io_log_sync, - .log_global_start = io_log_global_start, - .log_global_stop = io_log_global_stop, - .eventfd_add = io_eventfd_add, - .eventfd_del = io_eventfd_del, .priority = 0, };