Commit Graph

4 Commits

Author SHA1 Message Date
Tim Wiederhake
bc77182ea4 Fix some typos
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
2023-03-09 14:09:16 +01:00
Peter Krempa
83a78633a7 examples: systemtap: Update to linux-6.3 (rc1)
The 'vmsa' struct was moved out of 'struct vcpu_svm' into the 'sev_es'
sub-struct in linux commit:

  commit b67a4cc35c9f726999fa29880713ce72d4e39e8d
  Author: Peter Gonda <pgonda@google.com>
  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.

Also update the line reference to have more margin.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-03-06 13:35:44 +01:00
Peter Krempa
c9291fceef examples: systemtap: Warn users to properly update 'amd-sev-es-vmsa.stp'
The script references a very specific line in the kernel source code and
a very specific struct. Further changes to the kernel are likely going
to break it. Set the expectations by adding a warning to the reader.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2023-03-06 13:35:34 +01:00
Daniel P. Berrangé
d154b49a7e scripts: add systemtap script for capturing SEV-ES VMSA
In general we expect to be able to construct a SEV-ES VMSA
blob from knowledge about the AMD achitectural CPU register
defaults, KVM setup and QEMU setup. If any of this unexpectedly
changes, figuring out what's wrong could be horrible. This
systemtap script demonstrates how to capture the real VMSA
that is used for a SEV-ES as it is booted. The captured data
can be fed into the 'sevctl vmsa show' command in order to
produce formatted info with named registers, allowing a
'diff' to be performed.

This script will need updating for any kernel version that is
not 6.0, to set the correct line numbers.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-11-15 11:09:30 +00:00