Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Make pat_init() a NOOP on XENPV; it causes ...



details:   https://anonhg.NetBSD.org/src/rev/5b4b93d4725a
branches:  trunk
changeset: 1020612:5b4b93d4725a
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Apr 17 18:03:21 2021 +0000

description:
Make pat_init() a NOOP on XENPV; it causes a trap with Xen 4.15

diffstat:

 sys/arch/x86/x86/pmap.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r ba8c70b256a1 -r 5b4b93d4725a sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c   Sat Apr 17 16:58:04 2021 +0000
+++ b/sys/arch/x86/x86/pmap.c   Sat Apr 17 18:03:21 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.409 2021/02/06 21:24:19 jdolecek Exp $      */
+/*     $NetBSD: pmap.c,v 1.410 2021/04/17 18:03:21 bouyer Exp $        */
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017, 2019, 2020 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.409 2021/02/06 21:24:19 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.410 2021/04/17 18:03:21 bouyer Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -915,6 +915,7 @@
 void
 pat_init(struct cpu_info *ci)
 {
+#ifndef XENPV
        uint64_t pat;
 
        if (!(ci->ci_feat_val[0] & CPUID_PAT))
@@ -928,6 +929,7 @@
 
        wrmsr(MSR_CR_PAT, pat);
        cpu_pat_enabled = true;
+#endif
 }
 
 static pt_entry_t



Home | Main Index | Thread Index | Old Index