Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:xen-4.7
qemu-2.4
qemu.e32ad204e2fd75fd443cbbe75b9cefce040251c2.p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File qemu.e32ad204e2fd75fd443cbbe75b9cefce040251c2.patch of Package qemu-2.4
From: Roger Pau Monne <roger.pau@citrix.com> Date: Fri, 13 Nov 2015 17:38:06 +0000 Subject: e32ad204e2fd75fd443cbbe75b9cefce040251c2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit xen: fix usage of xc_domain_create in domain builder Due to the addition of HVMlite and the requirement to always provide a valid xc_domain_configuration_t, xc_domain_create now always takes an arch domain config, which can be NULL in order to mimic previous behaviour. Add a small stub called xen_domain_create that encapsulates the correct call to xc_domain_create depending on the libxc version detected. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- configure | 17 +++++++++++++++++ hw/xenpv/xen_domainbuild.c | 2 +- include/hw/xen/xen_common.h | 16 ++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) --- a/configure +++ b/configure @@ -1858,24 +1858,41 @@ int main(void) { EOF if ! compile_prog "" "$xen_libs" ; then # Xen not found if test "$xen" = "yes" ; then feature_not_found "xen" "Install xen devel" fi xen=no # Xen unstable elif cat > $TMPC <<EOF && #include <xenctrl.h> +#include <stdint.h> +int main(void) { + xc_interface *xc = NULL; + xen_domain_handle_t handle; + xc_domain_create(xc, 0, handle, 0, NULL, NULL); + return 0; +} +EOF + compile_prog "" "$xen_libs" + then + xen_ctrl_version=470 + xen=yes + + # Xen 4.6 + elif + cat > $TMPC <<EOF && +#include <xenctrl.h> #include <xenstore.h> #include <stdint.h> #include <xen/hvm/hvm_info_table.h> #if !defined(HVM_MAX_VCPUS) # error HVM_MAX_VCPUS not defined #endif int main(void) { xc_interface *xc; xs_daemon_open(); xc = xc_interface_open(0, 0, 0); xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); xc_gnttab_open(NULL, 0); --- a/hw/xenpv/xen_domainbuild.c +++ b/hw/xenpv/xen_domainbuild.c @@ -225,25 +225,25 @@ static void xen_domain_cleanup(void) int xen_domain_build_pv(const char *kernel, const char *ramdisk, const char *cmdline) { uint32_t ssidref = 0; uint32_t flags = 0; xen_domain_handle_t uuid; unsigned int xenstore_port = 0, console_port = 0; unsigned long xenstore_mfn = 0, console_mfn = 0; int rc; memcpy(uuid, qemu_uuid, sizeof(uuid)); - rc = xc_domain_create(xen_xc, ssidref, uuid, flags, &xen_domid); + rc = xen_domain_create(xen_xc, ssidref, uuid, flags, &xen_domid); if (rc < 0) { fprintf(stderr, "xen: xc_domain_create() failed\n"); goto err; } qemu_log("xen: created domain %d\n", xen_domid); atexit(xen_domain_cleanup); if (xen_domain_watcher() == -1) { goto err; } xenstore_domain_init1(kernel, ramdisk, cmdline); --- a/include/hw/xen/xen_common.h +++ b/include/hw/xen/xen_common.h @@ -398,13 +398,29 @@ static inline int xen_get_ioreq_server_info(XenXC xc, domid_t dom, } static inline int xen_set_ioreq_server_state(XenXC xc, domid_t dom, ioservid_t ioservid, bool enable) { trace_xen_ioreq_server_state(ioservid, enable); return xc_hvm_set_ioreq_server_state(xc, dom, ioservid, enable); } #endif +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 470 +static inline int xen_domain_create(XenXC xc, uint32_t ssidref, + xen_domain_handle_t handle, uint32_t flags, + uint32_t *pdomid) +{ + return xc_domain_create(xc, ssidref, handle, flags, pdomid); +} +#else +static inline int xen_domain_create(XenXC xc, uint32_t ssidref, + xen_domain_handle_t handle, uint32_t flags, + uint32_t *pdomid) +{ + return xc_domain_create(xc, ssidref, handle, flags, pdomid, NULL); +} +#endif + #endif /* QEMU_HW_XEN_COMMON_H */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor