From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYZ4K-0006EA-FX for qemu-devel@nongnu.org; Sat, 04 May 2013 05:47:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYZ4J-0004Pr-Lo for qemu-devel@nongnu.org; Sat, 04 May 2013 05:47:52 -0400 Received: from mail-ea0-x22b.google.com ([2a00:1450:4013:c01::22b]:55643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYZ4J-0004Ph-Ee for qemu-devel@nongnu.org; Sat, 04 May 2013 05:47:51 -0400 Received: by mail-ea0-f171.google.com with SMTP id b10so1079911eae.2 for ; Sat, 04 May 2013 02:47:50 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5184D942.5020506@redhat.com> Date: Sat, 04 May 2013 11:47:46 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1353808984-22368-1-git-send-email-qemulist@gmail.com> <51829B30.7020308@siemens.com> <51836FA8.2000501@siemens.com> In-Reply-To: <51836FA8.2000501@siemens.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel , Jan Kiszka , Liu Ping Fan Il 03/05/2013 10:04, Jan Kiszka ha scritto: > We can't change the semantics of opaque as long as old_mmio / old_portio > are around. But we need a flag anyway to indicate if a region is > depending on BQL or not. Adding a separate "Object *owner" to > MemoryRegion can serve both purposes. Then we define something like > > void memory_region_set_local_locking(MemoryRegion *mr, > bool local_locking, > Object *owner); > > to control the property (if local_locking is true, owner must be > non-NULL, of course). That's quite similar to my old prototype here that > had memory_region_set/clear_global_locking. I think setting the owner can be done separately from enabling local lock. For example, memory_region_find could also have a variant that adds a ref to the owner. It would be very similar to what Ping Fan is doing in the virtio-dataplane's HostMem data structure. Paolo