All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Duan, Zhenzhong" <zhenzhong.duan@intel.com>
Cc: Peter Xu <peterx@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	 "mst@redhat.com" <mst@redhat.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"marcel.apfelbaum@gmail.com" <marcel.apfelbaum@gmail.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	 "richard.henderson@linaro.org" <richard.henderson@linaro.org>,
	"eduardo@habkost.net" <eduardo@habkost.net>,
	 "david@redhat.com" <david@redhat.com>,
	"philmd@linaro.org" <philmd@linaro.org>
Subject: Re: [PATCH v3] memory: Optimize replay of guest mapping
Date: Wed, 19 Apr 2023 10:49:48 +0100	[thread overview]
Message-ID: <CAFEAcA9tF0Rz-EsdKRVjgoyoZb-W5y_tvvGwcJ1FKTbz=GetLA@mail.gmail.com> (raw)
In-Reply-To: <SJ0PR11MB6744AADC581774FBEFFD458992629@SJ0PR11MB6744.namprd11.prod.outlook.com>

On Wed, 19 Apr 2023 at 03:38, Duan, Zhenzhong <zhenzhong.duan@intel.com> wrote:

> >> The documentation for the replay method of IOMMUMemoryRegionClass
> >> says:
> >>      * The default implementation of memory_region_iommu_replay() is to
> >>      * call the IOMMU translate method for every page in the address space
> >>      * with flag == IOMMU_NONE and then call the notifier if translate
> >>      * returns a valid mapping. If this method is implemented then it
> >>      * overrides the default behaviour, and must provide the full semantics
> >>      * of memory_region_iommu_replay(), by calling @notifier for every
> >>      * translation present in the IOMMU.
> >>
> >> This commit changes the default implementation so it's no longer doing
> >> this for every page in the address space. If the change is correct, we
> >> should update the doc comment too.
> >>
> >> Oddly, the doc comment for memory_region_iommu_replay() itself doesn't
> >> very clearly state what its semantics are; it could probably be
> >> improved.
> >>
> >> Anyway, this change is OK for the TCG use of iommu notifiers, because
> >> that doesn't care about replay.
> >
> >Since the notifier contains the range information I'd say the change shouldn't
> >affect any caller but only a pure performance difference.  Indeed it'll be nicer
> >the documentation can be updated too.  Thanks,

> Thanks Peter Maydell and Peter Xu's comments, will add doc update.
> May I ask if it's preferred to add doc update to this patch or a separate patch?

I suggest doing it in this same patch.

thanks
-- PMM


      reply	other threads:[~2023-04-19  9:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13 11:00 [PATCH v3] memory: Optimize replay of guest mapping Zhenzhong Duan
2023-04-13 18:53 ` Peter Xu
2023-04-18 10:13 ` Peter Maydell
2023-04-18 13:56   ` Peter Xu
2023-04-19  2:38     ` Duan, Zhenzhong
2023-04-19  9:49       ` Peter Maydell [this message]

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='CAFEAcA9tF0Rz-EsdKRVjgoyoZb-W5y_tvvGwcJ1FKTbz=GetLA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=david@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=jasowang@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=zhenzhong.duan@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.