From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahpNx-0002T0-Ol for qemu-devel@nongnu.org; Sun, 20 Mar 2016 22:16:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahpNt-0004Ps-LY for qemu-devel@nongnu.org; Sun, 20 Mar 2016 22:16:01 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:35886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahpNs-0004PE-5x for qemu-devel@nongnu.org; Sun, 20 Mar 2016 22:15:57 -0400 Received: by mail-pf0-x242.google.com with SMTP id q129so28069574pfb.3 for ; Sun, 20 Mar 2016 19:15:56 -0700 (PDT) References: <1456969373-6741-1-git-send-email-aik@ozlabs.ru> <20160304033926.GV1620@voom.redhat.com> <56D90B58.9000803@ozlabs.ru> <56DE13DB.7020000@ozlabs.ru> <20160309010410.GG22546@voom.fritz.box> From: Alexey Kardashevskiy Message-ID: <56EF5929.7030403@ozlabs.ru> Date: Mon, 21 Mar 2016 13:15:05 +1100 MIME-Version: 1.0 In-Reply-To: <20160309010410.GG22546@voom.fritz.box> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH qemu] spapr-pci: Make MMIO spacing a machine property and increase it List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Alexander Graf On 03/09/2016 12:04 PM, David Gibson wrote: > On Tue, Mar 08, 2016 at 10:50:51AM +1100, Alexey Kardashevskiy wrote: >> On 03/04/2016 03:13 PM, Alexey Kardashevskiy wrote: >>> On 03/04/2016 02:39 PM, David Gibson wrote: >>>> On Thu, Mar 03, 2016 at 12:42:53PM +1100, Alexey Kardashevskiy wrote: >>>>> The pseries machine supports multiple PHBs. Each PHB's MMIO/IO space is >>>>> mapped to the CPU address space starting at SPAPR_PCI_WINDOW_BASE plus >>>>> some offset which is calculated from PHB's index and >>>>> SPAPR_PCI_WINDOW_SPACING which is defined now as 64GB. >>>>> >>>>> Since the default 32bit DMA window is using first 2GB of MMIO space, >>>>> the amount of MMIO which the PCI devices can actually use is reduced >>>>> to 62GB. This is a problem if the user wants to use devices with >>>>> huge BARs. >>>>> >>>>> For example, 2 PCI functions of a NVIDIA K80 adapter being passed through >>>>> will exceed this limit as they have 16M + 16G + 32M BARs which >>>>> (when aligned) will need 64GB. >>>>> >>>>> This converts SPAPR_PCI_WINDOW_BASE and SPAPR_PCI_WINDOW_SPACING to >>>>> sPAPRMachineState properties. This uses old values for pseries machine >>>>> before 2.6 and increases the spacing to 128GB so MMIO space becomes 126GB. >>>>> >>>>> This changes the default value of sPAPRPHBState::mem_win_size to -1 for >>>>> pseries-2.6 and adds setup to spapr_phb_realize. >>>>> >>>>> Signed-off-by: Alexey Kardashevskiy >>>> >>>> So, in theory I dislike the spapr_pci device reaching into the machine >>>> type to get the spacing configuration. But.. I don't know of a better >>>> way to achieve the desired outcome. >>> >>> >>> We could drop @index and spacing; and request the user to specify the MMIO >>> window start (at least) for every additional PHB. >> >> So what is the decision? :) > > There isn't one. I really don't know how to handle this, trying to > talk to some people for ideas. Got any new idea? -- Alexey