All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: Jason Wang <jasowang@redhat.com>,
	"Liu, Yi L" <yi.l.liu@intel.com>,
	"yi.y.sun@linux.intel.com" <yi.y.sun@linux.intel.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"mst@redhat.com" <mst@redhat.com>
Subject: Re: [PATCH V2 4/4] intel-iommu: PASID support
Date: Fri, 22 Apr 2022 11:03:51 -0400	[thread overview]
Message-ID: <YmLD12KqzgVDih1O@xz-m1.local> (raw)
In-Reply-To: <BL1PR11MB5271E349257909AB5754E7A78CE39@BL1PR11MB5271.namprd11.prod.outlook.com>

On Sat, Apr 02, 2022 at 07:27:15AM +0000, Tian, Kevin wrote:
> > > > > Earlier when Yi proposed Qemu changes for guest SVA [1] he aimed for
> > a
> > > > > coarse-grained knob design:
> > > > > --
> > > > >   Intel VT-d 3.0 introduces scalable mode, and it has a bunch of
> > capabilities
> > > > >   related to scalable mode translation, thus there are multiple
> > combinations.
> > > > >   While this vIOMMU implementation wants simplify it for user by
> > providing
> > > > >   typical combinations. User could config it by "x-scalable-mode" option.
> > > > The
> > > > >   usage is as below:
> > > > >     "-device intel-iommu,x-scalable-mode=["legacy"|"modern"]"
> > > > >
> > > > >     - "legacy": gives support for SL page table
> > > > >     - "modern": gives support for FL page table, pasid, virtual command
> > > > >     -  if not configured, means no scalable mode support, if not proper
> > > > >        configured, will throw error
> > > > > --
> > > > >
> > > > > Which way do you prefer to?
> > > > >
> > > > > [1] https://lists.gnu.org/archive/html/qemu-devel/2020-
> > 02/msg02805.html
> > > >
> > > > My understanding is that, if we want to deploy Qemu in a production
> > > > environment, we can't use the "x-" prefix. We need a full
> > > > implementation of each cap.
> > > >
> > > > E.g
> > > > -device intel-iommu,first-level=on,scalable-mode=on etc.
> > > >
> > >
> > > You meant each cap will get a separate control option?
> > >
> > > But that way requires the management stack or admin to have deep
> > > knowledge about how combinations of different capabilities work, e.g.
> > > if just turning on scalable mode w/o first-level cannot support vSVA
> > > on assigned devices. Is this a common practice when defining Qemu
> > > parameters?
> > 
> > We can have a safe and good default value for each cap. E.g
> > 
> > In qemu 8.0 we think scalable is mature, we can make scalable to be
> > enabled by default
> > in qemu 8.1 we think first-level is mature, we can make first level to
> > be enabled by default.
> > 
> 
> OK, that is a workable way.

Sorry again for a very late comment, I think I agree with both of you. :-)

For debugging purpose parameters like pasid-mode, I'd suggest we make the
default value to be always depend on the parmaeters that we'll expose to
the user at last always with the coarse-grained way.

Assuming that's scalable-mode to be exported by plan (which sounds
reasonable), then we by default have pasid mode on if scalable-mode is
modern, otherwise off.  IMHO we don't even need to bother with turning it
on/off in machine types since we don't even declare these debugging
parameters supported, do we? :)

But these debugging parameters could be useful for debugging and triaging
for sure, keeping them always prefixed with x-.  So it makes sense to have
them when we're making intermediate steps for the whole building.

Then at some point all things stable we export scalable-mode to replace
x-scalable-mode, with an initial versioning alongside (and it doesn't need
to be started with vt-d 3.0, maybe rev3.3 or even later).

How's that sound?

Thanks,

-- 
Peter Xu



  parent reply	other threads:[~2022-04-22 15:07 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21  5:54 [PATCH V2 0/4] PASID support for Intel IOMMU Jason Wang
2022-03-21  5:54 ` [PATCH V2 1/4] intel-iommu: don't warn guest errors when getting rid2pasid entry Jason Wang
2022-03-24  8:21   ` Tian, Kevin
2022-03-28  2:27     ` Jason Wang
2022-03-28  8:53       ` Yi Liu
2022-03-29  4:52         ` Jason Wang
2022-03-30  8:16           ` Tian, Kevin
2022-03-30  8:36             ` Jason Wang
2022-04-02  7:33               ` Tian, Kevin
2022-04-06  3:33                 ` Jason Wang
2022-04-06  3:41                   ` Tian, Kevin
2022-04-22  0:13               ` Peter Xu
2022-04-22  6:24                 ` Jason Wang
2022-04-22  7:57           ` Michael S. Tsirkin
2022-03-21  5:54 ` [PATCH V2 2/4] intel-iommu: drop VTDBus Jason Wang
2022-04-22  1:17   ` Peter Xu
2022-04-22  6:26     ` Jason Wang
2022-04-22 12:55       ` Peter Xu
2022-03-21  5:54 ` [PATCH V2 3/4] intel-iommu: convert VTD_PE_GET_FPD_ERR() to be a function Jason Wang
2022-03-24  8:26   ` Tian, Kevin
2022-03-28  2:27     ` Jason Wang
2022-04-22 13:08   ` Peter Xu
2022-03-21  5:54 ` [PATCH V2 4/4] intel-iommu: PASID support Jason Wang
2022-03-24  8:53   ` Tian, Kevin
2022-03-28  2:31     ` Jason Wang
2022-03-28  6:47       ` Tian, Kevin
2022-03-29  4:46         ` Jason Wang
2022-03-30  8:00           ` Tian, Kevin
2022-03-30  8:32             ` Jason Wang
2022-04-02  7:27               ` Tian, Kevin
2022-04-06  3:31                 ` Jason Wang
2022-04-22 15:03                 ` Peter Xu [this message]
2022-04-23 16:51                   ` Michael S. Tsirkin
2022-03-28  7:03   ` Tian, Kevin
2022-03-29  4:48     ` Jason Wang
2022-03-30  8:02       ` Tian, Kevin
2022-03-30  8:31         ` Jason Wang
2022-04-02  7:24           ` Tian, Kevin
2022-04-06  3:31             ` Jason Wang
2022-03-28  8:45   ` Yi Liu
2022-03-29  4:54     ` Jason Wang
2022-04-01 13:42       ` Yi Liu
2022-04-02  1:52         ` Jason Wang

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=YmLD12KqzgVDih1O@xz-m1.local \
    --to=peterx@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kevin.tian@intel.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yi.l.liu@intel.com \
    --cc=yi.y.sun@linux.intel.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.