]> xenbits.xensource.com Git - people/liuw/stubdom.git/commitdiff
libxc: introduce domain builder architecture specific data
authorJuergen Gross <jgross@suse.com>
Thu, 12 Nov 2015 13:43:31 +0000 (14:43 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 16 Nov 2015 13:18:56 +0000 (13:18 +0000)
Reorganize struct xc_dom_image to contain a pointer to domain builder
architecture specific private data. This will abstract the architecture
or domain type specific data from the general used data.

The new area is allocated as soon as the domain type is known.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
grub/kexec.c

index 2300318b80d519a31f6cb015e671b75ec2770c0f..8fd9ff9c580cd4fd597526a5bf617acbe09a6005 100644 (file)
@@ -272,7 +272,11 @@ void kexec(void *kernel, long kernel_size, void *module, long module_size, char
 #endif
 
     /* equivalent of xc_dom_mem_init */
-    dom->arch_hooks = xc_dom_find_arch_hooks(xc_handle, dom->guest_type);
+    if (xc_dom_set_arch_hooks(dom)) {
+        grub_printf("xc_dom_set_arch_hooks failed\n");
+        errnum = ERR_EXEC_FORMAT;
+        goto out;
+    }
     dom->total_pages = start_info.nr_pages;
 
     /* equivalent of arch_setup_meminit */