mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/mm: pagetable_dying() is HVM+SHADOW_PAGING only
The referenced commit didn't go far enough, leaving a Misra rule 2.1
(unreachable code) violation: The function lacks "noreturn" in this
configuration. Since with SHADOW_PAGING=n paging_mode_shadow() is compile-
time-constant false, the compiler can DCE the call site. Hence we can
avoid building the function itself altogether.
No functional change.
Fixes: 2fb2dee1ac ("x86/mm: pagetable_dying() is HVM-only")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger@xenproject.org>
This commit is contained in:
1 parent
d7bf1b8ea2
commit
4fcd42a958
1 file changed
+2
-6
@@ -872,22 +872,18 @@ int paging_enable(struct domain *d, u32 mode)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HVM
|
||||
#if defined(CONFIG_HVM) && defined(CONFIG_SHADOW_PAGING)
|
||||
/* Called from the guest to indicate that a process is being torn down
|
||||
* and therefore its pagetables will soon be discarded */
|
||||
void pagetable_dying(paddr_t gpa)
|
||||
{
|
||||
#ifdef CONFIG_SHADOW_PAGING
|
||||
struct vcpu *curr = current;
|
||||
|
||||
ASSERT(paging_mode_shadow(curr->domain));
|
||||
|
||||
curr->arch.paging.mode->shadow.pagetable_dying(gpa);
|
||||
#else
|
||||
BUG();
|
||||
#endif
|
||||
}
|
||||
#endif /* CONFIG_HVM */
|
||||
#endif /* HVM && SHADOW_PAGING */
|
||||
|
||||
/* Print paging-assistance info to the console */
|
||||
void paging_dump_domain_info(struct domain *d)
|
||||
|
||||