From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0OCZ-0005uu-3i for qemu-devel@nongnu.org; Fri, 27 Jun 2014 00:56:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0OCQ-00053X-2t for qemu-devel@nongnu.org; Fri, 27 Jun 2014 00:55:55 -0400 Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]:48766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0OCP-00053S-Qr for qemu-devel@nongnu.org; Fri, 27 Jun 2014 00:55:45 -0400 Received: by mail-wg0-f47.google.com with SMTP id k14so4612983wgh.18 for ; Thu, 26 Jun 2014 21:55:44 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53ACF94D.20206@redhat.com> Date: Fri, 27 Jun 2014 06:55:41 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <53AC2892.6030509@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] About AddressSpace in intel-iommu emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Le Tan Cc: Jan Kiszka , qemu-devel Il 27/06/2014 04:08, Le Tan ha scritto: > 1. In struct IOMMUTLBEntry, I think the addr_mask field should be the > mask of the page offset, right? But I see different usages of this > field. In spapr_tce_translate_iommu(), the addr_mask field is assigned > with the mask of the page offset. However, in pbm_translate_iommu(), > in the passthrough case, the addr_mask field seems to be assigned the > mask of the page number. Is there any problem here? The intended usage is the one of spapr_tce_translate_iommu(). In practice it doesn't matter, both work. > 2. For q35, how to identify origination of DMA requests? The VT-d > manual says we should use source-id(for PCI-Express devices, it is > requester identifier) to map devices to domains. What is the related > part in QEMU? Where can I get the source-id of a DMA request? You need to create a different AddressSpace for each PCI bus or device. Paolo