[IA64] Create common guest_os_type domain config option
authorAlex Williamson <alex.williamson@hp.com>
Thu, 29 Nov 2007 18:54:31 +0000 (11:54 -0700)
committerAlex Williamson <alex.williamson@hp.com>
Thu, 29 Nov 2007 18:54:31 +0000 (11:54 -0700)
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>
tools/python/xen/xend/XendConfig.py
tools/python/xen/xend/image.py
tools/python/xen/xm/create.py

index 2f038da71992f29d98fb5d4c14c51bc5c4f5a0a7..d43355d2baee22d54bb89a3a22023cffdfbb772f 100644 (file)
@@ -129,7 +129,8 @@ XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 'boot', 'device_model', 'display',
                         'nographic', 'pae', 'rtc_timeoffset', 'serial', 'sdl',
                         'soundhw','stdvga', 'usb', 'usbdevice', 'vnc',
                         'vncconsole', 'vncdisplay', 'vnclisten', 'timer_mode',
-                        'vncpasswd', 'vncunused', 'xauthority', 'pci', 'vhpt']
+                        'vncpasswd', 'vncunused', 'xauthority', 'pci', 'vhpt',
+                        'guest_os_type' ]
 
 # Xen API console 'other_config' keys.
 XENAPI_CONSOLE_OTHER_CFG = ['vncunused', 'vncdisplay', 'vnclisten',
index f84d0dca7dd5fa7a67734421095353f731dcb852..a660e9faec2180c2812b3723f62c519efc5facde 100644 (file)
@@ -426,6 +426,7 @@ class HVMImageHandler(ImageHandler):
 
         self.apic = int(vmConfig['platform'].get('apic', 0))
         self.acpi = int(vmConfig['platform'].get('acpi', 0))
+        self.guest_os_type = vmConfig['platform'].get('guest_os_type')
 
     # Return a list of cmd line args to the device models based on the
     # xm config file
index b90e29d2862c7fc88fa1915dfdd15a53957f3964..b1ec86afa79a92ae6b671fd774feb97958c1c002 100644 (file)
@@ -454,6 +454,10 @@ gopts.var('usbdevice', val='NAME',
           fn=set_value, default='',
           use="Name of USB device to add?")
 
+gopts.var('guest_os_type', val='NAME',
+          fn=set_value, default='default',
+          use="Guest OS type running in HVM")
+
 gopts.var('stdvga', val='no|yes',
           fn=set_bool, default=0,
           use="Use std vga or cirrhus logic graphics")
@@ -733,7 +737,9 @@ def configure_hvm(config_image, vals):
              'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
              'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
              'sdl', 'display', 'xauthority', 'rtc_timeoffset', 'monitor',
-             'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci' ]
+             'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci',
+             'guest_os_type']
+
     for a in args:
         if a in vals.__dict__ and vals.__dict__[a] is not None:
             config_image.append([a, vals.__dict__[a]])