From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Busch Subject: Re: Requirement to get BAR pci_bus_address in user space Date: Thu, 14 Jun 2018 08:42:03 -0600 Message-ID: <20180614144203.GA8129@localhost.localdomain> References: <20180614102001.GA20836@lst.de> <92a9eeced36f863458ca2fd029f17a20@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Sinan Kaya , linux-pci-owner@vger.kernel.org, Abhishek Shah , kvm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, Vikram Prakash , Alex Williamson , Bjorn Helgaas , Christoph Hellwig To: Srinath Mannam Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Thu, Jun 14, 2018 at 04:18:15PM +0530, Srinath Mannam wrote: > The issue is, For CMB cards SQs are allocated inside device BAR memory > which is different from normal cards. > In Normal cards SQ memory allocated at host side. > In both the cases physical address of CQ memory is programmed in NVMe > controller register. > This method works for normal cards because CQ memory is at host side. > But in CMB cards pci bus address equivalent to CQ memory needs to program. How do you know if the address that you can see is even the real bus address? You could be running against a direct assigned device in a guest where you don't get to see the actual bus address.