aboutsummaryrefslogtreecommitdiffstats
path: root/tools/python
diff options
context:
space:
mode:
authorcegger <none@none>2011-02-28 12:21:38 +0100
committercegger <none@none>2011-02-28 12:21:38 +0100
commit567ab9ef5644ca4ed77ed6605d004527e818077e (patch)
tree32b4253587a885c62bb485ebfc631dc2cefcbec3 /tools/python
parent347f5536686b04b7214488ffef2129a05848e761 (diff)
downloadxen-567ab9ef5644ca4ed77ed6605d004527e818077e.tar.gz
xen-567ab9ef5644ca4ed77ed6605d004527e818077e.tar.bz2
xen-567ab9ef5644ca4ed77ed6605d004527e818077e.zip
tools: Add nestedhvm guest config option
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Eddie Dong <eddie.dong@intel.com> Acked-by: Tim Deegan <Tim.Deegan@citrix.com> Committed-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'tools/python')
-rw-r--r--tools/python/xen/xend/XendConfig.py1
-rw-r--r--tools/python/xen/xend/XendConstants.py1
-rw-r--r--tools/python/xen/xend/XendDomainInfo.py13
-rw-r--r--tools/python/xen/xm/create.py7
4 files changed, 17 insertions, 5 deletions
diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py
index 5568d353e5..9c47e560e3 100644
--- a/tools/python/xen/xend/XendConfig.py
+++ b/tools/python/xen/xend/XendConfig.py
@@ -185,6 +185,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
'vhpt': int,
'guest_os_type': str,
'hap': int,
+ 'nestedhvm' : int,
'xen_extended_power_mgmt': int,
'pci_msitranslate': int,
'pci_power_mgmt': int,
diff --git a/tools/python/xen/xend/XendConstants.py b/tools/python/xen/xend/XendConstants.py
index 44069585d0..117d124a64 100644
--- a/tools/python/xen/xend/XendConstants.py
+++ b/tools/python/xen/xend/XendConstants.py
@@ -52,6 +52,7 @@ HVM_PARAM_TIMER_MODE = 10
HVM_PARAM_HPET_ENABLED = 11
HVM_PARAM_ACPI_S_STATE = 14
HVM_PARAM_VPT_ALIGN = 16
+HVM_PARAM_NESTEDHVM = 24 # x86
restart_modes = [
"restart",
diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py
index d5e92be7f5..9f7c4a30df 100644
--- a/tools/python/xen/xend/XendDomainInfo.py
+++ b/tools/python/xen/xend/XendDomainInfo.py
@@ -2585,10 +2585,15 @@ class XendDomainInfo:
xc.hvm_set_param(self.domid, HVM_PARAM_TIMER_MODE,
long(timer_mode))
- # Set Viridian interface configuration of domain
- viridian = self.info["platform"].get("viridian")
- if arch.type == "x86" and hvm and viridian is not None:
- xc.hvm_set_param(self.domid, HVM_PARAM_VIRIDIAN, long(viridian))
+ if arch.type == "x86" and hvm:
+ # Set Viridian interface configuration of domain
+ viridian = self.info["platform"].get("viridian")
+ if viridian is not None:
+ xc.hvm_set_param(self.domid, HVM_PARAM_VIRIDIAN, long(viridian))
+ # Set nestedhvm of domain
+ nestedhvm = self.info["platform"].get("nestedhvm")
+ if nestedhvm is not None:
+ xc.hvm_set_param(self.domid, HVM_PARAM_NESTEDHVM, long(nestedhvm))
# If nomigrate is set, disable migration
nomigrate = self.info["platform"].get("nomigrate")
diff --git a/tools/python/xen/xm/create.py b/tools/python/xen/xm/create.py
index 68cc8e86a4..5b52e3a706 100644
--- a/tools/python/xen/xm/create.py
+++ b/tools/python/xen/xm/create.py
@@ -633,6 +633,11 @@ gopts.var('hap', val='HAP',
use="""Hap status (0=hap is disabled;
1=hap is enabled.""")
+gopts.var('nestedhvm', val='NESTEDHVM',
+ fn=set_int, default=0,
+ use="""Nested HVM status (0=Nested HVM is disabled;
+ 1=Nested HVM is enabled.""")
+
gopts.var('s3_integrity', val='TBOOT_MEMORY_PROTECT',
fn=set_int, default=1,
use="""Should domain memory integrity be verified during S3?
@@ -1083,7 +1088,7 @@ def configure_hvm(config_image, vals):
'isa',
'keymap',
'localtime',
- 'nographic',
+ 'nestedhvm', 'nographic',
'opengl', 'oos',
'pae', 'pci', 'pci_msitranslate', 'pci_power_mgmt',
'rtc_timeoffset',