mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/shadow: Drop dubious lastpage diagnostic
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. It is presumably left-over debugging, as it interlinks the behaviour of all vCPUs in chronological order. Based on the read-only p2m types, this diagnostic can be tripped by entirely legitimate guest behaviour. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
848ca4e75f
commit
b5d8b03db1
1 file changed
-7
@@ -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
|
||||
|
||||