[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used |
Date: |
Mon, 15 Oct 2012 12:32:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
On 10/15/2012 10:44 AM, liu ping fan wrote:
> On Thu, Oct 11, 2012 at 11:48 PM, Avi Kivity <address@hidden> wrote:
>> On 10/11/2012 05:34 PM, Michael S. Tsirkin wrote:
>>> On Thu, Oct 11, 2012 at 04:35:23PM +0200, Avi Kivity wrote:
>>>> On 10/11/2012 04:35 PM, Michael S. Tsirkin wrote:
>>>>
>>>> >> No, qemu should configure virtio devices to bypass the iommu, even if it
>>>> >> is on.
>>>> >
>>>> > Okay so there will be some API that virtio devices should call
>>>> > to achieve this?
>>>>
>>>> The iommu should probably call pci_device_bypasses_iommu() to check for
>>>> such devices.
>>>
>>> So maybe this patch should depend on the introduction of such
>>> an API.
>>
>> I've dropped it for now.
>>
>> In fact, virtio/vhost are safe since they use cpu_physical_memory_rw()
>> and the memory listener watches address_space_memory, no iommu there.
>
> Not quite sure your meaning. My understanding is that as a pci
> device, vhost can lie behind a iommu in topology, which result in the
> transaction launched can be snapped by the emulated iommu. BUT we make
> a exception for vhost-dev and enforce
> address_space_rw(address_space_memory, ..) NOT
> address_space_rw(pci_dev->bus_master_as,..) for vhost device, so we
> bypass the iommu. Right?
The exception is not just for vhost, but for every virtio device. So
the iommu needs to be aware of that, and if it manages a virtio device,
it needs to provide a 1:1 translation.
--
error compiling committee.c: too many arguments to function
- Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used, (continued)
- Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used, Avi Kivity, 2012/10/11
- Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used, Michael S. Tsirkin, 2012/10/11
- Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used, Avi Kivity, 2012/10/11
- Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used, Michael S. Tsirkin, 2012/10/11
- Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used, Avi Kivity, 2012/10/11
- Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used, Michael S. Tsirkin, 2012/10/11
- Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used, Avi Kivity, 2012/10/11
- Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used, Alex Williamson, 2012/10/11
- Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used, Avi Kivity, 2012/10/15
- Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used, liu ping fan, 2012/10/15
- Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used,
Avi Kivity <=
Re: [Qemu-devel] [RFC v1 0/7] IOMMU support, Benjamin Herrenschmidt, 2012/10/11