[libvirt] [PATCH] libxl: always enable pae for x86_64 HVM

Martin Kletzander mkletzan at redhat.com
Thu Jan 12 09:06:00 UTC 2017


On Wed, Jan 11, 2017 at 05:45:27PM -0700, Jim Fehlig wrote:
>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
>Signed-off-by: Jim Fehlig <jfehlig at suse.com>
>---
> src/libxl/libxl_domain.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
>diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
>index fbe7ee5..a5314b0 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;
>+    }
>+

This will even rewrite explicit <pae enabled='no/>

I would check that it's not VIR_TRISTATE_SWITCH_OFF, then enable it and
during startup just fail if it is VIR_TRISTATE_SWITCH_ON.

>     return 0;
> }
>
>--
>2.9.2
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170112/0ed23437/attachment-0001.sig>


More information about the libvir-list mailing list