All of lore.kernel.org
 help / color / mirror / Atom feed
From: Auger Eric <eric.auger@redhat.com>
To: Peter Xu <peterx@redhat.com>, Jason Wang <jasowang@redhat.com>
Cc: "Michael S . Tsirkin" <mst@redhat.com>,
	Jean-Philippe Brucker <Jean-Philippe.Brucker@arm.com>,
	Greg Kurz <groug@kaod.org>,
	qemu-devel@nongnu.org, Eugenio Perez Martin <eperezma@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support
Date: Mon, 8 Feb 2021 21:30:56 +0100	[thread overview]
Message-ID: <77da729f-52d7-8282-9248-74febe61a37b@redhat.com> (raw)
In-Reply-To: <20210208183721.GB68242@xz-x1>

Hi,

[Adding David and Greg in CC]


On 2/8/21 7:37 PM, Peter Xu wrote:
> On Mon, Feb 08, 2021 at 11:21:23AM +0800, Jason Wang wrote:
> 
> [...]
> 
>>> I'm not sure I remember it right, but we seem to have similar discussion
>>> previously on "what if the user didn't specify ats=on" - I think at that time
>>> the conclusion was that we ignore the failure since that's not a valid
>>> configuration for qemu.
>>
>>
>> Yes, but I think I was wrong at that time.
> 
> I can't say you're wrong - I actually still agree with you that at least
> there's a priority of things we'd do, and this one is not extremely important
> if that's not a major use case (say, if you will 100% always suggest an user to
> use ats=on for a viommu enabled vhost).
> 
>>>
>>> The other issue I'm worried is (I think I mentioned it somewhere, but just to
>>> double confirm): I'd like to make sure SMMU and virtio-iommu are the only IOMMU
>>> platform that will use vhost.
>>
>>
>> For upstream, it won't be easy :)
> 
> Sorry I definitely didn't make myself clear... :)
> 
> To be explicit, does ppc use vhost kernel too?  Since I know at least ppc has
> its own translation unit and its iommu notifier in qemu, so I'm unsure whether
> the same patch would break ppc too, because vhost could also ignore all UNMAP
> sent by the ppc vIOMMU.
> 
>>
>>
>>>    Otherwise IIUC we need to fix those vIOMMUs too.
>>
>>
>> Right, last time I check AMD IOMMU emulation, it simply trigger device IOTLB
>> invalidation during IOTLB invalidation which looks wrong.
> 
> I did quickly grep IOMMU_NOTIFIER_UNMAP in amd_iommu.c and saw nothing. It
> seems amd iommu is not ready for any kind of IOMMU notifiers yet.

for context, we experienced a regression with vsmmuv3/vhost and
virtio-iommu/vhost integration. We wondered whether the ppc viommu is
able to protect vhost devices and if this relies on legacy
IOMMU_NOTIFIER_UNMAP notifiers. ie. vhost does not register this
notifier anymore but instead register dev-iotlb unmap notifier.

Thanks

Eric
> 
> Thanks,
> 



  reply	other threads:[~2021-02-08 22:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 19:12 [PATCH] vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support Peter Xu
2021-02-05  3:16 ` Jason Wang
2021-02-05  8:33   ` Auger Eric
2021-02-05 15:31     ` Peter Xu
2021-02-07  9:04       ` Tian, Kevin
2021-02-07 14:47         ` Peter Xu
2021-02-08  7:03           ` Tian, Kevin
2021-02-08 18:26             ` Peter Xu
2021-02-10  4:05               ` Jason Wang
2021-02-08 20:23           ` Auger Eric
2021-02-08  3:21       ` Jason Wang
2021-02-08 18:37         ` Peter Xu
2021-02-08 20:30           ` Auger Eric [this message]
2021-02-09  3:12           ` Jason Wang
2021-02-09 17:15             ` Auger Eric
2021-02-09 19:46               ` Peter Xu

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=77da729f-52d7-8282-9248-74febe61a37b@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=Jean-Philippe.Brucker@arm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=eperezma@redhat.com \
    --cc=groug@kaod.org \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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.