Skip to content

Commit

Permalink
hw/i386/sev: Use legacy SEV VM types for older machine types
Browse files Browse the repository at this point in the history
Newer 9.1 machine types will default to using the KVM_SEV_INIT2 API for
creating SEV/SEV-ES going forward. However, this API results in guest
measurement changes which are generally not expected for users of these
older guest types and can cause disruption if they switch to a newer
QEMU/kernel version. Avoid this by continuing to use the older
KVM_SEV_INIT/KVM_SEV_ES_INIT APIs for older machine types.

Signed-off-by: Michael Roth <michael.roth@amd.com>
Message-ID: <20240409230743.962513-4-michael.roth@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
mdroth authored and bonzini committed Apr 23, 2024
1 parent 0232673 commit ea7fbd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions hw/i386/pc.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@

GlobalProperty pc_compat_9_0[] = {
{ TYPE_X86_CPU, "guest-phys-bits", "0" },
{ "sev-guest", "legacy-vm-type", "true" },
};
const size_t pc_compat_9_0_len = G_N_ELEMENTS(pc_compat_9_0);

Expand Down
1 change: 1 addition & 0 deletions target/i386/sev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,7 @@ sev_guest_instance_init(Object *obj)
object_property_add_uint32_ptr(obj, "reduced-phys-bits",
&sev->reduced_phys_bits,
OBJ_PROP_FLAG_READWRITE);
object_apply_compat_props(obj);
}

/* sev guest info */
Expand Down

0 comments on commit ea7fbd3

Please sign in to comment.