From patchwork Thu Jul 4 15:13:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 256941 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E81612C0089 for ; Fri, 5 Jul 2013 01:36:26 +1000 (EST) Received: from localhost ([::1]:41349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uula4-0006SW-Mn for incoming@patchwork.ozlabs.org; Thu, 04 Jul 2013 11:36:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UulGw-0003CF-K4 for qemu-devel@nongnu.org; Thu, 04 Jul 2013 11:16:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UulGv-00064K-EY for qemu-devel@nongnu.org; Thu, 04 Jul 2013 11:16:38 -0400 Received: from mail-we0-x22a.google.com ([2a00:1450:400c:c03::22a]:33518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UulGv-000640-6v for qemu-devel@nongnu.org; Thu, 04 Jul 2013 11:16:37 -0400 Received: by mail-we0-f170.google.com with SMTP id w57so1242099wes.15 for ; Thu, 04 Jul 2013 08:16:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=zMuNHZucJykELJzmrpXR5lOons8r2jNPsdF5ptzA2Bo=; b=KWd9PpUyNRX0qBNqsyMB4N7iFUyWapLU3FdSBSIsA/PqDtZawVAoNY/nd4zQjSoUkR +la1a+98pwlO8I+VX2rRc2GPXx4hYY0q1SmqV/JnSXFGR3bRdzyr+RwiZpRbu5PECa0I Z+MENLdKCfP7SOnTlJbpPwCYALXtuJlicRT4EvQvxtqlWLTXLD+YM6iRXtd09Osbi+cy W4Ys+yBcMULDt2JtFGh2H8LToTmhnJVT8WUGp2TqzQhHGGDbtH2AJ/DQ19cW2j21LR91 4xyi1TXrLAbzU9oOuMRvDqyehPnwY8vRCeVQzIMIGOeyqbIsgfjz7uO3edXb0p90uC3u uohw== X-Received: by 10.180.211.233 with SMTP id nf9mr3632018wic.41.1372950996606; Thu, 04 Jul 2013 08:16:36 -0700 (PDT) Received: from playground.station (net-37-117-148-210.cust.dsl.vodafone.it. [37.117.148.210]) by mx.google.com with ESMTPSA id d8sm4212546wiz.0.2013.07.04.08.16.34 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 04 Jul 2013 08:16:35 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 4 Jul 2013 17:13:57 +0200 Message-Id: <1372950842-32422-62-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1372950842-32422-1-git-send-email-pbonzini@redhat.com> References: <1372950842-32422-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::22a Subject: [Qemu-devel] [PATCH 61/66] memory: move MemoryListener declaration earlier 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 Reviewed-by: Jan Kiszka Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 66 +++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index c8d0bf4..8355bdb 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -165,6 +165,39 @@ struct MemoryRegion { NotifierList iommu_notify; }; +typedef struct MemoryListener MemoryListener; + +/** + * MemoryListener: callbacks structure for updates to the physical memory map + * + * Allows a component to adjust to changes in the guest-visible memory map. + * Use with memory_listener_register() and memory_listener_unregister(). + */ +struct MemoryListener { + void (*begin)(MemoryListener *listener); + void (*commit)(MemoryListener *listener); + void (*region_add)(MemoryListener *listener, MemoryRegionSection *section); + void (*region_del)(MemoryListener *listener, MemoryRegionSection *section); + void (*region_nop)(MemoryListener *listener, MemoryRegionSection *section); + void (*log_start)(MemoryListener *listener, MemoryRegionSection *section); + void (*log_stop)(MemoryListener *listener, MemoryRegionSection *section); + void (*log_sync)(MemoryListener *listener, MemoryRegionSection *section); + void (*log_global_start)(MemoryListener *listener); + void (*log_global_stop)(MemoryListener *listener); + void (*eventfd_add)(MemoryListener *listener, MemoryRegionSection *section, + bool match_data, uint64_t data, EventNotifier *e); + void (*eventfd_del)(MemoryListener *listener, MemoryRegionSection *section, + bool match_data, uint64_t data, EventNotifier *e); + void (*coalesced_mmio_add)(MemoryListener *listener, MemoryRegionSection *section, + hwaddr addr, hwaddr len); + void (*coalesced_mmio_del)(MemoryListener *listener, MemoryRegionSection *section, + hwaddr addr, hwaddr len); + /* Lower = earlier (during add), later (during del) */ + unsigned priority; + AddressSpace *address_space_filter; + QTAILQ_ENTRY(MemoryListener) link; +}; + /** * AddressSpace: describes a mapping of addresses to #MemoryRegion objects */ @@ -199,39 +232,6 @@ struct MemoryRegionSection { bool readonly; }; -typedef struct MemoryListener MemoryListener; - -/** - * MemoryListener: callbacks structure for updates to the physical memory map - * - * Allows a component to adjust to changes in the guest-visible memory map. - * Use with memory_listener_register() and memory_listener_unregister(). - */ -struct MemoryListener { - void (*begin)(MemoryListener *listener); - void (*commit)(MemoryListener *listener); - void (*region_add)(MemoryListener *listener, MemoryRegionSection *section); - void (*region_del)(MemoryListener *listener, MemoryRegionSection *section); - void (*region_nop)(MemoryListener *listener, MemoryRegionSection *section); - void (*log_start)(MemoryListener *listener, MemoryRegionSection *section); - void (*log_stop)(MemoryListener *listener, MemoryRegionSection *section); - void (*log_sync)(MemoryListener *listener, MemoryRegionSection *section); - void (*log_global_start)(MemoryListener *listener); - void (*log_global_stop)(MemoryListener *listener); - void (*eventfd_add)(MemoryListener *listener, MemoryRegionSection *section, - bool match_data, uint64_t data, EventNotifier *e); - void (*eventfd_del)(MemoryListener *listener, MemoryRegionSection *section, - bool match_data, uint64_t data, EventNotifier *e); - void (*coalesced_mmio_add)(MemoryListener *listener, MemoryRegionSection *section, - hwaddr addr, hwaddr len); - void (*coalesced_mmio_del)(MemoryListener *listener, MemoryRegionSection *section, - hwaddr addr, hwaddr len); - /* Lower = earlier (during add), later (during del) */ - unsigned priority; - AddressSpace *address_space_filter; - QTAILQ_ENTRY(MemoryListener) link; -}; - /** * memory_region_init: Initialize a memory region *