提交 af521a01 编写于 作者: J Jim Fehlig

Add HAP to xen hypervisor capabilities

xen-unstable c/s 16931 introduced a per-domain setting for hvm
guests to enable/disable hardware assisted paging.  If disabled,
software techniques such as shadow page tables are used.  If enabled,
and the feature exists in underlying hardware, hardware support for
paging is used.

Xen does not provide a mechanism to discover the HAP capability, so
we advertise its availability for hvm guests on Xen >= 3.3.
上级 04197350
......@@ -2321,6 +2321,16 @@ xenHypervisorBuildCapabilities(virConnectPtr conn,
hv_minor > 0 ?
0 : 1)) == NULL)
goto no_memory;
/* Xen 3.3.x and beyond supports enabling/disabling
* hardware assisted paging. Default is off.
*/
if ((hv_major == 3 && hv_minor >= 3) || (hv_major > 3))
if (virCapabilitiesAddGuestFeature(guest,
"hap",
0,
1) == NULL)
goto no_memory;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册