[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC QEMU PATCH v2 01/10] nvdimm xen: disable label support on Xen
On Mon, Mar 20, 2017 at 08:12:40AM +0800, Haozhong Zhang wrote: > If xen_enabled(), memory_region_get_ram_ptr() always returns NULL and > nvdimm_realize() cannot get the correct pointer to the label area. This > commit disables the label support for Xen accelerator to workaround > this issue. > > Signed-off-by: Haozhong Zhang <haozhong.zhang@xxxxxxxxx> > --- > Cc: "Michael S. Tsirkin" <mst@xxxxxxxxxx> > Cc: Igor Mammedov <imammedo@xxxxxxxxxx> > Cc: Xiao Guangrong <guangrong.xiao@xxxxxxxxxxxxxxx> > --- > hw/mem/nvdimm.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c > index db896b0bb6..0d3e17e94c 100644 > --- a/hw/mem/nvdimm.c > +++ b/hw/mem/nvdimm.c > @@ -87,7 +87,11 @@ static void nvdimm_realize(PCDIMMDevice *dimm, Error > **errp) > align = memory_region_get_alignment(mr); > > pmem_size = size - nvdimm->label_size; > - nvdimm->label_data = memory_region_get_ram_ptr(mr) + pmem_size; > + /* > + * TODO: explain the reason Ahem? > + */ > + if (nvdimm->label_size) > + nvdimm->label_data = memory_region_get_ram_ptr(mr) + pmem_size; > pmem_size = QEMU_ALIGN_DOWN(pmem_size, align); > > if (size <= nvdimm->label_size || !pmem_size) { > -- > 2.12.0 > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |