[Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-28 Thread Anthony Liguori
On 02/27/2010 01:38 PM, Michael S. Tsirkin wrote: On Fri, Feb 26, 2010 at 09:18:03AM -0600, Anthony Liguori wrote: On 02/26/2010 08:49 AM, Michael S. Tsirkin wrote: KVM code needs all kind of work-arounds for KVM specific issues. It also assumes that KVM is registered at startup, so i

Re: [Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-28 Thread Michael S. Tsirkin
On Sun, Feb 28, 2010 at 03:23:06PM +, Paul Brook wrote: > > So guest can cause vhost to write to a wrong place in RAM, but it can > > just pass a wrong address directly. > > That's not the point. Obviously any DMA capable device can be used to > compromise a system. However if a device writ

Re: [Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-28 Thread Paul Brook
> So guest can cause vhost to write to a wrong place in RAM, but it can > just pass a wrong address directly. That's not the point. Obviously any DMA capable device can be used to compromise a system. However if a device writes to address B after being told to write to address A, then you have

Re: [Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-28 Thread Michael S. Tsirkin
On Sun, Feb 28, 2010 at 12:45:07PM +, Paul Brook wrote: > > > There certainly > > > exist machines that can change physical RAM mapping. > > > > I am talking about mapping between phy RAM offset and qemu virt address. > > When can it change without RAM in question going away? > > RAM offset

Re: [Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-28 Thread Paul Brook
> > There certainly > > exist machines that can change physical RAM mapping. > > I am talking about mapping between phy RAM offset and qemu virt address. > When can it change without RAM in question going away? RAM offset or guest physical address? The two are very different. Some machines have

Re: [Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-28 Thread Michael S. Tsirkin
On Sun, Feb 28, 2010 at 01:59:27AM +, Paul Brook wrote: > > > I'm pretty sure a guest can cause those to change and I'm not 100% > > > sure, but I think it's a potential source of exploits if you assume a > > > mapping. In the very least, a guest can trick vhost into writing to ram > > > that

Re: [Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-27 Thread Paul Brook
> > I'm pretty sure a guest can cause those to change and I'm not 100% > > sure, but I think it's a potential source of exploits if you assume a > > mapping. In the very least, a guest can trick vhost into writing to ram > > that it wouldn't normally write to. > > This seems harmless. guest can

[Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-27 Thread Michael S. Tsirkin
On Fri, Feb 26, 2010 at 09:18:03AM -0600, Anthony Liguori wrote: > On 02/26/2010 08:49 AM, Michael S. Tsirkin wrote: >> >> KVM code needs all kind of work-arounds for KVM specific issues. >> It also assumes that KVM is registered at startup, so it >> does not try to optimize finding slots. >> >

[Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-26 Thread Anthony Liguori
On 02/26/2010 08:49 AM, Michael S. Tsirkin wrote: KVM code needs all kind of work-arounds for KVM specific issues. It also assumes that KVM is registered at startup, so it does not try to optimize finding slots. No, the slot mapping changes dynamically so KVM certainly needs to optimize t

[Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-26 Thread Michael S. Tsirkin
On Fri, Feb 26, 2010 at 08:38:27AM -0600, Anthony Liguori wrote: > On 02/26/2010 08:32 AM, Michael S. Tsirkin wrote: >>> and >>> --enable-vhost/--disable-vhost options. >>> >>> >> I don't really see why we need --enable-vhost/--disable-vhost. >> Runtime flag is enough. >> > > So that pack

[Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-26 Thread Michael S. Tsirkin
On Thu, Feb 25, 2010 at 01:44:34PM -0600, Anthony Liguori wrote: > On 02/25/2010 12:28 PM, Michael S. Tsirkin wrote: >> This adds vhost net device support in qemu. Will be tied to tap device >> and virtio by following patches. Raw backend is currently missing, >> will be worked on/submitted separa

[Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-26 Thread Anthony Liguori
On 02/26/2010 08:32 AM, Michael S. Tsirkin wrote: and --enable-vhost/--disable-vhost options. I don't really see why we need --enable-vhost/--disable-vhost. Runtime flag is enough. So that packagers can disable features at build time that they don't want to support. Regards, Ant

[Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-26 Thread Michael S. Tsirkin
On Thu, Feb 25, 2010 at 08:04:21PM +0100, Juan Quintela wrote: > "Michael S. Tsirkin" wrote: > > This adds vhost net device support in qemu. Will be tied to tap device > > and virtio by following patches. Raw backend is currently missing, > > will be worked on/submitted separately. > > > > +obj-

[Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-25 Thread Anthony Liguori
On 02/25/2010 12:28 PM, Michael S. Tsirkin wrote: This adds vhost net device support in qemu. Will be tied to tap device and virtio by following patches. Raw backend is currently missing, will be worked on/submitted separately. Signed-off-by: Michael S. Tsirkin --- Makefile.target |2 +

[Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-25 Thread Juan Quintela
"Michael S. Tsirkin" wrote: > This adds vhost net device support in qemu. Will be tied to tap device > and virtio by following patches. Raw backend is currently missing, > will be worked on/submitted separately. > +obj-y += vhost_net.o +obj-$(CONFIG_VHOST_NET) += vhost.o hy is vhost_net.o confi