direct-io.hg

changeset 10933:386990d004b8

[qemu] Add switch to control whether acpi bridge is enabled.

Signed-off-by: Winston Wang <winston.l.wang@intel.com>
author chris@kneesaa.uk.xensource.com
date Fri Aug 04 10:41:27 2006 +0100 (2006-08-04)
parents c6b2761633c6
children 56b2a028dc7e
files tools/ioemu/hw/pc.c tools/ioemu/vl.c tools/ioemu/vl.h tools/python/xen/sv/CreateDomain.py tools/python/xen/xend/image.py
line diff
     1.1 --- a/tools/ioemu/hw/pc.c	Fri Aug 04 10:29:18 2006 +0100
     1.2 +++ b/tools/ioemu/hw/pc.c	Fri Aug 04 10:41:27 2006 +0100
     1.3 @@ -871,7 +871,7 @@ static void pc_init1(uint64_t ram_size, 
     1.4      cmos_init(ram_size, boot_device, bs_table, timeoffset);
     1.5  
     1.6      /* using PIIX4 acpi model */
     1.7 -    if (pci_enabled)
     1.8 +    if (pci_enabled && acpi_enabled)
     1.9          pci_piix4_acpi_init(pci_bus);
    1.10  
    1.11      if (pci_enabled && usb_enabled) {
     2.1 --- a/tools/ioemu/vl.c	Fri Aug 04 10:29:18 2006 +0100
     2.2 +++ b/tools/ioemu/vl.c	Fri Aug 04 10:41:27 2006 +0100
     2.3 @@ -167,6 +167,8 @@ int xc_handle;
     2.4  
     2.5  time_t timeoffset = 0;
     2.6  
     2.7 +int acpi_enabled = 0;
     2.8 +
     2.9  char domain_name[1024] = { 'H','V', 'M', 'X', 'E', 'N', '-'};
    2.10  extern int domid;
    2.11  
    2.12 @@ -4807,6 +4809,7 @@ void help(void)
    2.13  	   "-vnc display    start a VNC server on display\n"
    2.14             "-vncviewer      start a vncviewer process for this domain\n"
    2.15             "-timeoffset     time offset (in seconds) from local time\n"
    2.16 +           "-acpi           disable or enable ACPI of HVM domain \n"
    2.17             "\n"
    2.18             "During emulation, the following keys are useful:\n"
    2.19             "ctrl-alt-f      toggle full screen\n"
    2.20 @@ -4901,6 +4904,7 @@ enum {
    2.21      QEMU_OPTION_d,
    2.22      QEMU_OPTION_vcpus,
    2.23      QEMU_OPTION_timeoffset,
    2.24 +    QEMU_OPTION_acpi,
    2.25  };
    2.26  
    2.27  typedef struct QEMUOption {
    2.28 @@ -4983,6 +4987,7 @@ const QEMUOption qemu_options[] = {
    2.29      { "d", HAS_ARG, QEMU_OPTION_d },
    2.30      { "vcpus", 1, QEMU_OPTION_vcpus },
    2.31      { "timeoffset", HAS_ARG, QEMU_OPTION_timeoffset },
    2.32 +    { "acpi", 0, QEMU_OPTION_acpi },
    2.33      { NULL },
    2.34  };
    2.35  
    2.36 @@ -5710,6 +5715,9 @@ int main(int argc, char **argv)
    2.37              case QEMU_OPTION_timeoffset:
    2.38                  timeoffset = strtol(optarg, NULL, 0);
    2.39                  break;
    2.40 +            case QEMU_OPTION_acpi:
    2.41 +                acpi_enabled = 1;
    2.42 +                break;
    2.43              }
    2.44          }
    2.45      }
     3.1 --- a/tools/ioemu/vl.h	Fri Aug 04 10:29:18 2006 +0100
     3.2 +++ b/tools/ioemu/vl.h	Fri Aug 04 10:41:27 2006 +0100
     3.3 @@ -159,6 +159,7 @@ extern const char *keyboard_layout;
     3.4  extern int kqemu_allowed;
     3.5  extern int win2k_install_hack;
     3.6  extern int usb_enabled;
     3.7 +extern int acpi_enabled;
     3.8  extern int smp_cpus;
     3.9  
    3.10  /* XXX: make it dynamic */
     4.1 --- a/tools/python/xen/sv/CreateDomain.py	Fri Aug 04 10:29:18 2006 +0100
     4.2 +++ b/tools/python/xen/sv/CreateDomain.py	Fri Aug 04 10:41:27 2006 +0100
     4.3 @@ -180,6 +180,7 @@ class CreateFinish( Sheet ):
     4.4          vals.ssidref = -1
     4.5          vals.bootloader = None
     4.6          vals.usb = []
     4.7 +        vals.acpi = []
     4.8          
     4.9          #setup vifs
    4.10          
     5.1 --- a/tools/python/xen/xend/image.py	Fri Aug 04 10:29:18 2006 +0100
     5.2 +++ b/tools/python/xen/xend/image.py	Fri Aug 04 10:41:27 2006 +0100
     5.3 @@ -251,7 +251,7 @@ class HVMImageHandler(ImageHandler):
     5.4      def parseDeviceModelArgs(self, imageConfig, deviceConfig):
     5.5          dmargs = [ 'boot', 'fda', 'fdb', 'soundhw',
     5.6                     'localtime', 'serial', 'stdvga', 'isa', 'vcpus',
     5.7 -		   'usb', 'usbdevice']
     5.8 +		   'acpi', 'usb', 'usbdevice']
     5.9          ret = []
    5.10          for a in dmargs:
    5.11              v = sxp.child_value(imageConfig, a)