70 lines
2.4 KiB
Diff
70 lines
2.4 KiB
Diff
Index: xen-3.2-testing/tools/ioemu/hw/xen_machine_fv.c
|
|
===================================================================
|
|
--- xen-3.2-testing.orig/tools/ioemu/hw/xen_machine_fv.c
|
|
+++ xen-3.2-testing/tools/ioemu/hw/xen_machine_fv.c
|
|
@@ -205,6 +205,8 @@ static void xen_init_fv(uint64_t ram_siz
|
|
}
|
|
#endif
|
|
|
|
+ xenstore_parse_domain_config(domid);
|
|
+
|
|
xc_get_hvm_param(xc_handle, domid, HVM_PARAM_IOREQ_PFN, &ioreq_pfn);
|
|
fprintf(logfile, "shared page at pfn %lx\n", ioreq_pfn);
|
|
shared_page = xc_map_foreign_range(xc_handle, domid, XC_PAGE_SIZE,
|
|
Index: xen-3.2-testing/tools/ioemu/vl.c
|
|
===================================================================
|
|
--- xen-3.2-testing.orig/tools/ioemu/vl.c
|
|
+++ xen-3.2-testing/tools/ioemu/vl.c
|
|
@@ -7593,7 +7593,7 @@ int main(int argc, char **argv)
|
|
#ifdef CONFIG_DM
|
|
bdrv_init();
|
|
xc_handle = xc_interface_open();
|
|
- xenstore_parse_domain_config(domid);
|
|
+ xenstore_daemon_open();
|
|
#endif /* CONFIG_DM */
|
|
|
|
#ifdef USE_KQEMU
|
|
Index: xen-3.2-testing/tools/ioemu/vl.h
|
|
===================================================================
|
|
--- xen-3.2-testing.orig/tools/ioemu/vl.h
|
|
+++ xen-3.2-testing/tools/ioemu/vl.h
|
|
@@ -1454,6 +1454,7 @@ void readline_start(const char *prompt,
|
|
ReadLineFunc *readline_func, void *opaque);
|
|
|
|
/* xenstore.c */
|
|
+void xenstore_daemon_open(void);
|
|
void xenstore_parse_domain_config(int domid);
|
|
int xenstore_fd(void);
|
|
void xenstore_process_event(void *opaque);
|
|
Index: xen-3.2-testing/tools/ioemu/xenstore.c
|
|
===================================================================
|
|
--- xen-3.2-testing.orig/tools/ioemu/xenstore.c
|
|
+++ xen-3.2-testing/tools/ioemu/xenstore.c
|
|
@@ -77,6 +77,13 @@ static void waitForDevice(char *fn)
|
|
return;
|
|
}
|
|
|
|
+void xenstore_daemon_open(void)
|
|
+{
|
|
+ xsh = xs_daemon_open();
|
|
+ if (xsh == NULL)
|
|
+ fprintf(logfile, "Could not contact xenstore for domain config\n");
|
|
+}
|
|
+
|
|
void xenstore_parse_domain_config(int domid)
|
|
{
|
|
char **e = NULL;
|
|
@@ -89,12 +96,6 @@ void xenstore_parse_domain_config(int do
|
|
for(i = 0; i < MAX_DISKS + MAX_SCSI_DISKS; i++)
|
|
media_filename[i] = NULL;
|
|
|
|
- xsh = xs_daemon_open();
|
|
- if (xsh == NULL) {
|
|
- fprintf(logfile, "Could not contact xenstore for domain config\n");
|
|
- return;
|
|
- }
|
|
-
|
|
path = xs_get_domain_path(xsh, domid);
|
|
if (path == NULL) {
|
|
fprintf(logfile, "xs_get_domain_path() error\n");
|