libxc/libxl: fill xc_hvm_build_args in libxl
authorWei Liu <wei.liu2@citrix.com>
Mon, 1 Jun 2015 10:19:11 +0000 (11:19 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 3 Jun 2015 10:12:02 +0000 (11:12 +0100)
commit5dff8e9eedc79da02eba29aa9aacb4103622690e
tree58bfc72206f61f757fe8cb30e08e257690fac2aa
parentf91fab5eeab9d97123e29876b1d61dc80b31c6de
libxc/libxl: fill xc_hvm_build_args in libxl

When building HVM guests, originally some fields of xc_hvm_build_args
are filled in xc_hvm_build (and buried in the wrong function), some are
set in libxl__build_hvm before passing xc_hvm_build_args to
xc_hvm_build. This is fragile.

After examining the code in xc_hvm_build that sets those fields, we can
in fact move setting of mmio_start etc in libxl. This way we consolidate
memory layout setting in libxl.

The setting of firmware data related fields is left in xc_hvm_build
because it depends on parsing ELF image. Those fields only point to
scratch data that doesn't affect memory layout.

There should be no change in the generated guest memory layout. But the
semantic is changed for xc_hvm_build. Toolstack that built directly on
top of libxc need to adjust to this change.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: "Chen, Tiejun" <tiejun.chen@intel.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_hvm_build_x86.c
tools/libxl/libxl_dom.c