Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-15 Thread Avi Kivity
On 10/15/2012 10:44 AM, liu ping fan wrote: > On Thu, Oct 11, 2012 at 11:48 PM, Avi Kivity 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

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-15 Thread Avi Kivity
On 10/11/2012 09:38 PM, Alex Williamson wrote: > On Thu, 2012-10-11 at 17:48 +0200, Avi Kivity 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, qem

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-15 Thread liu ping fan
On Thu, Oct 11, 2012 at 11:48 PM, Avi Kivity 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

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Alex Williamson
On Thu, 2012-10-11 at 17:48 +0200, Avi Kivity 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,

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Avi Kivity
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

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Michael S. Tsirkin
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? >

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Avi Kivity
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 su

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Michael S. Tsirkin
On Thu, Oct 11, 2012 at 03:44:10PM +0200, Avi Kivity wrote: > On 10/11/2012 03:44 PM, Michael S. Tsirkin wrote: > > On Thu, Oct 11, 2012 at 03:34:54PM +0200, Avi Kivity wrote: > >> On 10/11/2012 03:31 PM, Michael S. Tsirkin wrote: > >> > On Thu, Oct 11, 2012 at 03:27:03PM +0200, Avi Kivity wrote: >

[Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Avi Kivity
vhost doesn't support guest iommus yet, indicate it to the user by gently depositing a core on their disk. Signed-off-by: Avi Kivity --- hw/vhost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/vhost.c b/hw/vhost.c index 0b4ac3f..cd5d9f5 100644 --- a/hw/vhost.c +++ b/hw/vhost.c @@ -45

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Avi Kivity
On 10/11/2012 03:44 PM, Michael S. Tsirkin wrote: > On Thu, Oct 11, 2012 at 03:34:54PM +0200, Avi Kivity wrote: >> On 10/11/2012 03:31 PM, Michael S. Tsirkin wrote: >> > On Thu, Oct 11, 2012 at 03:27:03PM +0200, Avi Kivity wrote: >> >> vhost doesn't support guest iommus yet, indicate it to the user

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Michael S. Tsirkin
On Thu, Oct 11, 2012 at 03:34:54PM +0200, Avi Kivity wrote: > On 10/11/2012 03:31 PM, Michael S. Tsirkin wrote: > > On Thu, Oct 11, 2012 at 03:27:03PM +0200, Avi Kivity wrote: > >> vhost doesn't support guest iommus yet, indicate it to the user > >> by gently depositing a core on their disk. > >>

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Avi Kivity
On 10/11/2012 03:31 PM, Michael S. Tsirkin wrote: > On Thu, Oct 11, 2012 at 03:27:03PM +0200, Avi Kivity wrote: >> vhost doesn't support guest iommus yet, indicate it to the user >> by gently depositing a core on their disk. >> >> Signed-off-by: Avi Kivity > > Actually there is no problem. virti

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Michael S. Tsirkin
On Thu, Oct 11, 2012 at 03:27:03PM +0200, Avi Kivity wrote: > vhost doesn't support guest iommus yet, indicate it to the user > by gently depositing a core on their disk. > > Signed-off-by: Avi Kivity Actually there is no problem. virtio bypasses an IOMMU, so vhost works fine by writing into gue