#include <linux/cc_platform.h>
#include <linux/smp.h>
#include <linux/string_choices.h>
+#include <linux/mutex.h>
#include <asm/apic.h>
#include <asm/perf_event.h>
DEFINE_PER_CPU(struct svm_cpu_data, svm_data);
+static DEFINE_MUTEX(vmcb_dump_mutex);
+
/*
* Only MSR_TSC_AUX is switched via the user return hook. EFER is switched via
* the VMCB, and the SYSCALL/SYSENTER MSRs are handled by VMLOAD/VMSAVE.
return;
}
+ guard(mutex)(&vmcb_dump_mutex);
+
vm_type = sev_snp_guest(vcpu->kvm) ? "SEV-SNP" :
sev_es_guest(vcpu->kvm) ? "SEV-ES" :
sev_guest(vcpu->kvm) ? "SEV" : "SVM";