All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tian, Kevin" <kevin.tian@intel.com>
To: "Raj, Ashok" <ashok.raj@intel.com>,
	Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Cc: valmiki <valmikibow@gmail.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	"Lan, Tianyu" <tianyu.lan@intel.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"Pan, Jacob jun" <jacob.jun.pan@intel.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"Raj, Ashok" <ashok.raj@intel.com>
Subject: RE: Support SVM without PASID
Date: Mon, 14 Aug 2017 08:00:19 +0000	[thread overview]
Message-ID: <AADFC41AFE54684AB9EE6CBC0274A5D190D716A4@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20170811162506.GB41059@otc-nc-03>

> From: Raj, Ashok
> Sent: Saturday, August 12, 2017 12:25 AM
> 
> On Fri, Aug 04, 2017 at 10:42:41AM +0100, Jean-Philippe Brucker wrote:
> > Hi Kevin,
> >
> >
> > Consider the situation where a userspace driver (no virtualization) is
> > built in a client-server fashion: the server controls a device and spawns
> > new processes (clients), each sharing a context with the device using its
> > own PASID. If the server wants to hide parts of the client address space
> 
> Just to be sure, you are't expecting the PASID's to be duplicated or
> recreated after a new process is spawned. I would expect each process to
> get its own PASID by doing a bind. Threads of the same process would be
> sharing the same PASID since they all share the same first level
> mappings.
> 
> 
> > from the device (e.g. .text), then it could control stage-2 via MAP/UNMAP
> > to restrict the address space.
> 
> I'm confused.. maybe this is different from Intel IOMMU. the first level
> requiring a second level is only true when virtualization is in play.
> 
> First level is gVA->gPA, and second level is gPA->hPA (sort of the cloned
> EPT map that is setup via VFIO to set up second level)
> 
> When you are in native user application, there is no nesting between first
> and second level. The first level is directly VA->hPA. There is no need
> for a nested walk in this case?
> 

Strictly speaking nesting is just a hardware capability while 
virtualization is an use case using that capability. As long as 
some software entity (not hypervisor) can setup two level 
page tables, it should just work regardless of how the 
intermediate address is called.

I think Jean is trying to come up a non-virtualization usage
using nesting. Of course current example that he illustrated 
is not very meaningful (as I replied in another mail). :-)

Thanks
Kevin

WARNING: multiple messages have this Message-ID (diff)
From: "Tian, Kevin" <kevin.tian-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: "Raj, Ashok" <ashok.raj-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Jean-Philippe Brucker
	<jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
Cc: "Lan,
	Tianyu" <tianyu.lan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	"Pan,
	Jacob jun"
	<jacob.jun.pan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: RE: Support SVM without PASID
Date: Mon, 14 Aug 2017 08:00:19 +0000	[thread overview]
Message-ID: <AADFC41AFE54684AB9EE6CBC0274A5D190D716A4@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20170811162506.GB41059@otc-nc-03>

> From: Raj, Ashok
> Sent: Saturday, August 12, 2017 12:25 AM
> 
> On Fri, Aug 04, 2017 at 10:42:41AM +0100, Jean-Philippe Brucker wrote:
> > Hi Kevin,
> >
> >
> > Consider the situation where a userspace driver (no virtualization) is
> > built in a client-server fashion: the server controls a device and spawns
> > new processes (clients), each sharing a context with the device using its
> > own PASID. If the server wants to hide parts of the client address space
> 
> Just to be sure, you are't expecting the PASID's to be duplicated or
> recreated after a new process is spawned. I would expect each process to
> get its own PASID by doing a bind. Threads of the same process would be
> sharing the same PASID since they all share the same first level
> mappings.
> 
> 
> > from the device (e.g. .text), then it could control stage-2 via MAP/UNMAP
> > to restrict the address space.
> 
> I'm confused.. maybe this is different from Intel IOMMU. the first level
> requiring a second level is only true when virtualization is in play.
> 
> First level is gVA->gPA, and second level is gPA->hPA (sort of the cloned
> EPT map that is setup via VFIO to set up second level)
> 
> When you are in native user application, there is no nesting between first
> and second level. The first level is directly VA->hPA. There is no need
> for a nested walk in this case?
> 

Strictly speaking nesting is just a hardware capability while 
virtualization is an use case using that capability. As long as 
some software entity (not hypervisor) can setup two level 
page tables, it should just work regardless of how the 
intermediate address is called.

I think Jean is trying to come up a non-virtualization usage
using nesting. Of course current example that he illustrated 
is not very meaningful (as I replied in another mail). :-)

Thanks
Kevin

  reply	other threads:[~2017-08-14  8:00 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-08 17:03 Support SVM without PASID valmiki
2017-07-08 17:03 ` valmiki
2017-07-08 20:02 ` Alex Williamson
2017-07-08 20:02   ` Alex Williamson
2017-07-09  3:15   ` valmiki
2017-07-09  9:29     ` Liu, Yi L
2017-07-10  0:14     ` Bob Liu
2017-07-10  0:14       ` Bob Liu
2017-07-10 19:31     ` Jerome Glisse
2017-07-12 16:23       ` valmiki
2017-07-12 16:23         ` valmiki
2017-07-11 10:56     ` Jean-Philippe Brucker
2017-07-11 10:56       ` Jean-Philippe Brucker
2017-07-12 16:27       ` valmiki
2017-07-12 16:27         ` valmiki
2017-07-12 16:48         ` Jean-Philippe Brucker
2017-07-22  2:05           ` valmiki
2017-08-01  8:26             ` Jean-Philippe Brucker
2017-08-01  8:26               ` Jean-Philippe Brucker
2017-08-01 17:38               ` valmiki
2017-08-01 17:38                 ` valmiki
2017-08-01 18:40                 ` Jean-Philippe Brucker
2017-08-05  5:14                   ` valmiki
2017-08-07 10:31                     ` Jean-Philippe Brucker
2017-08-07 12:18                       ` Bob Liu
2017-08-07 12:18                         ` Bob Liu
2017-08-07 12:52                         ` Jean-Philippe Brucker
2017-08-08  0:51                           ` Bob Liu
2017-08-08  0:51                             ` Bob Liu
2017-08-09 15:01                             ` Jean-Philippe Brucker
2017-08-11  6:41                           ` Tian, Kevin
2017-08-11  9:25                             ` Jean-Philippe Brucker
2017-08-11  9:25                               ` Jean-Philippe Brucker
2017-08-11  9:36                             ` Bob Liu
2017-08-12 12:10                       ` valmiki
2017-08-14  7:49                         ` Tian, Kevin
2017-08-28 13:10                           ` Bharat Kumar Gogada
2017-08-28 13:10                             ` Bharat Kumar Gogada
2017-08-29  1:32                             ` Tian, Kevin
2017-08-04  1:49               ` Tian, Kevin
2017-08-04  1:49                 ` Tian, Kevin
2017-08-04  9:42                 ` Jean-Philippe Brucker
2017-08-11  6:29                   ` Tian, Kevin
2017-08-11  6:29                     ` Tian, Kevin
2017-08-11 16:25                   ` Raj, Ashok
2017-08-14  8:00                     ` Tian, Kevin [this message]
2017-08-14  8:00                       ` Tian, Kevin
2017-08-14  9:07                       ` Jean-Philippe Brucker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AADFC41AFE54684AB9EE6CBC0274A5D190D716A4@SHSMSX101.ccr.corp.intel.com \
    --to=kevin.tian@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=ashok.raj@intel.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jacob.jun.pan@intel.com \
    --cc=jean-philippe.brucker@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=tianyu.lan@intel.com \
    --cc=valmikibow@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.