Received: by 10.192.165.148 with SMTP id m20csp811912imm; Fri, 20 Apr 2018 16:44:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx48FqT8L6Wx+rjKUrsVQ0AYhSqtukar1oRhqNi41N9sF5vTpncjHRn3ZdBNQHWD44jMjBWDB X-Received: by 2002:a17:902:b28:: with SMTP id 37-v6mr11810531plq.207.1524267843588; Fri, 20 Apr 2018 16:44:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524267843; cv=none; d=google.com; s=arc-20160816; b=MC3vT74eMVJReDCCUsHx58cDrtEh18GLmcfWL12QXGnvGhxoFa51zHlh67egq//SLD BBKTit1I05EB9wohSv6eXWdC7ktgGLL0Sw/bw1RmZh7rGVdxUOHtWDJUKOOjn1mRKDed zR+jB5cukZBHr9low/FypXoZZwmLB64byNQEg9iFvC/RiQ5TQMGpB3JaQurOyOLiLWEY 8MzqPqfsYnFc/2PA+WrqLoNtbt0ieq9jpAhwTXPR5hZOw+l599X7s1ZmN7uKvS07lDH2 A14ikAT3PkLzZdu+4GE5URyY6oXNepqDWWom+fLGUEr4eK/B9iibUk+839a9Src85DAQ Qhpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=vbXZTufoGG7J6bBBfosHn948xr97QpyIPBIXF9l0IuY=; b=gUKe2+lzfy/ix2ECzTLgZetqM9EZf4rjoWrgVvEd4znPndr2ppu3OxV/Jc5ok+r/qt hxOWkhcysEsM27Veq77SFP7NBZrAi/ef782AV5Kp85jjeXuFEcrMHOyc8h3TJXc4ER3A DZDIr4XZED/pQYMF+UMVEnTX09B4SL51Dhuhc9OBwg2KEeFaW1NOL/ih/AyNWK/2YTGZ ZebgSLejyd2JWKLsag9IJGrbW6RY+La9QcJJrWZYmu7/04DXG5shZVy9lgC85VaMKvqr k+TD03hmF+xgWI+FAZQFogyoXExKXdcIA+KG3F6HgY4r2pparL2JYgTr0uxyMyPTO7RN V/HQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r139si4579330pfr.214.2018.04.20.16.43.26; Fri, 20 Apr 2018 16:44:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752824AbeDTXkU (ORCPT + 99 others); Fri, 20 Apr 2018 19:40:20 -0400 Received: from mga18.intel.com ([134.134.136.126]:33409 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752743AbeDTXkT (ORCPT ); Fri, 20 Apr 2018 19:40:19 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Apr 2018 16:40:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,303,1520924400"; d="scan'208";a="49586391" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.7.199.155]) by orsmga001.jf.intel.com with ESMTP; 20 Apr 2018 16:40:18 -0700 Date: Fri, 20 Apr 2018 16:42:51 -0700 From: Jacob Pan To: Jean-Philippe Brucker Cc: Alex Williamson , "iommu@lists.linux-foundation.org" , LKML , Joerg Roedel , David Woodhouse , Greg Kroah-Hartman , Rafael Wysocki , "Liu, Yi L" , "Tian, Kevin" , Raj Ashok , Jean Delvare , Christoph Hellwig , Lu Baolu , Yi L , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH v4 04/22] iommu/vt-d: add bind_pasid_table function Message-ID: <20180420164251.5245f822@jacob-builder> In-Reply-To: References: <1523915351-54415-1-git-send-email-jacob.jun.pan@linux.intel.com> <1523915351-54415-5-git-send-email-jacob.jun.pan@linux.intel.com> <20180417131047.0a9c310f@w520.home> Organization: OTC X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Apr 2018 19:25:34 +0100 Jean-Philippe Brucker wrote: > On Tue, Apr 17, 2018 at 08:10:47PM +0100, Alex Williamson wrote: > [...] > > > + /* Assign guest PASID table pointer and size order */ > > > + ctx_lo = (pasidt_binfo->base_ptr & VTD_PAGE_MASK) | > > > + (pasidt_binfo->pasid_bits - MIN_NR_PASID_BITS); > > > > Where does this IOMMU API interface define that base_ptr is 4K > > aligned or the format of the PASID table? Are these all > > standardized or do they vary by host IOMMU? If they're standards, > > maybe we could note that and the spec which defines them when we > > declare base_ptr. If they're IOMMU specific then I don't > > understand how we'll match a user provided PASID table to the > > requirements and format of the host IOMMU. Thanks, > > On SMMUv3 the minimum alignment for base_ptr is 64 bytes, so a guest > under a vSMMU might pass a pointer that's not aligned on 4k. > PASID table pointer for VT-d is 4K aligned. > Maybe this information could be part of the data passed to userspace > about IOMMU table formats and features? They're not part of this > series, but I think we wanted to communicate IOMMU-specific features > via sysfs. > Agreed, I believe Yi Liu is working on a sysfs interface such that QEMU can match IOMMU model and features.