[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 05/13] x86/shadow: don't generate bogus "domain dying" trace entry from sh_page_fault()


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 30 Mar 2023 13:28:04 +0200
  • 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=bLFXY1A1PoRDeG2OxMqFXZeghqkcVHyCuf7lr3QrX/U=; b=LGIbasSAViVCSKX+dCOV9iyH+d19WKFAnbd2vtR0Eem1zG+jt69M4tfe3W8NM5RJ2e3OVTERrg3gYtvPJAHhAlnMleA81Xl3z7uVVZJ59WptKej4lb8ry5DyxqmsnDyiw+rLeB2Tv0PMrIrxzpDcHuW27bhaN/iNSIafMgJwUlsWRxb+qFDCCXPN9B/yhSoKw3LcIhA5281PjEiN3I/iHTp1Dry3MJmuryhMMb/f846P4UOnaoqQbWoKImcT28PBcrs4SUWHKHEifmy3oxiLQAAr5dtaMod8tIMM+nMuJutsi/h10JVOJHIcUntIbGEJ3RPRZ5Te9XJhus3m/j3Y2w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dHhl5j7FNcvkHOfe24V4SM18kCPTzXi+RRxUi7vk0sifUa3lgs6Mp69rZY35nLyx4KsMo0nGDgSmaiombpLoTpHjZZnlfVsHZ1u9sJjg9ZTbc3WPqwmF7GJstR8Nggi7kLa8K8tqEFUG4+v5DsBIJVU1A8QXQRux9wMkH8K3X2cYFkFKDhGyZaoo0tDHDze38gYKY8lZ2ulPvJ1fEzg/S0Zx9vL+K6el6lB0n9wA5ZiA5jhAp32n+HZokynrQyczDfscjXs2wR/UdCpfPKFzb68UorZ5X3jZ6BSglv+4SlNyQc82o9AJuRCATsh2DoBjJHhS9DhXjMAvPVutB2H0Jg==
  • 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>, George Dunlap <george.dunlap@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>
  • Delivery-date: Thu, 30 Mar 2023 11:28:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

When in 3-level guest mode we help a guest to stay alive, we also
shouldn't emit a trace entry to the contrary. Move the invocation up
into the respective #ifdef, noting that while this moves it into the
locked region, emitting trace records with the paging lock held is okay
(as done elsewhere as well), just needlessly increasing lock holding
time a little.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: New.

--- a/xen/arch/x86/mm/shadow/multi.c
+++ b/xen/arch/x86/mm/shadow/multi.c
@@ -2492,10 +2492,10 @@ static int cf_check sh_page_fault(
         sh_update_cr3(v, 0, false);
 #else
         ASSERT(d->is_shutting_down);
+        trace_shadow_gen(TRC_SHADOW_DOMF_DYING, va);
 #endif
         paging_unlock(d);
         put_gfn(d, gfn_x(gfn));
-        trace_shadow_gen(TRC_SHADOW_DOMF_DYING, va);
         return 0;
     }
 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.