From 7d50aaad10e9ca0cac41a1f0ad09f0861ea6da16 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 14 Oct 2026 09:27:00 +0200 Subject: [PATCH] x86: constify local variables in mapcache_current_vcpu() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As of the referenced commit v won't be returned from the function anymore. Yet that was the sole reason for it to not be pointer-to-const. curr, which was introduced by that change, had no reason to be pointer-to-non- const from the start. Amends: 622c9a5ba95d ("x86/mm: accurately track which vCPU page-tables are loaded") Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné --- xen/arch/x86/domain_page.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/domain_page.c b/xen/arch/x86/domain_page.c index 72c00194f3..5744754f11 100644 --- a/xen/arch/x86/domain_page.c +++ b/xen/arch/x86/domain_page.c @@ -20,8 +20,8 @@ static inline struct vcpu *mapcache_current_vcpu(void) { - struct vcpu *v = this_cpu(pgtable_vcpu); - struct vcpu *curr = current; + const struct vcpu *v = this_cpu(pgtable_vcpu); + const struct vcpu *curr = current; /* * During early boot pgtable_vcpu is not set, callers must handle NULL.