Stop pv guest from parsing xenstore opening block devices
PATCH 1/1 Stop pv guest from parsing xenstore 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.
Please apply to xen-unstable tip
Signed-off-by Pat Campbell <[email protected]>
tools/ioemu/hw/xen_machine_fv.c +2 -0
@@ -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,
tools/ioemu/vl.c +1 -1
@@ -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
tools/ioemu/vl.h +1 -0
@@ -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);
tools/ioemu/xenstore.c +7 -6
@@ -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 ;
@@ -88,12 +95,6 @@ void xenstore_parse_domain_config(int dofor (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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel