All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Tim Deegan" <tim@xen.org>
Subject: [PATCH v2 05/13] x86/shadow: don't generate bogus "domain dying" trace entry from sh_page_fault()
Date: Thu, 30 Mar 2023 13:28:04 +0200	[thread overview]
Message-ID: <6363f9aa-4030-d889-a85d-f5834e607d85@suse.com> (raw)
In-Reply-To: <fae14dc0-83aa-4647-6755-dd6913b6dba4@suse.com>

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@suse.com>
---
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;
     }
 



  parent reply	other threads:[~2023-03-30 11:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 11:22 [PATCH v2 00/13] x86: assorted shadow mode adjustments Jan Beulich
2023-03-30 11:24 ` [PATCH v2 01/13] x86/shadow: rename SHADOW_FOREACH_L<N>E() to FOREACH_PRESENT_L<N>E() Jan Beulich
2023-03-30 12:20   ` Andrew Cooper
2023-03-30 11:26 ` [PATCH v2 02/13] x86/shadow: drop redundant present bit checks from FOREACH_PRESENT_L<N>E() "bodies" Jan Beulich
2023-03-30 11:26 ` [PATCH v2 03/13] x86/shadow: reduce explicit log-dirty recording for HVM Jan Beulich
2023-03-30 11:27 ` [PATCH v2 04/13] x86/shadow: call sh_update_cr3() directly from sh_page_fault() Jan Beulich
2023-03-30 11:28 ` Jan Beulich [this message]
2023-03-30 11:28 ` [PATCH v2 06/13] x86/shadow: use lighter weight mode checks Jan Beulich
2023-03-30 11:29 ` [PATCH v2 07/13] x86/shadow: move OOS functions to their own file Jan Beulich
2023-03-30 11:30 ` [PATCH v2 08/13] x86/shadow: sh_rm_write_access_from_sl1p() is HVM-only Jan Beulich
2023-03-30 11:30 ` [PATCH v2 09/13] x86/shadow: drop is_hvm_...() where easily possible Jan Beulich
2023-03-30 11:30 ` [PATCH v2 10/13] x86/shadow: make monitor table create/destroy more consistent Jan Beulich
2023-03-30 11:31 ` [PATCH v2 11/13] x86/shadow: vCPU-s never have "no mode" Jan Beulich
2023-03-30 11:31 ` [PATCH v2 12/13] x86/shadow: "monitor table" is a HVM-only concept Jan Beulich
2023-03-30 11:32 ` [PATCH v2 13/13] x86/shadow: adjust monitor table prealloc amount Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6363f9aa-4030-d889-a85d-f5834e607d85@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=tim@xen.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.