Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Looking at the kernel source I've noticed that the 'vmsa' struct is inside the 'sev_es' member of 'struct vcpu_svm' which is in the context of the script accessed as $svm.
Could you please try updating the script to say:
dump_vmsa($svm->sev_es->vmsa)
The 'vmsa' struct was moved out in kernel commit:
commit b67a4cc35c9f726999fa29880713ce72d4e39e8d
Author: Peter Gonda <pgonda>
Date: Thu Oct 21 10:42:59 2021 -0700
KVM: SEV: Refactor out sev_es_state struct
Move SEV-ES vCPU metadata into new sev_es_state struct from vcpu_svm.
I don't think it's feasible for libvirt to try to keep that file working as it's referencing specific line(!!!!!) of kernel source code. In this case also a different change broke it.
(In reply to Peter Krempa from comment #1)
> Looking at the kernel source I've noticed that the 'vmsa' struct is inside
> the 'sev_es' member of 'struct vcpu_svm' which is in the context of the
> script accessed as $svm.
>
> Could you please try updating the script to say:
>
> dump_vmsa($svm->sev_es->vmsa)
It works after updating to this line:
➜ ~ stap /usr/share/doc/libvirt-docs/examples/systemtap/amd-sev-es-vmsa.stp
Running
In upstream we came to the conclusion that bugs against this file are invalid as it's just an example which in most cases is expected to be editted. We'll be adding the following disclaimer to emphasisze that:
+# NOTE: This directly references specific structures and places in the
+# kernel source code. It is expected that this example will need to be
+# editted to match the kernel you intend to run it against.
Description of problem: As subject Version-Release number of selected component (if applicable): kernel-5.14.0-283.el9.x86_64 libvirt-9.0.0-7.el9.x86_64 systemtap-4.8-2.el9.x86_64 How reproducible: 100% Steps to Reproduce: 1. Install systemtap; run stap-prep to prepare for systemtap; install 'libvirt*' packages 2. Change to /usr/share/doc/libvirt-docs/examples/systemtap 3. Run the systemtap scripts. # stap amd-sev-es-vmsa.stp semantic error: unable to find member 'vmsa' for struct vcpu_svm (alternatives: vmcb, vcpu, asid, msrpm, sev_es, vmcb01, ir_list, svm_data, nested, dfr_reg, ldr_reg, tsc_aux, current_vmcb, next_rip, msr_decfg, spec_ctrl, tsc_ratio_msr, ir_list_lock, lbrv_enabled, nmi_iret_rip, nmi_l1_to_l2, vgif_enabled, nrips_enabled, soft_int_csbase, nmi_singlestep, virt_spec_ctrl, sysenter_eip_hi, sysenter_esp_hi, soft_int_old_rip, avic_backing_page, soft_int_injected, soft_int_next_rip, guest_state_loaded, tsc_scaling_enabled, pause_filter_enabled, shadow_msr_intercept, avic_physical_id_cache, pause_threshold_enabled, v_vmload_vmsave_enabled, x2avic_msrs_intercepted, nmi_singlestep_guest_rflags): operator '->' at amd-sev-es-vmsa.stp:47:17 source: dump_vmsa($svm->vmsa) ^ semantic error: unresolved type : identifier '$svm' at :47:13 source: dump_vmsa($svm->vmsa) ^ Pass 2: analysis failed. [man error::pass2] # stap lock-debug.stp semantic error: while resolving probe point: identifier 'lock' at lock-debug.stp:54:7 source: probe lock.call ^ semantic error: no match: identifier 'call' at :54:12 source: probe lock.call ^ Pass 2: analysis failed. [man error::pass2] Number of similar error messages suppressed: 2. Rerun with -v to see them. Actual results: Fail to run lock-debug.stp and amd-sev-es-vmsa.stp Expected results: Run lock-debug.stp and amd-sev-es-vmsa.stp successfully Additional info: