diff mbox series

[WIP,08/14] svm: Do NPF trace before calling hvm_hap_nested_page_fault

Message ID 20240626133853.4150731-9-george.dunlap@cloud.com (mailing list archive)
State New
Headers show
Series AMD Nested Virt Preparation | expand

Commit Message

George Dunlap June 26, 2024, 1:38 p.m. UTC
Unfortunately I've forgotten exactly why I made this change.  I
suspect that there were other traces (like MMIO traces) which were
being put before the NPF trace; but to understand the trace record
you'd want to have the NPF information first.

Signed-off-by: George Dunlap <georg.dunlap@cloud.com>
---
 xen/arch/x86/hvm/svm/svm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index abe665ee43..240401dc77 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1614,8 +1614,6 @@  static void svm_do_nested_pgfault(struct vcpu *v,
     else if ( pfec & NPT_PFEC_in_gpt )
         npfec.kind = npfec_kind_in_gpt;
 
-    ret = hvm_hap_nested_page_fault(gpa, ~0UL, npfec);
-
     if ( tb_init_done )
     {
         struct {
@@ -1636,6 +1634,8 @@  static void svm_do_nested_pgfault(struct vcpu *v,
         trace(TRC_HVM_NPF, sizeof(_d), &_d);
     }
 
+    ret = hvm_hap_nested_page_fault(gpa, ~0UL, npfec);
+
     switch ( ret )
     {
     case 1: