[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 08/18] nvdimm: init backend memory mapping an
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2 08/18] nvdimm: init backend memory mapping and config data area |
Date: |
Tue, 1 Sep 2015 10:14:00 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Mon, Aug 31, 2015 at 02:23:43PM +0800, Xiao Guangrong wrote:
>
> Hi Stefan,
>
> On 08/28/2015 07:58 PM, Stefan Hajnoczi wrote:
>
> >
> >>>>+ goto do_unmap;
> >>>>+ }
> >>>>+
> >>>>+ nvdimm->device_index = new_device_index();
> >>>>+ sprintf(name, "NVDIMM-%d", nvdimm->device_index);
> >>>>+ memory_region_init_ram_ptr(&nvdimm->mr, OBJECT(dev), name,
> >>>>nvdimm_size,
> >>>>+ buf);
> >>>
> >>>How is the autogenerated name used?
> >>>
> >>>Why not just use "pc-nvdimm.memory"?
> >>
> >>Ah. Just for debug proposal :) and i am not sure if a name used for multiple
> >>MRs (MemoryRegion) is a good idea.
> >
> >Other devices use a constant name too (git grep
> >memory_region_init_ram_ptr) so it seems to be okay. The unique thing is
> >the OBJECT(dev) which differs for each NVDIMM instance.
> >
>
> When I was digging into live migration code, i noticed that the same MR name
> may
> cause the name "idstr", please refer to qemu_ram_set_idstr().
>
> Since nvdimm devices do not have parent-bus, it will trigger the abort() in
> that
> function.
I see. The other devices that use a constant name are on a bus so the
abort doesn't trigger.
- Re: [Qemu-devel] [PATCH v2 08/18] nvdimm: init backend memory mapping and config data area,
Stefan Hajnoczi <=