]> xenbits.xensource.com Git - people/royger/xen.git/commit
libxl: add helper function to set device_model_version
authorOlaf Hering <olaf@aepfle.de>
Tue, 14 May 2019 07:27:41 +0000 (09:27 +0200)
committerWei Liu <wei.liu2@citrix.com>
Wed, 15 May 2019 09:40:03 +0000 (10:40 +0100)
commit3802ecbaa9eb36cbadce39ab03a4f6d36f29ae5c
tree4fbe4855e56141ed05a6a51c1cdbba9b4a3aec32
parent2520a7f33836616077a2ca3bd96d0b8bdd7f9404
libxl: add helper function to set device_model_version

An upcoming change will set the value of device_model_version properly
also for the non-HVM case.

Move existing code to new function libxl__domain_set_device_model.
Move also initialization for device_model_stubdomain to that function.
Make sure libxl__domain_build_info_setdefault is called with
device_model_version set.

Update libxl__spawn_stub_dm() and initiate_domain_create() to call the
new function prior libxl__domain_build_info_setdefault() because
device_mode_version is expected to be initialzed.
libxl_domain_need_memory() needs no update because it does not have a
d_config available anyway, and the callers provide a populated b_info.

The upcoming change needs a full libxl_domain_config, and the existing
libxl__domain_build_info_setdefault has just a libxl_domain_build_info
to work with.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl_create.c
tools/libxl/libxl_dm.c
tools/libxl/libxl_internal.h