ia64/xen-unstable

changeset 16474:ad5fa636bc4e

[IA64] Create common guest_os_type domain config option

This is an optional domain config entry that may be used by
architecture specific builder code to setup various optimizations
based on the guest OS intended to run in the domain. Based on
patch from Zhang Xin.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Acked-by: Keir Fraser <keir.fraser@citrix.com>
author Alex Williamson <alex.williamson@hp.com>
date Thu Nov 29 11:54:31 2007 -0700 (2007-11-29)
parents 22f7a7a42b86
children 1de4e5056394
files tools/python/xen/xend/XendConfig.py tools/python/xen/xend/image.py tools/python/xen/xm/create.py
line diff
     1.1 --- a/tools/python/xen/xend/XendConfig.py	Wed Nov 28 12:38:58 2007 -0700
     1.2 +++ b/tools/python/xen/xend/XendConfig.py	Thu Nov 29 11:54:31 2007 -0700
     1.3 @@ -129,7 +129,8 @@ XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 
     1.4                          'nographic', 'pae', 'rtc_timeoffset', 'serial', 'sdl',
     1.5                          'soundhw','stdvga', 'usb', 'usbdevice', 'vnc',
     1.6                          'vncconsole', 'vncdisplay', 'vnclisten', 'timer_mode',
     1.7 -                        'vncpasswd', 'vncunused', 'xauthority', 'pci', 'vhpt']
     1.8 +                        'vncpasswd', 'vncunused', 'xauthority', 'pci', 'vhpt',
     1.9 +                        'guest_os_type' ]
    1.10  
    1.11  # Xen API console 'other_config' keys.
    1.12  XENAPI_CONSOLE_OTHER_CFG = ['vncunused', 'vncdisplay', 'vnclisten',
     2.1 --- a/tools/python/xen/xend/image.py	Wed Nov 28 12:38:58 2007 -0700
     2.2 +++ b/tools/python/xen/xend/image.py	Thu Nov 29 11:54:31 2007 -0700
     2.3 @@ -426,6 +426,7 @@ class HVMImageHandler(ImageHandler):
     2.4  
     2.5          self.apic = int(vmConfig['platform'].get('apic', 0))
     2.6          self.acpi = int(vmConfig['platform'].get('acpi', 0))
     2.7 +        self.guest_os_type = vmConfig['platform'].get('guest_os_type')
     2.8  
     2.9      # Return a list of cmd line args to the device models based on the
    2.10      # xm config file
     3.1 --- a/tools/python/xen/xm/create.py	Wed Nov 28 12:38:58 2007 -0700
     3.2 +++ b/tools/python/xen/xm/create.py	Thu Nov 29 11:54:31 2007 -0700
     3.3 @@ -454,6 +454,10 @@ gopts.var('usbdevice', val='NAME',
     3.4            fn=set_value, default='',
     3.5            use="Name of USB device to add?")
     3.6  
     3.7 +gopts.var('guest_os_type', val='NAME',
     3.8 +          fn=set_value, default='default',
     3.9 +          use="Guest OS type running in HVM")
    3.10 +
    3.11  gopts.var('stdvga', val='no|yes',
    3.12            fn=set_bool, default=0,
    3.13            use="Use std vga or cirrhus logic graphics")
    3.14 @@ -733,7 +737,9 @@ def configure_hvm(config_image, vals):
    3.15               'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
    3.16               'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
    3.17               'sdl', 'display', 'xauthority', 'rtc_timeoffset', 'monitor',
    3.18 -             'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci' ]
    3.19 +             'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci',
    3.20 +             'guest_os_type']
    3.21 +
    3.22      for a in args:
    3.23          if a in vals.__dict__ and vals.__dict__[a] is not None:
    3.24              config_image.append([a, vals.__dict__[a]])