Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-19 Thread Ira W. Snyder
On Wed, Aug 19, 2009 at 08:40:33AM +0300, Avi Kivity wrote: On 08/19/2009 03:38 AM, Ira W. Snyder wrote: On Wed, Aug 19, 2009 at 12:26:23AM +0300, Avi Kivity wrote: On 08/18/2009 11:59 PM, Ira W. Snyder wrote: On a non shared-memory system (where the guest's RAM is not just a chunk

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-19 Thread Avi Kivity
On 08/19/2009 06:28 PM, Ira W. Snyder wrote: Well, if you can't do that, you can't use virtio-pci on the host. You'll need another virtio transport (equivalent to fake pci you mentioned above). Ok. Is there something similar that I can study as an example? Should I look at virtio-pci?

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-19 Thread Ira W. Snyder
On Wed, Aug 19, 2009 at 06:37:06PM +0300, Avi Kivity wrote: On 08/19/2009 06:28 PM, Ira W. Snyder wrote: Well, if you can't do that, you can't use virtio-pci on the host. You'll need another virtio transport (equivalent to fake pci you mentioned above). Ok. Is there something

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-19 Thread Avi Kivity
On 08/19/2009 07:29 PM, Ira W. Snyder wrote: virtio-$yourhardware or maybe virtio-dma How about virtio-phys? Could work. Arnd and BenH are both looking at PPC systems (similar to mine). Grant Likely is looking at talking to an processor core running on an FPGA, IIRC. Most

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Ira W. Snyder
On Tue, Aug 18, 2009 at 11:46:06AM +0300, Michael S. Tsirkin wrote: On Mon, Aug 17, 2009 at 04:17:09PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Mon, Aug 17, 2009 at 10:14:56AM -0400, Gregory Haskins wrote: Case in point: Take an upstream kernel and you can modprobe the

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Avi Kivity
On 08/18/2009 06:53 PM, Ira W. Snyder wrote: So, in my system, copy_(to|from)_user() is completely wrong. There is no userspace, only a physical system. In fact, because normal x86 computers do not have DMA controllers, the host system doesn't actually handle any data transfer! In fact,

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Ira W. Snyder
On Tue, Aug 18, 2009 at 07:51:21PM +0300, Avi Kivity wrote: On 08/18/2009 06:53 PM, Ira W. Snyder wrote: So, in my system, copy_(to|from)_user() is completely wrong. There is no userspace, only a physical system. In fact, because normal x86 computers do not have DMA controllers, the host

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Avi Kivity
On 08/18/2009 08:27 PM, Ira W. Snyder wrote: In fact, modern x86s do have dma engines these days (google for Intel I/OAT), and one of our plans for vhost-net is to allow their use for packets above a certain size. So a patch allowing vhost-net to optionally use a dma engine is a good thing.

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Ira W. Snyder
On Tue, Aug 18, 2009 at 08:47:04PM +0300, Avi Kivity wrote: On 08/18/2009 08:27 PM, Ira W. Snyder wrote: In fact, modern x86s do have dma engines these days (google for Intel I/OAT), and one of our plans for vhost-net is to allow their use for packets above a certain size. So a patch allowing

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Avi Kivity
On 08/18/2009 09:27 PM, Ira W. Snyder wrote: I think in this case you want one side to be virtio-net (I'm guessing the x86) and the other side vhost-net (the ppc boards with the dma engine). virtio-net on x86 would communicate with userspace on the ppc board to negotiate features and get a mac

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Michael S. Tsirkin
On Tue, Aug 18, 2009 at 11:27:35AM -0700, Ira W. Snyder wrote: I haven't studied vhost-net very carefully yet. As soon as I saw the copy_(to|from)_user() I stopped reading, because it seemed useless for my case. I'll look again and try to find where vhost-net supports setting MAC addresses and

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Michael S. Tsirkin
On Tue, Aug 18, 2009 at 10:27:52AM -0700, Ira W. Snyder wrote: On Tue, Aug 18, 2009 at 07:51:21PM +0300, Avi Kivity wrote: On 08/18/2009 06:53 PM, Ira W. Snyder wrote: So, in my system, copy_(to|from)_user() is completely wrong. There is no userspace, only a physical system. In fact,

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Ira W. Snyder
On Tue, Aug 18, 2009 at 09:52:48PM +0300, Avi Kivity wrote: On 08/18/2009 09:27 PM, Ira W. Snyder wrote: I think in this case you want one side to be virtio-net (I'm guessing the x86) and the other side vhost-net (the ppc boards with the dma engine). virtio-net on x86 would communicate with

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Michael S. Tsirkin
On Tue, Aug 18, 2009 at 08:53:29AM -0700, Ira W. Snyder wrote: I think Greg is referring to something like my virtio-over-PCI patch. I'm pretty sure that vhost is completely useless for my situation. I'd like to see vhost work for my use, so I'll try to explain what I'm doing. I've got a

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Arnd Bergmann
On Tuesday 18 August 2009 20:35:22 Michael S. Tsirkin wrote: On Tue, Aug 18, 2009 at 10:27:52AM -0700, Ira W. Snyder wrote: Also, in my case I'd like to boot Linux with my rootfs over NFS. Is vhost-net capable of this? I've had Arnd, BenH, and Grant Likely (and others, privately) contact

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Avi Kivity
On 08/18/2009 11:59 PM, Ira W. Snyder wrote: On a non shared-memory system (where the guest's RAM is not just a chunk of userspace RAM in the host system), virtio's management model seems to fall apart. Feature negotiation doesn't work as one would expect. In your case, virtio-net on the

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Avi Kivity
On 08/19/2009 12:26 AM, Avi Kivity wrote: Off the top of my head, I would think that transporting userspace addresses in the ring (for copy_(to|from)_user()) vs. physical addresses (for DMAEngine) might be a problem. Pinning userspace pages into memory for DMA is a bit of a pain, though it is

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Ira W. Snyder
On Tue, Aug 18, 2009 at 11:57:48PM +0300, Michael S. Tsirkin wrote: On Tue, Aug 18, 2009 at 08:53:29AM -0700, Ira W. Snyder wrote: I think Greg is referring to something like my virtio-over-PCI patch. I'm pretty sure that vhost is completely useless for my situation. I'd like to see vhost

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Ira W. Snyder
On Wed, Aug 19, 2009 at 12:26:23AM +0300, Avi Kivity wrote: On 08/18/2009 11:59 PM, Ira W. Snyder wrote: On a non shared-memory system (where the guest's RAM is not just a chunk of userspace RAM in the host system), virtio's management model seems to fall apart. Feature negotiation doesn't

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Ira W. Snyder
On Wed, Aug 19, 2009 at 01:06:45AM +0300, Avi Kivity wrote: On 08/19/2009 12:26 AM, Avi Kivity wrote: Off the top of my head, I would think that transporting userspace addresses in the ring (for copy_(to|from)_user()) vs. physical addresses (for DMAEngine) might be a problem. Pinning

Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a vbus-proxy bus model for vbus_driver objects

2009-08-18 Thread Avi Kivity
On 08/19/2009 03:44 AM, Ira W. Snyder wrote: You don't need in fact a third mode. You can mmap the x86 address space into your ppc userspace and use the second mode. All you need then is the dma engine glue and byte swapping. Hmm, I'll have to think about that. The ppc is a 32-bit