Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-31 Thread Stefan Hajnoczi
On Wed, Oct 31, 2012 at 1:34 PM, Avi Kivity wrote: > On 10/31/2012 02:18 PM, Stefan Hajnoczi wrote: >>> >>> IMO we should use the same mechanism as proposed for other devices: >>> address_space_map() should grab a reference on the dimm device, and >>> address_space_unmap() can release it. This wa

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-31 Thread Avi Kivity
On 10/31/2012 02:18 PM, Stefan Hajnoczi wrote: >> >> IMO we should use the same mechanism as proposed for other devices: >> address_space_map() should grab a reference on the dimm device, and >> address_space_unmap() can release it. This way device destruction will >> be deferred as soon as all de

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-31 Thread Stefan Hajnoczi
On Wed, Oct 31, 2012 at 12:15 PM, Avi Kivity wrote: > On 10/24/2012 10:06 AM, liu ping fan wrote: >> On Tue, Oct 23, 2012 at 8:25 PM, Stefan Hajnoczi wrote: >>> On Fri, Sep 21, 2012 at 01:17:21PM +0200, Vasilis Liaskovitis wrote: +static void dimm_populate(DimmDevice *s) +{ +De

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-31 Thread Avi Kivity
On 10/24/2012 10:06 AM, liu ping fan wrote: > On Tue, Oct 23, 2012 at 8:25 PM, Stefan Hajnoczi wrote: >> On Fri, Sep 21, 2012 at 01:17:21PM +0200, Vasilis Liaskovitis wrote: >>> +static void dimm_populate(DimmDevice *s) >>> +{ >>> +DeviceState *dev= (DeviceState*)s; >>> +MemoryRegion *new

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-25 Thread liu ping fan
On Thu, Oct 25, 2012 at 1:16 AM, Vasilis Liaskovitis wrote: > Hi, > > On Wed, Oct 24, 2012 at 12:15:17PM +0200, Stefan Hajnoczi wrote: >> On Wed, Oct 24, 2012 at 10:06 AM, liu ping fan wrote: >> > On Tue, Oct 23, 2012 at 8:25 PM, Stefan Hajnoczi >> > wrote: >> >> On Fri, Sep 21, 2012 at 01:17:2

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-24 Thread Vasilis Liaskovitis
Hi, On Wed, Oct 24, 2012 at 12:15:17PM +0200, Stefan Hajnoczi wrote: > On Wed, Oct 24, 2012 at 10:06 AM, liu ping fan wrote: > > On Tue, Oct 23, 2012 at 8:25 PM, Stefan Hajnoczi wrote: > >> On Fri, Sep 21, 2012 at 01:17:21PM +0200, Vasilis Liaskovitis wrote: > >>> +static void dimm_populate(Dimm

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-24 Thread Stefan Hajnoczi
On Wed, Oct 24, 2012 at 10:06 AM, liu ping fan wrote: > On Tue, Oct 23, 2012 at 8:25 PM, Stefan Hajnoczi wrote: >> On Fri, Sep 21, 2012 at 01:17:21PM +0200, Vasilis Liaskovitis wrote: >>> +static void dimm_populate(DimmDevice *s) >>> +{ >>> +DeviceState *dev= (DeviceState*)s; >>> +MemoryR

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-24 Thread liu ping fan
On Tue, Oct 23, 2012 at 8:25 PM, Stefan Hajnoczi wrote: > On Fri, Sep 21, 2012 at 01:17:21PM +0200, Vasilis Liaskovitis wrote: >> +static void dimm_populate(DimmDevice *s) >> +{ >> +DeviceState *dev= (DeviceState*)s; >> +MemoryRegion *new = NULL; >> + >> +new = g_malloc(sizeof(MemoryRe

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-23 Thread Stefan Hajnoczi
On Fri, Sep 21, 2012 at 01:17:21PM +0200, Vasilis Liaskovitis wrote: > +static void dimm_populate(DimmDevice *s) > +{ > +DeviceState *dev= (DeviceState*)s; > +MemoryRegion *new = NULL; > + > +new = g_malloc(sizeof(MemoryRegion)); > +memory_region_init_ram(new, dev->id, s->size); > +

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-09-23 Thread Wen Congyang
At 09/21/2012 07:17 PM, Vasilis Liaskovitis Wrote: > Each hotplug-able memory slot is a DimmDevice. All DimmDevices are attached > to a new bus called DimmBus. This bus is introduced so that we no longer > depend on hotplug-capability of main system bus (the main bus does not allow > hotplugging).

[Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-09-21 Thread Vasilis Liaskovitis
Each hotplug-able memory slot is a DimmDevice. All DimmDevices are attached to a new bus called DimmBus. This bus is introduced so that we no longer depend on hotplug-capability of main system bus (the main bus does not allow hotplugging). The DimmBus should be attached to a chipset Device (i440fx