@@ -1196,8 +1299,19 @@ static int sev_local_send(struct kvm *kvm, struct kvm_sev_cmd *argp)
INIT_LIST_HEAD(&entry->regions_list);
list_replace_init(&sev->regions_list, &entry->regions_list);
+ if (sev_es_guest(kvm)) {
+ /*
+ * If this is an ES guest, we need to move each VMCB's VMSA into a
+ * list for migration.
+ */
+ entry->es_enabled = true;
+ entry->ap_jump_table = sev->ap_jump_table;
+ if (create_vmsa_list(kvm, entry))
+ goto e_listdel;
+ }
+