[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] x86/HVM: purge dubious lastpage diagnostic
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 2 Mar 2023 13:06:48 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZMZMLXesqsPROcVtwa0a3bbNLvjOhi5q6DookAxN+/4=; b=EZ34QJccMIbL1BCOQcNcb7K1Jxv1U5NmkU/A8blpTI/ofIRl3ppfyZzZ286bkrfW7EqsU1fRxAkUXvV45qclz/ayn7a/mwLeO7V89YYkTBukYNwHVjHUjfbBVC9iqPvdmS0dmF7+4KlzA6p0OkVxEBBEiL+Bns14F23GuYBwLV7SPy0iZdPr1Hrjp98smE8SiZk4Uz7XE3Rm51DWHuAgc2/mDSBS+3qGttpYes61gLdbfxGXkdPb1dpEQQoXfreNAhZSH3oa5I/g8y+95fT7COY62l2sqlB8y1T/RfdkvpCd2IK7q/ILBZq8Ok0liFBcdH8oKj2MGpE+7yF5F0K6Ng==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WgYKAZXJX4FJZ0sS3qwva0C8BARuWviUzp22OGQqFkfm1sYUC7WmQTuJOWrGMIekgbymPHjvz3+SenFZDl7xouowla/FKDNdsbcXEZEwyFianP6/vwYXahvtLL8MlPCMQI9dcS2YlmZOar2uTDbgkeYjEm06rIwSZWab1G2DgcMLQz3eeWPx17GmyjAfyUzC2A6IuZxfl5O1Ezf2kjBsKTyRJefzrOXqObPtDry2v38zCkeq15IvygPNrfMlVSK4oVyvAVtIGmu1njnIMeInthVEbn4IZNIxd/6vyHr0BtGOcwV5tRsMl7jg3GJG2iJqLTuzPLIPF5HGPbH2H5FLNA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Thu, 02 Mar 2023 12:07:08 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Quoting b5d8b03db136 ("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."
All the same applies here (it's only a single variable of course).
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3354,16 +3354,7 @@ static enum hvm_translation_result __hvm
memcpy(buf, p, count);
hvmemul_write_cache(v, gfn_to_gaddr(gfn) | pgoff, buf, count);
}
- else if ( p2m_is_discard_write(p2mt) )
- {
- static unsigned long lastpage;
-
- if ( xchg(&lastpage, gfn_x(gfn)) != gfn_x(gfn) )
- dprintk(XENLOG_G_DEBUG,
- "%pv attempted write to read-only gfn %#lx
(mfn=%#"PRI_mfn")\n",
- v, gfn_x(gfn), mfn_x(page_to_mfn(page)));
- }
- else
+ else if ( !p2m_is_discard_write(p2mt) )
{
if ( buf )
memcpy(p, buf, count);
|