|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] x86/hvm: Fix the use of "hap=0" following c/s c0902a9a143a
commit 4ca8eab5ce1893b3048b06921f12157d33ab60f7
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Wed Oct 9 19:21:14 2019 +0100
Commit: Wei Liu <wl@xxxxxxx>
CommitDate: Thu Oct 10 10:17:21 2019 +0100
x86/hvm: Fix the use of "hap=0" following c/s c0902a9a143a
c/s c0902a9a143a refactored hvm_enable() a little, but dropped the logic
which
cleared hap_supported in the case that the user had asked for it off.
This results in Xen booting up, claiming:
(XEN) HVM: Hardware Assisted Paging (HAP) detected but disabled
but with HAP advertised via sysctl, and XEN_DOMCTL_CDF_hap being accepted in
domain_create().
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Paul Durrant <paul@xxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Wei Liu <wl@xxxxxxx>
Release-acked-by: Juergen Gross <jgross@xxxxxxxx>
---
xen/arch/x86/hvm/hvm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index c22cb39cf3..9acd359c99 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -142,7 +142,7 @@ static struct notifier_block cpu_nfb = {
.notifier_call = cpu_callback
};
-static bool __init hap_supported(const struct hvm_function_table *fns)
+static bool __init hap_supported(struct hvm_function_table *fns)
{
if ( !fns->hap_supported )
{
@@ -152,6 +152,7 @@ static bool __init hap_supported(const struct
hvm_function_table *fns)
if ( !opt_hap_enabled )
{
+ fns->hap_supported = 0;
printk("HVM: Hardware Assisted Paging (HAP) detected but disabled\n");
return false;
}
@@ -175,7 +176,7 @@ static int __init hvm_enable(void)
hvm_enabled = 1;
printk("HVM: %s enabled\n", fns->name);
- if ( !hap_supported(fns) )
+ if ( !hap_supported(&hvm_funcs) )
clear_iommu_hap_pt_share();
else
{
--
generated by git-patchbot for /home/xen/git/xen.git#staging
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |