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 <features> 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
This commit is contained in:
Jim Fehlig 2017-01-11 17:42:42 -07:00
parent f8ec272d98
commit ecb587e4ca
2 changed files with 17 additions and 0 deletions

View File

@ -214,6 +214,17 @@
default to the general working scenario.
</description>
</change>
<change>
<summary>
libxl: always enable pae for x86_64 HVM
</summary>
<description>
By default pae is disabled in libxl. Without an explicit &lt;pae/&gt;
setting in the domain &lt;features&gt; configuration, an x86_64 HVM
domain would be get an i686 environment. pae should always be enabled
for x86_64 HVM domains.
</description>
</change>
</section>
</release>
<release version="v2.5.0" date="2016-12-04">

View File

@ -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;
}