mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
[IA64] Implement guest_os_type for ia64
This makes use of the domain config option guest_os_type for ia64 and removes the backing for the previous ACPI based mechanism used previously. A user wanting optimal performance for a specific type of OS guest running in an HVM domain should make use of this new option. See updated xmexmaple.vti for available options. All supported OSes should always work using the default option or leaving the option unspecified. Originally based on patch from Zhang Xin. Signed-off-by: Alex Williamson <alex.williamson@hp.com>
This commit is contained in:
1 parent
d1ecffb2a9
commit
1ea2ab2fe8
10 files changed
+129
-74
No files matched your search
@@ -604,6 +604,21 @@ static PyObject *pyxc_nvram_init(XcObject *self,
|
||||
Py_INCREF(zero);
|
||||
return zero;
|
||||
}
|
||||
|
||||
static PyObject *pyxc_set_os_type(XcObject *self,
|
||||
PyObject *args)
|
||||
{
|
||||
char *os_type;
|
||||
uint32_t dom;
|
||||
|
||||
if ( !PyArg_ParseTuple(args, "si", &os_type, &dom) )
|
||||
return NULL;
|
||||
|
||||
xc_ia64_set_os_type(self->xc_handle, os_type, dom);
|
||||
|
||||
Py_INCREF(zero);
|
||||
return zero;
|
||||
}
|
||||
#endif /* __ia64__ */
|
||||
|
||||
static PyObject *pyxc_hvm_build(XcObject *self,
|
||||
@@ -1558,6 +1573,11 @@ static PyMethodDef pyxc_methods[] = {
|
||||
METH_VARARGS, "\n"
|
||||
"Init nvram in IA64 platform\n"
|
||||
"Returns: [int] 0 on success; -1 on error.\n" },
|
||||
{ "set_os_type",
|
||||
(PyCFunction)pyxc_set_os_type,
|
||||
METH_VARARGS, "\n"
|
||||
"Set guest OS type on IA64 platform\n"
|
||||
"Returns: [int] 0 on success; -1 on error.\n" },
|
||||
#endif /* __ia64__ */
|
||||
{ "domain_ioport_permission",
|
||||
(PyCFunction)pyxc_domain_ioport_permission,
|
||||
|
||||
@@ -541,6 +541,8 @@ class IA64_HVM_ImageHandler(HVMImageHandler):
|
||||
def buildDomain(self):
|
||||
xc.nvram_init(self.vm.getName(), self.vm.getDomid())
|
||||
xc.hvm_set_param(self.vm.getDomid(), HVM_PARAM_VHPT_SIZE, self.vhpt)
|
||||
if self.guest_os_type is not None:
|
||||
xc.set_os_type(self.guest_os_type.lower(), self.vm.getDomid())
|
||||
return HVMImageHandler.buildDomain(self)
|
||||
|
||||
def getRequiredAvailableMemory(self, mem_kb):
|
||||
|
||||