Skip to contentSkip to conversation

x86/PV: make mmio_ro_emulated_write() static

PATCH In review Jan Beulich 3 participants 3 messages Jun 4, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/PV: make mmio_ro_emulated_write() static

It being non-static and it not having a declaration (anymore) violates one or more Misra rules, iirc.

Fixes ff3e5dfa7c2d ("x86/mm: move mmio_ro_emulated_write() to PV only file")
xen/arch/x86/pv/ro-page-fault.c +1 -1
@@ -337,7 +337,7 @@ static int cf_check mmcfg_intercept_writ
     return X86EMUL_OKAY;
 }
 
-int cf_check mmio_ro_emulated_write(
+static int cf_check mmio_ro_emulated_write(
     enum x86_segment seg,
     unsigned long offset,
     void *p_data,
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jan Beulich

It being non-static and it not having a declaration (anymore) violates one or more Misra rules, iirc.

Fixes ff3e5dfa7c2d ("x86/mm: move mmio_ro_emulated_write() to PV only file")

We are not checking for those rules in Eclair I think? Otherwise this won't have passed the CI testing. Or maybe we are just checking builds with !CONFIG_PV?

Thanks, Roger.

#2 lore raw
Quoted 7 lines · Roger Pau Monné
Quoted 5 lines · Jan Beulich

It being non-static and it not having a declaration (anymore) violates one or more Misra rules, iirc.

Fixes ff3e5dfa7c2d ("x86/mm: move mmio_ro_emulated_write() to PV only file")
Quoted 7 lines

We are not checking for those rules in Eclair I think? Otherwise this won't have passed the CI testing. Or maybe we are just checking builds with !CONFIG_PV?

Thanks, Roger.

That seems to be the case on x86. On Arm64 there is no override for CONFIG_PV [1], but perhaps that is unset by default? I'm not opposed to having more variants under analysis, but that is not something I can decide on individually.

Thanks,
Nicola

[1] https://gitlab.com/xen-project/hardware/xen/-/blob/staging/automation/gitlab-ci/analyze.yaml?ref_type=heads

Signature · 4 lines
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253