[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] ioemu: Stop PV guest from parsing xenstore and opening block devices.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1201770681 0 # Node ID 32b898768217027688de8c96f67afb73983c9ad3 # Parent 5c30a9dec02d3d7b222d72819f4bb271d231bc63 ioemu: Stop PV guest from parsing xenstore and opening block devices. PV guests are now using QEMU for a vncserver. During initialization of QEMU xenstore_parse_config() is being called causing PV guests to open block devices. This patch makes a new function, xenstore_daemon_open(), so that the vnc password functions have an open xenstore handle and moves xenstore_parse_config() into the FV machine specific init function. Signed-off-by: Pat Campbell <plc@xxxxxxxxxx> --- tools/ioemu/hw/xen_machine_fv.c | 2 ++ tools/ioemu/vl.c | 2 +- tools/ioemu/vl.h | 1 + tools/ioemu/xenstore.c | 13 +++++++------ 4 files changed, 11 insertions(+), 7 deletions(-) diff -r 5c30a9dec02d -r 32b898768217 tools/ioemu/hw/xen_machine_fv.c --- a/tools/ioemu/hw/xen_machine_fv.c Wed Jan 30 18:39:04 2008 +0000 +++ b/tools/ioemu/hw/xen_machine_fv.c Thu Jan 31 09:11:21 2008 +0000 @@ -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, diff -r 5c30a9dec02d -r 32b898768217 tools/ioemu/vl.c --- a/tools/ioemu/vl.c Wed Jan 30 18:39:04 2008 +0000 +++ b/tools/ioemu/vl.c Thu Jan 31 09:11:21 2008 +0000 @@ -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 diff -r 5c30a9dec02d -r 32b898768217 tools/ioemu/vl.h --- a/tools/ioemu/vl.h Wed Jan 30 18:39:04 2008 +0000 +++ b/tools/ioemu/vl.h Thu Jan 31 09:11:21 2008 +0000 @@ -1457,6 +1457,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); diff -r 5c30a9dec02d -r 32b898768217 tools/ioemu/xenstore.c --- a/tools/ioemu/xenstore.c Wed Jan 30 18:39:04 2008 +0000 +++ b/tools/ioemu/xenstore.c Thu Jan 31 09:11:21 2008 +0000 @@ -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) { _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |