ia64/xen-unstable

changeset 16974:90844659c458

Revert 16947:32b898768217027. Breaks HVM qcow-backed discs.
Sigend-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Feb 04 13:42:53 2008 +0000 (2008-02-04)
parents e4edc310e949
children 4e9b5427f2d8
files tools/ioemu/hw/xen_machine_fv.c tools/ioemu/vl.c tools/ioemu/vl.h tools/ioemu/xenstore.c
line diff
     1.1 --- a/tools/ioemu/hw/xen_machine_fv.c	Sun Feb 03 10:22:08 2008 +0000
     1.2 +++ b/tools/ioemu/hw/xen_machine_fv.c	Mon Feb 04 13:42:53 2008 +0000
     1.3 @@ -205,8 +205,6 @@ static void xen_init_fv(uint64_t ram_siz
     1.4      }
     1.5  #endif
     1.6  
     1.7 -    xenstore_parse_domain_config(domid);
     1.8 -
     1.9      xc_get_hvm_param(xc_handle, domid, HVM_PARAM_IOREQ_PFN, &ioreq_pfn);
    1.10      fprintf(logfile, "shared page at pfn %lx\n", ioreq_pfn);
    1.11      shared_page = xc_map_foreign_range(xc_handle, domid, XC_PAGE_SIZE,
     2.1 --- a/tools/ioemu/vl.c	Sun Feb 03 10:22:08 2008 +0000
     2.2 +++ b/tools/ioemu/vl.c	Mon Feb 04 13:42:53 2008 +0000
     2.3 @@ -7593,7 +7593,7 @@ int main(int argc, char **argv)
     2.4  #ifdef CONFIG_DM
     2.5      bdrv_init();
     2.6      xc_handle = xc_interface_open();
     2.7 -    xenstore_daemon_open();
     2.8 +    xenstore_parse_domain_config(domid);
     2.9  #endif /* CONFIG_DM */
    2.10  
    2.11  #ifdef USE_KQEMU
     3.1 --- a/tools/ioemu/vl.h	Sun Feb 03 10:22:08 2008 +0000
     3.2 +++ b/tools/ioemu/vl.h	Mon Feb 04 13:42:53 2008 +0000
     3.3 @@ -1457,7 +1457,6 @@ void readline_start(const char *prompt, 
     3.4                      ReadLineFunc *readline_func, void *opaque);
     3.5  
     3.6  /* xenstore.c */
     3.7 -void xenstore_daemon_open(void);
     3.8  void xenstore_parse_domain_config(int domid);
     3.9  int xenstore_fd(void);
    3.10  void xenstore_process_event(void *opaque);
     4.1 --- a/tools/ioemu/xenstore.c	Sun Feb 03 10:22:08 2008 +0000
     4.2 +++ b/tools/ioemu/xenstore.c	Mon Feb 04 13:42:53 2008 +0000
     4.3 @@ -77,13 +77,6 @@ static void waitForDevice(char *fn)
     4.4      return;
     4.5  }
     4.6  
     4.7 -void xenstore_daemon_open(void)
     4.8 -{
     4.9 -    xsh = xs_daemon_open();
    4.10 -    if (xsh == NULL)
    4.11 -        fprintf(logfile, "Could not contact xenstore for domain config\n");
    4.12 -}
    4.13 -
    4.14  void xenstore_parse_domain_config(int domid)
    4.15  {
    4.16      char **e = NULL;
    4.17 @@ -97,6 +90,12 @@ void xenstore_parse_domain_config(int do
    4.18      for(i = 0; i < MAX_DISKS + MAX_SCSI_DISKS; i++)
    4.19          media_filename[i] = NULL;
    4.20  
    4.21 +    xsh = xs_daemon_open();
    4.22 +    if (xsh == NULL) {
    4.23 +        fprintf(logfile, "Could not contact xenstore for domain config\n");
    4.24 +        return;
    4.25 +    }
    4.26 +
    4.27      path = xs_get_domain_path(xsh, domid);
    4.28      if (path == NULL) {
    4.29          fprintf(logfile, "xs_get_domain_path() error\n");