From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmfDZ-0000mL-L9 for qemu-devel@nongnu.org; Fri, 29 Jul 2011 01:02:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmfDU-0002R2-Fl for qemu-devel@nongnu.org; Fri, 29 Jul 2011 01:02:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmfDU-0002Qt-6C for qemu-devel@nongnu.org; Fri, 29 Jul 2011 01:02:32 -0400 Date: Fri, 29 Jul 2011 08:03:01 +0300 From: "Michael S. Tsirkin" Message-ID: <20110729050301.GA9057@redhat.com> References: <4E2858C2.5050909@siemens.com> <20110722052707.GA8241@redhat.com> <4E293D3D.8070904@siemens.com> <20110728072324.GF14976@valinux.co.jp> <20110728084020.GA4637@redhat.com> <20110729010143.GI14976@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110729010143.GI14976@valinux.co.jp> Subject: Re: [Qemu-devel] [PATCH v2] pci: Common overflow prevention List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: Jan Kiszka , qemu-devel On Fri, Jul 29, 2011 at 10:01:43AM +0900, Isaku Yamahata wrote: > On Thu, Jul 28, 2011 at 11:40:21AM +0300, Michael S. Tsirkin wrote: > > I don't see a problem with this, but could you please clarify when does > > this happen? I think this is only possible for a pci device > > behind an express root. If so, this belongs in pcie_host.c > > > > I'd also like this info to be recorded in the commit log. > > >From 1dd598fd35d4e988dc51487829ed66208ca89021 Mon Sep 17 00:00:00 2001 > Message-Id: <1dd598fd35d4e988dc51487829ed66208ca89021.1311901239.git.yamahata@valinux.co.jp> > From: Isaku Yamahata > Date: Fri, 29 Jul 2011 09:52:45 +0900 > Subject: [PATCH] pcie_host: limit check of pcie_mmcfg_data_write/read > > This patch adds the check where the offset in the configuration space > is in its configuration size. > > MMCFG area allows access of pcie configuration space to be in > offset [0, 4K). > At the same time, conventional pci devices whose configuration space size > is 256 bytes can be behind pcie-to-pci bridge. > The access whose offset is [256, 4K) should have no effect > on the conventional pci device > Add the limit check and ignore such accesses. > > Signed-off-by: Isaku Yamahata I tweaked the commit log and applied this. Thanks!