From ecb587e4ca5d74bc2ff3883b3183ec4c89bf960c Mon Sep 17 00:00:00 2001 From: Jim Fehlig Date: Wed, 11 Jan 2017 17:42:42 -0700 Subject: [PATCH] libxl: always enable pae for x86_64 HVM For HVM domains, pae is only set in libxl_domain_build_info when explicitly specified in the hypervisor config. This is fine for i686 machines, but is incorrect behavior for x86_64 machines where pae must always be enabled. See the following discussion for additional details https://www.redhat.com/archives/libvir-list/2017-January/msg00254.html --- docs/news.xml | 11 +++++++++++ src/libxl/libxl_domain.c | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index c19bbbb126..8a876e998f 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -214,6 +214,17 @@ default to the general working scenario. + + + libxl: always enable pae for x86_64 HVM + + + By default pae is disabled in libxl. Without an explicit <pae/> + setting in the domain <features> configuration, an x86_64 HVM + domain would be get an i686 environment. pae should always be enabled + for x86_64 HVM domains. + + diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index fbe7ee5ff6..a5314b0b19 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -410,6 +410,12 @@ libxlDomainDefPostParse(virDomainDefPtr def, if (xenDomainDefAddImplicitInputDevice(def) < 0) return -1; + /* For x86_64 HVM, always enable pae */ + if (def->os.type == VIR_DOMAIN_OSTYPE_HVM && + def->os.arch == VIR_ARCH_X86_64) { + def->features[VIR_DOMAIN_FEATURE_PAE] = VIR_TRISTATE_SWITCH_ON; + } + return 0; } -- 2.47.2