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

[PATCH v3 03/12] 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: Tue, 16 May 2023 09:38:47 +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=Je87SJkHd+CatcG6yu9Imtn4DlVtYLFfArWG7ib5DLQ=; b=g22gCHQBtUmWzEcRCNdnuLtFvbJF2keC/W5fLxStVxFoKzaNyoDkiqZazmS78d5HZnNa/odYGrgP2L6bry+5h/U51/ag15++MCBq87D0Zk5BYGgVJgPUDRSHXHZXeCEIW3uxDmMAIqCMZeNRVkqyyRoenS77PQ8pDR3HKcGxeqMkH7qPdQZ3eQQSzCYIum5nhOLxr4ZbxfKz/HDrmsBgQLyNaDXjeP8JsSPpvhDhlA/zF33ur25nZMzcbajCAYf87EaHEMm1ruvoSbwwRIkSZGHbe1PRJypIBbeIQQDOEDdDJLt9o6x/d5KY2V3TS+IKWaRBo6qmXThfwXdn5BGmBA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WsbByeVcUA2TyjPDo+eQZHTPCcDRQAcRIzA26v6kAm4IaqYEaFv3oxCdVG9DBhrlXNjhJhgfGG/QwHZfA+sd4J3uslvJ+nbH8ebxDTKSAxH9Lw3PQUoUNrRfigarVlIgZ0t04CqtrXh5Nut2/H6z0FVZC00Zv4ztvGTwXvChZQwyZzp9dHq3CQI6cMQ9899Wo8SEkTADxPeiFDruccfAEtOpeEbYkJ15mUFFm6PXtTlDnVxueqY+XgZeVXbIGExU4B+bql8dUe8hS1tmMqpDinMeviRB6/C1l8dtNVkW0oJcOQsxWsRbZgHJ3+C0DIZMMENa4qBh2B7+ecznzbopSg==
  • 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: Tue, 16 May 2023 07:39:02 +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
@@ -2480,10 +2480,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®.