Module Name: src
Committed By: bouyer
Date: Sat May 7 14:59:25 UTC 2022
Modified Files:
src/sys/arch/x86/x86: pmap.c
Log Message:
return after calling xen_pagezero(), don't fall back to the legacy
pmap_zero_page() method.
This should only affect performances.
To generate a diff of this commit:
cvs rdiff -u -r1.413 -r1.414 src/sys/arch/x86/x86/pmap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.413 src/sys/arch/x86/x86/pmap.c:1.414
--- src/sys/arch/x86/x86/pmap.c:1.413 Sun Jan 2 20:28:53 2022
+++ src/sys/arch/x86/x86/pmap.c Sat May 7 14:59:25 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.413 2022/01/02 20:28:53 andvar Exp $ */
+/* $NetBSD: pmap.c,v 1.414 2022/05/07 14:59:25 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.413 2022/01/02 20:28:53 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.414 2022/05/07 14:59:25 bouyer Exp $");
#include "opt_user_ldt.h"
#include "opt_lockdebug.h"
@@ -3813,8 +3813,10 @@ pmap_zero_page(paddr_t pa)
memset(PAGE_ALIGNED(PMAP_DIRECT_MAP(pa)), 0, PAGE_SIZE);
#else
#if defined(XENPV)
- if (XEN_VERSION_SUPPORTED(3, 4))
+ if (XEN_VERSION_SUPPORTED(3, 4)) {
xen_pagezero(pa);
+ return;
+ }
#endif
struct cpu_info *ci;
pt_entry_t *zpte;