This is a global variable (actually 3, one per GUEST_PAGING_LEVEL), operated on using atomics only (with no regard to what else shares the same cacheline), which emits a diagnostic (in debug builds only) without changing any program behaviour.
Based on read-only p2m types including logdirty, this diagnostic can be tripped by entirely legitimate guest behaviour. Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> CC: Roger Pau Monné <roger....@citrix.com> CC: Wei Liu <w...@xen.org> CC: George Dunlap <george.dun...@eu.citrix.com> CC: Tim Deegan <t...@xen.org> --- xen/arch/x86/mm/shadow/multi.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c index 8b3e678fa0fa..3b06cfaf9a5a 100644 --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -2597,14 +2597,7 @@ static int cf_check sh_page_fault( /* Ignore attempts to write to read-only memory. */ if ( p2m_is_readonly(p2mt) && (ft == ft_demand_write) ) - { - static unsigned long lastpage; - if ( xchg(&lastpage, va & PAGE_MASK) != (va & PAGE_MASK) ) - gdprintk(XENLOG_DEBUG, "guest attempted write to read-only memory" - " page. va page=%#lx, mfn=%#lx\n", - va & PAGE_MASK, mfn_x(gmfn)); goto emulate_readonly; /* skip over the instruction */ - } /* In HVM guests, we force CR0.WP always to be set, so that the * pagetables are always write-protected. If the guest thinks -- 2.11.0