Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-04-01 Thread Michael S. Tsirkin
On Fri, Apr 01, 2011 at 08:12:48AM +0100, Peter Maydell wrote: > On 31 March 2011 22:38, Michael S. Tsirkin wrote: > > On Thu, Mar 31, 2011 at 10:32:11PM +0100, Peter Maydell wrote: > >> On 31 March 2011 21:23, Anthony Liguori wrote: > >> > Maybe the right approach here is to just use a virtio sp

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-04-01 Thread Peter Maydell
On 31 March 2011 22:38, Michael S. Tsirkin wrote: > On Thu, Mar 31, 2011 at 10:32:11PM +0100, Peter Maydell wrote: >> On 31 March 2011 21:23, Anthony Liguori wrote: >> > Maybe the right approach here is to just use a virtio specific API and >> > register RAM as register_virtio_dma_area(). >> >> T

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Michael S. Tsirkin
On Thu, Mar 31, 2011 at 07:44:35PM -0500, Anthony Liguori wrote: > On 03/31/2011 06:42 PM, Michael S. Tsirkin wrote: > >On Thu, Mar 31, 2011 at 04:49:46PM -0500, Anthony Liguori wrote: > >>On 03/31/2011 04:38 PM, Michael S. Tsirkin wrote: > That seems like a clearer API, yes. I think it makes i

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Anthony Liguori
On 03/31/2011 06:42 PM, Michael S. Tsirkin wrote: On Thu, Mar 31, 2011 at 04:49:46PM -0500, Anthony Liguori wrote: On 03/31/2011 04:38 PM, Michael S. Tsirkin wrote: That seems like a clearer API, yes. I think it makes it much more obvious what it's trying to achieve. -- PMM Maybe register_dma

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Michael S. Tsirkin
On Thu, Mar 31, 2011 at 04:49:46PM -0500, Anthony Liguori wrote: > On 03/31/2011 04:38 PM, Michael S. Tsirkin wrote: > > > >>That seems like a clearer API, yes. I think it makes it much more > >>obvious what it's trying to achieve. > >> > >>-- PMM > >Maybe register_dma_area - its' not 100% virtio s

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Anthony Liguori
On 03/31/2011 04:38 PM, Michael S. Tsirkin wrote: That seems like a clearer API, yes. I think it makes it much more obvious what it's trying to achieve. -- PMM Maybe register_dma_area - its' not 100% virtio specific. It's never been clear to me whether that's true or not. I've heard mixed

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Anthony Liguori
On 03/31/2011 04:37 PM, Michael S. Tsirkin wrote: On Thu, Mar 31, 2011 at 04:32:44PM -0500, Anthony Liguori wrote: On 03/31/2011 04:26 PM, Michael S. Tsirkin wrote: On Thu, Mar 31, 2011 at 02:29:50PM -0500, Anthony Liguori wrote: On 03/31/2011 02:18 PM, Peter Maydell wrote: On 31 March 2011 2

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Michael S. Tsirkin
On Thu, Mar 31, 2011 at 10:32:11PM +0100, Peter Maydell wrote: > On 31 March 2011 21:23, Anthony Liguori wrote: > > On 03/31/2011 03:12 PM, Peter Maydell wrote: > >> Well, obviously you need to be able to revoke the permission > >> to use the fastpath pointer to the underlying memory. But you > >>

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Michael S. Tsirkin
On Thu, Mar 31, 2011 at 04:32:44PM -0500, Anthony Liguori wrote: > On 03/31/2011 04:26 PM, Michael S. Tsirkin wrote: > >On Thu, Mar 31, 2011 at 02:29:50PM -0500, Anthony Liguori wrote: > >>On 03/31/2011 02:18 PM, Peter Maydell wrote: > >>>On 31 March 2011 20:01, Anthony Liguori wrote: > VGA i

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Anthony Liguori
On 03/31/2011 04:26 PM, Michael S. Tsirkin wrote: On Thu, Mar 31, 2011 at 02:29:50PM -0500, Anthony Liguori wrote: On 03/31/2011 02:18 PM, Peter Maydell wrote: On 31 March 2011 20:01, Anthony Liguori wrote: VGA is just another device. It happens to be that we treat VGA device memory as some

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Peter Maydell
On 31 March 2011 21:23, Anthony Liguori wrote: > On 03/31/2011 03:12 PM, Peter Maydell wrote: >> Well, obviously you need to be able to revoke the permission >> to use the fastpath pointer to the underlying memory. But you >> need to be able to do that anyhow, to cover cases where (eg) the >> gues

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Michael S. Tsirkin
On Thu, Mar 31, 2011 at 02:29:50PM -0500, Anthony Liguori wrote: > On 03/31/2011 02:18 PM, Peter Maydell wrote: > >On 31 March 2011 20:01, Anthony Liguori wrote: > >>VGA is just another device. It happens to be that we treat VGA device > >>memory as something that behaves like ram occassionally b

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Anthony Liguori
On 03/31/2011 03:12 PM, Peter Maydell wrote: On 31 March 2011 20:29, Anthony Liguori wrote: On 03/31/2011 02:18 PM, Peter Maydell wrote: So, to ask a dumb question, what does make something RAM? It's a made up concept that we use to make device performance faster. Basically, RAM should inclu

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Anthony Liguori
On 03/31/2011 03:03 PM, Michael S. Tsirkin wrote: On Thu, Mar 31, 2011 at 02:26:59PM -0500, Anthony Liguori wrote: On 03/31/2011 02:07 PM, Michael S. Tsirkin wrote: Just needs some love. VGA is just another device. It happens to be that we treat VGA device memory as something that behaves lik

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Peter Maydell
On 31 March 2011 20:29, Anthony Liguori wrote: > On 03/31/2011 02:18 PM, Peter Maydell wrote: >> So, to ask a dumb question, what does make something RAM? > > It's a made up concept that we use to make device performance faster. > > Basically, RAM should include all of the memory that a reasonable

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Michael S. Tsirkin
On Thu, Mar 31, 2011 at 02:26:59PM -0500, Anthony Liguori wrote: > On 03/31/2011 02:07 PM, Michael S. Tsirkin wrote: > >>Just needs some love. > >> > >>VGA is just another device. It happens to be that we treat VGA > >>device memory as something that behaves like ram occassionally but > >>that doe

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Anthony Liguori
On 03/31/2011 02:18 PM, Peter Maydell wrote: On 31 March 2011 20:01, Anthony Liguori wrote: VGA is just another device. It happens to be that we treat VGA device memory as something that behaves like ram occassionally but that does not make it RAM. So, to ask a dumb question, what does make s

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Anthony Liguori
On 03/31/2011 02:07 PM, Michael S. Tsirkin wrote: Just needs some love. VGA is just another device. It happens to be that we treat VGA device memory as something that behaves like ram occassionally but that does not make it RAM. If we agree on that, will a pair of functions for this work? How

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Peter Maydell
On 31 March 2011 20:01, Anthony Liguori wrote: > VGA is just another device.  It happens to be that we treat VGA device > memory as something that behaves like ram occassionally but that does not > make it RAM. So, to ask a dumb question, what does make something RAM? My take on RAM is that RAM i

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Alex Williamson
On Thu, 2011-03-31 at 14:01 -0500, Anthony Liguori wrote: > On 03/31/2011 01:49 PM, Michael S. Tsirkin wrote: > > On Thu, Mar 31, 2011 at 01:33:58PM -0500, Anthony Liguori wrote: > >> On 03/31/2011 12:43 PM, Michael S. Tsirkin wrote: > >>> Currently, vga cards that allocate vga ram, > >>> register

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Michael S. Tsirkin
On Thu, Mar 31, 2011 at 02:01:52PM -0500, Anthony Liguori wrote: > On 03/31/2011 01:49 PM, Michael S. Tsirkin wrote: > >On Thu, Mar 31, 2011 at 01:33:58PM -0500, Anthony Liguori wrote: > >>On 03/31/2011 12:43 PM, Michael S. Tsirkin wrote: > >>>Currently, vga cards that allocate vga ram, > >>>regist

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Anthony Liguori
On 03/31/2011 01:49 PM, Michael S. Tsirkin wrote: On Thu, Mar 31, 2011 at 01:33:58PM -0500, Anthony Liguori wrote: On 03/31/2011 12:43 PM, Michael S. Tsirkin wrote: Currently, vga cards that allocate vga ram, register it as regular ram. When this happens a lot, vhost need to get notified and fl

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Michael S. Tsirkin
On Thu, Mar 31, 2011 at 01:33:58PM -0500, Anthony Liguori wrote: > On 03/31/2011 12:43 PM, Michael S. Tsirkin wrote: > >Currently, vga cards that allocate vga ram, > >register it as regular ram. When this happens > >a lot, vhost need to get notified and flush > >its memory tables, which is slow. >

Re: [Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Anthony Liguori
On 03/31/2011 12:43 PM, Michael S. Tsirkin wrote: Currently, vga cards that allocate vga ram, register it as regular ram. When this happens a lot, vhost need to get notified and flush its memory tables, which is slow. This was observed with cirrus vga. As a solution, add an explicit flag when r

[Qemu-devel] [PATCH RFC] vga: flag vga ram for notifiers

2011-03-31 Thread Michael S. Tsirkin
Currently, vga cards that allocate vga ram, register it as regular ram. When this happens a lot, vhost need to get notified and flush its memory tables, which is slow. This was observed with cirrus vga. As a solution, add an explicit flag when registering vga ram, vhost-net can simply ignore it.