]> git.baikalelectronics.ru Git - kernel.git/commitdiff
xen: assume XENFEAT_mmu_pt_update_preserve_ad being set for pv guests
authorJuergen Gross <jgross@suse.com>
Fri, 30 Jul 2021 07:18:03 +0000 (09:18 +0200)
committerJuergen Gross <jgross@suse.com>
Mon, 30 Aug 2021 09:57:48 +0000 (11:57 +0200)
XENFEAT_mmu_pt_update_preserve_ad is always set in Xen 4.0 and newer.
Remove coding assuming it might be zero.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/r/20210730071804.4302-3-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/x86/xen/enlighten_pv.c
arch/x86/xen/mmu_pv.c

index 03149422dce2ba1024926ccd80acab010a08dd4b..753f63734c1345bdeb64b78e16d7363fad5e647a 100644 (file)
@@ -116,9 +116,8 @@ static void __init xen_banner(void)
        HYPERVISOR_xen_version(XENVER_extraversion, &extra);
 
        pr_info("Booting paravirtualized kernel on %s\n", pv_info.name);
-       printk(KERN_INFO "Xen version: %d.%d%s%s\n",
-              version >> 16, version & 0xffff, extra.extraversion,
-              xen_feature(XENFEAT_mmu_pt_update_preserve_ad) ? " (preserve-AD)" : "");
+       pr_info("Xen version: %d.%d%s (preserve-AD)\n",
+               version >> 16, version & 0xffff, extra.extraversion);
 }
 
 static void __init xen_pv_init_platform(void)
@@ -1302,13 +1301,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
        xen_init_apic();
 #endif
 
-       if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) {
-               pv_ops.mmu.ptep_modify_prot_start =
-                       xen_ptep_modify_prot_start;
-               pv_ops.mmu.ptep_modify_prot_commit =
-                       xen_ptep_modify_prot_commit;
-       }
-
        machine_ops = xen_machine_ops;
 
        /*
index ade789e73ee420092d22f1e8cdbbf53a0413d74e..1df5f01529e59856fcde44d615650a07d1c90c83 100644 (file)
@@ -2099,8 +2099,8 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = {
        .set_pte = xen_set_pte_init,
        .set_pmd = xen_set_pmd_hyper,
 
-       .ptep_modify_prot_start = __ptep_modify_prot_start,
-       .ptep_modify_prot_commit = __ptep_modify_prot_commit,
+       .ptep_modify_prot_start = xen_ptep_modify_prot_start,
+       .ptep_modify_prot_commit = xen_ptep_modify_prot_commit,
 
        .pte_val = PV_CALLEE_SAVE(xen_pte_val),
        .pgd_val = PV_CALLEE_SAVE(xen_pgd_val),