From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGWL4-0002wc-0S for qemu-devel@nongnu.org; Mon, 02 Sep 2013 11:46:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGWKy-0007Ry-1m for qemu-devel@nongnu.org; Mon, 02 Sep 2013 11:46:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGWKx-0007Rs-Pk for qemu-devel@nongnu.org; Mon, 02 Sep 2013 11:46:43 -0400 Message-ID: <1378136804.2640.36.camel@localhost.localdomain> From: Marcel Apfelbaum Date: Mon, 02 Sep 2013 18:46:44 +0300 In-Reply-To: References: <1378131189-25538-1-git-send-email-marcel.a@redhat.com> <1378131189-25538-3-git-send-email-marcel.a@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 2/3] hw/pci: add MemoryRegion ops for unassigned pci addresses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paolo Bonzini , Anthony Liguori , QEMU Developers , Andreas =?ISO-8859-1?Q?F=E4rber?= , "Michael S. Tsirkin" On Mon, 2013-09-02 at 15:42 +0100, Peter Maydell wrote: > On 2 September 2013 15:13, Marcel Apfelbaum wrote: > > +const MemoryRegionOps pci_unassigned_mem_ops = { > > + .valid.accepts = pci_unassigned_mem_accepts, > > + .endianness = DEVICE_NATIVE_ENDIAN, > > +}; > > This is wrong -- you want reads and writes to result in > your PCI-spec-defined behaviour, but if you provide > an accepts callback and it returns false then you get > "machine dependent behaviour such as a machine check > exception". What you want is to provide .read and .write > callbacks which behave as the PCI spec mandates. That makes sense. It was already a bug.Thanks! > > Also this should probably be static, not global, and you If it will be implemented in the "pci core layer", sure Marcel > should put it in the same patch as the one which actually > creates the memory region. > > -- PMM >