[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v1] libxl: fix device_model_version related assert



On Thu, May 16, 2019 at 03:54:55PM +0200, Olaf Hering wrote:
> Am Thu, 16 May 2019 14:46:53 +0100
> schrieb Wei Liu <wei.liu2@xxxxxxxxxx>:
> 
> > Can you clarify?
> 
> create_domain has a libxl_domain_config on its stack. This is passed to
> freemem, and libxl_domain_need_memory modifies it as needed.
> The modification will go through libxl_domain_create_new, do_domain_create,
> initiate_domain_create to libxl__domain_set_device_model. This function
> will return right away because device_model_version is already set.

Ah, I know where the confusion is now. Note that the b_info used in
libxl_domain_need_memory is a copy, not the original one, so whatever
modification you do to it won't get passed back to its caller.

Notice the call:
  libxl_domain_build_info_copy(ctx, b_info, b_info_in);

And then later:
  libxl_domain_build_info_dispose(b_info);

Does this make sense?

Wei.

> 
> Olaf



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.