From: Halil Pasic <pasic@linux.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>,
Jason Wang <jasowang@redhat.com>,
qemu-devel@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [PATCH V2] vhost: correctly turn on VIRTIO_F_IOMMU_PLATFORM
Date: Tue, 3 Mar 2020 15:44:18 +0100 [thread overview]
Message-ID: <20200303154418.43317b1d.pasic@linux.ibm.com> (raw)
In-Reply-To: <20200227104233-mutt-send-email-mst@kernel.org>
On Thu, 27 Feb 2020 10:47:22 -0500
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> On Thu, Feb 27, 2020 at 02:02:15PM +0100, Halil Pasic wrote:
> > On Wed, 26 Feb 2020 11:52:26 -0500
> > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> >
> > > On Wed, Feb 26, 2020 at 04:36:18PM +0100, Halil Pasic wrote:
> > > > On Wed, 26 Feb 2020 08:37:13 -0500
> > > > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > > >
> > > > > On Wed, Feb 26, 2020 at 02:28:39PM +0100, Halil Pasic wrote:
> > > > > > On Wed, 26 Feb 2020 17:43:57 +0800
> > > > > > Jason Wang <jasowang@redhat.com> wrote:
> > > > > >
> > > > > > > We turn on device IOTLB via VIRTIO_F_IOMMU_PLATFORM unconditionally on
> > > > > > > platform without IOMMU support. This can lead unnecessary IOTLB
> > > > > > > transactions which will damage the performance.
> > > > > > >
> > > > > > > Fixing this by check whether the device is backed by IOMMU and disable
> > > > > > > device IOTLB.
> > > > > > >
> > > > > > > Reported-by: Halil Pasic <pasic@linux.ibm.com>
> > > > > > > Fixes: c471ad0e9bd46 ("vhost_net: device IOTLB support")
> > > > > > > Cc: qemu-stable@nongnu.org
> > > > > > > Signed-off-by: Jason Wang <jasowang@redhat.com>
> > > > > >
> > > > > > Tested-by: Halil Pasic <pasic@linux.ibm.com>
> > > > > > Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
> > > > > >
> > > > > > Thank you very much for fixing this! BTW as I mentioned before it
> > > > > > fixes vhost-vsock with iommu_platform=on as well.
> > > > >
> > > > > Fixes as in improves performance?
> > > >
> > > > No, fixes like one does not get something like:
> > > > qemu-system-s390x: vhost_set_features failed: Operation not supported (95)
> > > > qemu-system-s390x: Error starting vhost: 95
> > > > any more.
> > > >
> > > > Regards,
> > > > Halil
> > > >
> > > > [..]
> > >
> > > But can commit c471ad0e9bd46 actually boot a secure guest
> > > where iommu_platform=on is required?
> > >
> >
> > No, of course it can not. But I'm not sure about AMD SEV. AFAIU without
> > Jason's patch it does not work for AMD SEV. Tom already stated that with
> > SEV they don't need the IOVA translation aspect of ACCESS_PLATFORM, but
> > I have no idea if the condition vdev->dma_as == &address_space_memory
> > catches them as well or not. They probably have !=.
> >
> > CCing Tom. @Tom does vhost-vsock work for you with SEV and current qemu?
> >
> > Also, one can specify iommu_platform=on on a device that ain't a part of
> > a secure-capable VM, just for the fun of it. And that breaks
> > vhost-vsock. Or is setting iommu_platform=on only valid if
> > qemu-system-s390x is protected virtualization capable?
> >
> > BTW, I don't have a strong opinion on the fixes tag. We currently do not
> > recommend setting iommu_platform, and thus I don't think we care too
> > much about past qemus having problems with it.
> >
> > Regards,
> > Halil
>
>
> Let's just say if we do have a Fixes: tag we want to set it correctly to
> the commit that needs this fix.
>
You are absolutely correct. And c471ad0e9bd46 has nothing to do with
vsock. On s390x the situation with virtio-net + vhost + iommu_platform=on
seems rather complex. I did some digging, but I have no conclusive
results yet. And I don't think we care all that much for iommu_platform=on
for old qemus.
Regards,
Halil
next prev parent reply other threads:[~2020-03-03 14:46 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 9:43 [PATCH V2] vhost: correctly turn on VIRTIO_F_IOMMU_PLATFORM Jason Wang
2020-02-26 9:53 ` Michael S. Tsirkin
2020-02-26 10:17 ` Jason Wang
2020-02-26 11:44 ` Michael S. Tsirkin
2020-02-26 12:50 ` Halil Pasic
2020-02-26 12:55 ` Halil Pasic
2020-02-26 13:45 ` Michael S. Tsirkin
2020-02-26 13:28 ` Halil Pasic
2020-02-26 13:37 ` Michael S. Tsirkin
2020-02-26 15:36 ` Halil Pasic
2020-02-26 16:52 ` Michael S. Tsirkin
2020-02-27 13:02 ` Halil Pasic
2020-02-27 15:47 ` Michael S. Tsirkin
2020-03-03 14:44 ` Halil Pasic [this message]
2020-03-13 12:44 ` Halil Pasic
2020-03-13 15:29 ` Michael S. Tsirkin
2020-03-13 16:31 ` Peter Xu
2020-03-16 16:57 ` Halil Pasic
2020-03-16 17:31 ` Peter Xu
2020-03-16 17:19 ` Michael S. Tsirkin
2020-03-16 18:14 ` Peter Xu
2020-03-17 3:04 ` Jason Wang
2020-03-17 14:13 ` Peter Xu
2020-03-18 2:06 ` Jason Wang
2020-03-17 6:28 ` Michael S. Tsirkin
2020-03-17 14:39 ` Peter Xu
2020-03-17 14:55 ` Michael S. Tsirkin
2020-03-13 20:27 ` Brijesh Singh
2020-03-14 18:22 ` Michael S. Tsirkin
2020-02-27 20:36 ` Tom Lendacky
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=20200303154418.43317b1d.pasic@linux.ibm.com \
--to=pasic@linux.ibm.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=thomas.lendacky@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).