Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-25 Thread Yu Zhang
On Tue, Dec 25, 2018 at 12:00:08PM -0500, Michael S. Tsirkin wrote: > On Sat, Dec 22, 2018 at 08:41:37AM +0800, Yu Zhang wrote: > > On Fri, Dec 21, 2018 at 01:10:13PM -0500, Michael S. Tsirkin wrote: > > > On Sat, Dec 22, 2018 at 01:34:01AM +0800, Yu Zhang wrote: > > > > On Fri, Dec 21, 2018 at

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-25 Thread Michael S. Tsirkin
On Sat, Dec 22, 2018 at 08:41:37AM +0800, Yu Zhang wrote: > On Fri, Dec 21, 2018 at 01:10:13PM -0500, Michael S. Tsirkin wrote: > > On Sat, Dec 22, 2018 at 01:34:01AM +0800, Yu Zhang wrote: > > > On Fri, Dec 21, 2018 at 12:15:26PM -0500, Michael S. Tsirkin wrote: > > > > On Sat, Dec 22, 2018 at

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-24 Thread Tian, Kevin
> From: Yu Zhang > Sent: Saturday, December 22, 2018 1:34 AM > [...] > > > > > As to the check against hardware IOMMU, Peter once had a proposal in > > > http://lists.nongnu.org/archive/html/qemu-devel/2018- > 11/msg02281.html > > > > > > Do you have any comment or suggestion on Peter's proposal?

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-21 Thread Yu Zhang
On Fri, Dec 21, 2018 at 01:10:13PM -0500, Michael S. Tsirkin wrote: > On Sat, Dec 22, 2018 at 01:34:01AM +0800, Yu Zhang wrote: > > On Fri, Dec 21, 2018 at 12:15:26PM -0500, Michael S. Tsirkin wrote: > > > On Sat, Dec 22, 2018 at 12:19:20AM +0800, Yu Zhang wrote: > > > > > I'd like to avoid poking

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-21 Thread Michael S. Tsirkin
On Sat, Dec 22, 2018 at 01:34:01AM +0800, Yu Zhang wrote: > On Fri, Dec 21, 2018 at 12:15:26PM -0500, Michael S. Tsirkin wrote: > > On Sat, Dec 22, 2018 at 12:19:20AM +0800, Yu Zhang wrote: > > > > I'd like to avoid poking at the CPU from VTD code. That's all. > > > > > > OK. So for the short

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-21 Thread Yu Zhang
On Fri, Dec 21, 2018 at 12:15:26PM -0500, Michael S. Tsirkin wrote: > On Sat, Dec 22, 2018 at 12:19:20AM +0800, Yu Zhang wrote: > > > I'd like to avoid poking at the CPU from VTD code. That's all. > > > > OK. So for the short term,how about I remove the check of host cpu, and add > > a TODO > >

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-21 Thread Michael S. Tsirkin
On Sat, Dec 22, 2018 at 12:19:20AM +0800, Yu Zhang wrote: > > I'd like to avoid poking at the CPU from VTD code. That's all. > > OK. So for the short term,how about I remove the check of host cpu, and add a > TODO > in the comments in vtd_decide_config()? My question would be what happens on

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-21 Thread Yu Zhang
On Thu, Dec 20, 2018 at 01:28:21PM -0500, Michael S. Tsirkin wrote: > On Thu, Dec 20, 2018 at 01:49:21PM +0800, Yu Zhang wrote: > > On Wed, Dec 19, 2018 at 10:23:44AM -0500, Michael S. Tsirkin wrote: > > > On Wed, Dec 19, 2018 at 01:57:43PM +0800, Yu Zhang wrote: > > > > On Tue, Dec 18, 2018 at

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-20 Thread Michael S. Tsirkin
On Thu, Dec 20, 2018 at 01:49:21PM +0800, Yu Zhang wrote: > On Wed, Dec 19, 2018 at 10:23:44AM -0500, Michael S. Tsirkin wrote: > > On Wed, Dec 19, 2018 at 01:57:43PM +0800, Yu Zhang wrote: > > > On Tue, Dec 18, 2018 at 11:35:34PM -0500, Michael S. Tsirkin wrote: > > > > On Wed, Dec 19, 2018 at

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-19 Thread Yu Zhang
On Wed, Dec 19, 2018 at 10:23:44AM -0500, Michael S. Tsirkin wrote: > On Wed, Dec 19, 2018 at 01:57:43PM +0800, Yu Zhang wrote: > > On Tue, Dec 18, 2018 at 11:35:34PM -0500, Michael S. Tsirkin wrote: > > > On Wed, Dec 19, 2018 at 11:40:06AM +0800, Yu Zhang wrote: > > > > On Tue, Dec 18, 2018 at

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-19 Thread Michael S. Tsirkin
On Wed, Dec 19, 2018 at 01:57:43PM +0800, Yu Zhang wrote: > On Tue, Dec 18, 2018 at 11:35:34PM -0500, Michael S. Tsirkin wrote: > > On Wed, Dec 19, 2018 at 11:40:06AM +0800, Yu Zhang wrote: > > > On Tue, Dec 18, 2018 at 09:49:02AM -0500, Michael S. Tsirkin wrote: > > > > On Tue, Dec 18, 2018 at

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-18 Thread Yu Zhang
On Tue, Dec 18, 2018 at 11:35:34PM -0500, Michael S. Tsirkin wrote: > On Wed, Dec 19, 2018 at 11:40:06AM +0800, Yu Zhang wrote: > > On Tue, Dec 18, 2018 at 09:49:02AM -0500, Michael S. Tsirkin wrote: > > > On Tue, Dec 18, 2018 at 09:45:41PM +0800, Yu Zhang wrote: > > > > On Tue, Dec 18, 2018 at

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-18 Thread Michael S. Tsirkin
On Wed, Dec 19, 2018 at 11:40:06AM +0800, Yu Zhang wrote: > On Tue, Dec 18, 2018 at 09:49:02AM -0500, Michael S. Tsirkin wrote: > > On Tue, Dec 18, 2018 at 09:45:41PM +0800, Yu Zhang wrote: > > > On Tue, Dec 18, 2018 at 07:43:28AM -0500, Michael S. Tsirkin wrote: > > > > On Tue, Dec 18, 2018 at

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-18 Thread Yu Zhang
On Tue, Dec 18, 2018 at 09:49:02AM -0500, Michael S. Tsirkin wrote: > On Tue, Dec 18, 2018 at 09:45:41PM +0800, Yu Zhang wrote: > > On Tue, Dec 18, 2018 at 07:43:28AM -0500, Michael S. Tsirkin wrote: > > > On Tue, Dec 18, 2018 at 06:01:16PM +0800, Yu Zhang wrote: > > > > On Tue, Dec 18, 2018 at

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2018 at 06:01:16PM +0800, Yu Zhang wrote: > On Tue, Dec 18, 2018 at 05:47:14PM +0800, Yu Zhang wrote: > > On Mon, Dec 17, 2018 at 02:29:02PM +0100, Igor Mammedov wrote: > > > On Wed, 12 Dec 2018 21:05:39 +0800 > > > Yu Zhang wrote: > > > > > > > A 5-level paging capable VM may

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2018 at 09:45:41PM +0800, Yu Zhang wrote: > On Tue, Dec 18, 2018 at 07:43:28AM -0500, Michael S. Tsirkin wrote: > > On Tue, Dec 18, 2018 at 06:01:16PM +0800, Yu Zhang wrote: > > > On Tue, Dec 18, 2018 at 05:47:14PM +0800, Yu Zhang wrote: > > > > On Mon, Dec 17, 2018 at 02:29:02PM

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-18 Thread Yu Zhang
On Tue, Dec 18, 2018 at 07:43:28AM -0500, Michael S. Tsirkin wrote: > On Tue, Dec 18, 2018 at 06:01:16PM +0800, Yu Zhang wrote: > > On Tue, Dec 18, 2018 at 05:47:14PM +0800, Yu Zhang wrote: > > > On Mon, Dec 17, 2018 at 02:29:02PM +0100, Igor Mammedov wrote: > > > > On Wed, 12 Dec 2018 21:05:39

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-18 Thread Yu Zhang
On Tue, Dec 18, 2018 at 05:47:14PM +0800, Yu Zhang wrote: > On Mon, Dec 17, 2018 at 02:29:02PM +0100, Igor Mammedov wrote: > > On Wed, 12 Dec 2018 21:05:39 +0800 > > Yu Zhang wrote: > > > > > A 5-level paging capable VM may choose to use 57-bit IOVA address width. > > > E.g. guest applications

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-18 Thread Yu Zhang
On Mon, Dec 17, 2018 at 02:29:02PM +0100, Igor Mammedov wrote: > On Wed, 12 Dec 2018 21:05:39 +0800 > Yu Zhang wrote: > > > A 5-level paging capable VM may choose to use 57-bit IOVA address width. > > E.g. guest applications may prefer to use its VA as IOVA when performing > > VFIO map/unmap

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-17 Thread Igor Mammedov
On Wed, 12 Dec 2018 21:05:39 +0800 Yu Zhang wrote: > A 5-level paging capable VM may choose to use 57-bit IOVA address width. > E.g. guest applications may prefer to use its VA as IOVA when performing > VFIO map/unmap operations, to avoid the burden of managing the IOVA space. > > This patch

[Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-12 Thread Yu Zhang
A 5-level paging capable VM may choose to use 57-bit IOVA address width. E.g. guest applications may prefer to use its VA as IOVA when performing VFIO map/unmap operations, to avoid the burden of managing the IOVA space. This patch extends the current vIOMMU logic to cover the extended address