Re: [Qemu-devel] [PATCHv2 1/3] qemu: memory notifiers

2010-01-18 Thread Avi Kivity
On 01/18/2010 06:08 PM, Michael S. Tsirkin wrote: On Mon, Jan 18, 2010 at 06:04:40PM +0200, Avi Kivity wrote: On 01/18/2010 05:45 PM, Michael S. Tsirkin wrote: cpu_register_physical_memory_offset already is O(memory size) btw. Right, but we'd like to replace it with a range

Re: [Qemu-devel] [PATCHv2 1/3] qemu: memory notifiers

2010-01-18 Thread Michael S. Tsirkin
On Mon, Jan 18, 2010 at 06:04:40PM +0200, Avi Kivity wrote: > On 01/18/2010 05:45 PM, Michael S. Tsirkin wrote: >> >> cpu_register_physical_memory_offset already is O(memory size) btw. >> > > Right, but we'd like to replace it with a range API. So, when we do the implementation of notifiers ca

Re: [Qemu-devel] [PATCHv2 1/3] qemu: memory notifiers

2010-01-18 Thread Avi Kivity
On 01/18/2010 05:45 PM, Michael S. Tsirkin wrote: cpu_register_physical_memory_offset already is O(memory size) btw. Right, but we'd like to replace it with a range API. Maybe we mandate clients be registered at init-time? This might be tricky - vhost currently only regis

Re: [Qemu-devel] [PATCHv2 1/3] qemu: memory notifiers

2010-01-18 Thread Michael S. Tsirkin
On Mon, Jan 18, 2010 at 04:52:10PM +0200, Avi Kivity wrote: > On 01/18/2010 04:44 PM, Michael S. Tsirkin wrote: >> >> The point is that clients can be registered at any point. A client that registered when memory is present needs to be notified about it. >>

Re: [Qemu-devel] [PATCHv2 1/3] qemu: memory notifiers

2010-01-18 Thread Michael S. Tsirkin
On Mon, Jan 18, 2010 at 04:52:10PM +0200, Avi Kivity wrote: > On 01/18/2010 04:44 PM, Michael S. Tsirkin wrote: >> >> The point is that clients can be registered at any point. A client that registered when memory is present needs to be notified about it. >>

Re: [Qemu-devel] [PATCHv2 1/3] qemu: memory notifiers

2010-01-18 Thread Avi Kivity
On 01/18/2010 04:44 PM, Michael S. Tsirkin wrote: The point is that clients can be registered at any point. A client that registered when memory is present needs to be notified about it. It looks very expensive. Shouldn't be hard to optimize ... It's O(memory size),

Re: [Qemu-devel] [PATCHv2 1/3] qemu: memory notifiers

2010-01-18 Thread Michael S. Tsirkin
On Mon, Jan 18, 2010 at 03:58:51PM +0200, Avi Kivity wrote: > On 01/18/2010 03:52 PM, Michael S. Tsirkin wrote: >> On Mon, Jan 18, 2010 at 03:02:59PM +0200, Avi Kivity wrote: >> >>> On 01/04/2010 09:49 PM, Michael S. Tsirkin wrote: >>> This adds notifiers for phys memory changes: a s

Re: [Qemu-devel] [PATCHv2 1/3] qemu: memory notifiers

2010-01-18 Thread Avi Kivity
On 01/18/2010 03:52 PM, Michael S. Tsirkin wrote: On Mon, Jan 18, 2010 at 03:02:59PM +0200, Avi Kivity wrote: On 01/04/2010 09:49 PM, Michael S. Tsirkin wrote: This adds notifiers for phys memory changes: a set of callbacks that vhost can register and update kernel accordingly. Down

Re: [Qemu-devel] [PATCHv2 1/3] qemu: memory notifiers

2010-01-18 Thread Michael S. Tsirkin
On Mon, Jan 18, 2010 at 03:02:59PM +0200, Avi Kivity wrote: > On 01/04/2010 09:49 PM, Michael S. Tsirkin wrote: >> This adds notifiers for phys memory changes: a set of callbacks that >> vhost can register and update kernel accordingly. Down the road, kvm >> code can be switched to use these as we

Re: [Qemu-devel] [PATCHv2 1/3] qemu: memory notifiers

2010-01-18 Thread Avi Kivity
On 01/04/2010 09:49 PM, Michael S. Tsirkin wrote: This adds notifiers for phys memory changes: a set of callbacks that vhost can register and update kernel accordingly. Down the road, kvm code can be switched to use these as well, instead of calling kvm code directly from exec.c as is done now.

[Qemu-devel] [PATCHv2 1/3] qemu: memory notifiers

2010-01-05 Thread Michael S. Tsirkin
This adds notifiers for phys memory changes: a set of callbacks that vhost can register and update kernel accordingly. Down the road, kvm code can be switched to use these as well, instead of calling kvm code directly from exec.c as is done now. Signed-off-by: Michael S. Tsirkin --- cpu-common.