diff mbox series

[PULL,37/45] i386/sev: Invoke launch_updata_data() for SNP class

Message ID 20240604064409.957105-38-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,01/45] virtio-blk: remove SCSI passthrough functionality | expand

Commit Message

Paolo Bonzini June 4, 2024, 6:44 a.m. UTC
From: Pankaj Gupta <pankaj.gupta@amd.com>

Invoke as sev_snp_launch_update_data() for SNP object.

Signed-off-by: Pankaj Gupta <pankaj.gupta@amd.com>
Message-ID: <20240530111643.1091816-27-pankaj.gupta@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/sev.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/target/i386/sev.c b/target/i386/sev.c
index 8834cf9441a..eaf5fc6c6b5 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -1091,6 +1091,15 @@  snp_launch_update_data(uint64_t gpa, void *hva,
     return 0;
 }
 
+static int
+sev_snp_launch_update_data(SevCommonState *sev_common, hwaddr gpa,
+                           uint8_t *ptr, uint64_t len)
+{
+       int ret = snp_launch_update_data(gpa, ptr, len,
+                                         KVM_SEV_SNP_PAGE_TYPE_NORMAL);
+       return ret;
+}
+
 static int
 sev_snp_cpuid_info_fill(SnpCpuidInfo *snp_cpuid_info,
                         const KvmCpuidInfo *kvm_cpuid_info)
@@ -2216,6 +2225,7 @@  sev_snp_guest_class_init(ObjectClass *oc, void *data)
 
     klass->launch_start = sev_snp_launch_start;
     klass->launch_finish = sev_snp_launch_finish;
+    klass->launch_update_data = sev_snp_launch_update_data;
     klass->kvm_init = sev_snp_kvm_init;
     x86_klass->kvm_type = sev_snp_kvm_type;