From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcWKK-00025K-PV for qemu-devel@nongnu.org; Mon, 30 Mar 2015 05:49:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcWKH-00079m-IK for qemu-devel@nongnu.org; Mon, 30 Mar 2015 05:49:48 -0400 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:36886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcWKH-00079E-Ah for qemu-devel@nongnu.org; Mon, 30 Mar 2015 05:49:45 -0400 Received: by wiaa2 with SMTP id a2so120855688wia.0 for ; Mon, 30 Mar 2015 02:49:44 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <55191C34.2000807@redhat.com> Date: Mon, 30 Mar 2015 11:49:40 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <55159192020000780006EBB7@mail.emea.novell.com> In-Reply-To: <55159192020000780006EBB7@mail.emea.novell.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] MemoryRegionOps' {min,max}_access_size fields List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Beulich , qemu-devel@nongnu.org On 27/03/2015 17:21, Jan Beulich wrote: > Hello, > > I'm trying to understand what the idea behind these is. For one, > without .valid.accepts set I can't see the two respective .valid > fields take effect at all. Yet all examples I looked at don't set > .valid.accepts. What's the deal here? The examples you see of .valid.min_access_size/max_access_size could indeed be removed. Most of the time, whether an access is valid == whether the access is naturally aligned. .valid.min_access_size/.valid.max_access_size is really the access size expected by .valid.accepts. > And then the way access_with_adjusted_size() works, it looks to > me as if with .impl.min_access_size set to greater than 1 > unaligned accesses could still reach the actual read or write > handler, as only the access size would get bumped, but no > adjustment be made to the address. I don't understand what you mean exactly. Do you have an example? Paolo