From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7rja-0000O8-Vj for qemu-devel@nongnu.org; Fri, 09 Aug 2013 14:48:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7rjN-0005eH-FL for qemu-devel@nongnu.org; Fri, 09 Aug 2013 14:48:22 -0400 Received: from mail-qa0-x22a.google.com ([2607:f8b0:400d:c00::22a]:40348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7rjN-0005cz-A8 for qemu-devel@nongnu.org; Fri, 09 Aug 2013 14:48:09 -0400 Received: by mail-qa0-f42.google.com with SMTP id bv4so18639qab.15 for ; Fri, 09 Aug 2013 11:48:08 -0700 (PDT) Sender: Richard Henderson Message-ID: <52053962.7070101@twiddle.net> Date: Fri, 09 Aug 2013 08:48:02 -1000 From: Richard Henderson MIME-Version: 1.0 References: <51FCBFCD.5020608@web.de> <5203BC8A.8040605@siemens.com> <52049D1B.1080103@redhat.com> <52051DA1.8060004@suse.de> In-Reply-To: <52051DA1.8060004@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 1/2] memory: Provide separate handling of unassigned io ports accesses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: Peter Maydell , Paolo Bonzini , qemu-devel , Jan Kiszka On 08/09/2013 06:49 AM, Andreas Färber wrote: > Am 09.08.2013 09:41, schrieb Paolo Bonzini: >> Il 08/08/2013 17:43, Jan Kiszka ha scritto: >>> On 2013-08-08 17:33, Peter Maydell wrote: >>>> On 3 August 2013 09:31, Jan Kiszka wrote: >>>>> --- a/ioport.c >>>>> +++ b/ioport.c >>>>> @@ -44,6 +44,22 @@ typedef struct MemoryRegionPortioList { >>>>> MemoryRegionPortio ports[]; >>>>> } MemoryRegionPortioList; >>>>> >>>>> +static uint64_t unassigned_io_read(void *opaque, hwaddr addr, unsigned size) >>>>> +{ >>>>> + return -1UL; >>>> >>>> This should probably be "-1ULL", otherwise we'll return >>>> different values on 32 bit and 64 bit hosts. (Actually >>>> managing a 64 bit read of the i/o space is pretty >>>> unlikely, though possibly alpha memory-mapped via the >>>> PCI space might let you do it.) >>> >>> No problem with changing this - but wouldn't 64-bit i/o accesses be a >>> bug? It's not allowed according to PCI, no device can handle it >>> (officially), so no arch should forward such requests from mmio, rather >>> break them up first. >> >> Yes, the impl.max_access_size should never be 8. Though 1ULL would be >> clearer perhaps. > > Let's CC rth. At least the CIA and TYPHOON pci host controlers can generate quadword accesses to all of MEM, IO, and config space. Whether or not such an access is valid for any given device is a separate issue. r~