mirror of https://github.com/xemu-project/xemu.git
target/i386: SEV: do not assume machine->cgs is SEV
There can be other confidential computing classes that are not derived from sev-common. Avoid aborting when encountering them. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
0c4da54883
commit
109238a8d9
|
@ -1712,7 +1712,9 @@ void sev_es_set_reset_vector(CPUState *cpu)
|
|||
{
|
||||
X86CPU *x86;
|
||||
CPUX86State *env;
|
||||
SevCommonState *sev_common = SEV_COMMON(MACHINE(qdev_get_machine())->cgs);
|
||||
ConfidentialGuestSupport *cgs = MACHINE(qdev_get_machine())->cgs;
|
||||
SevCommonState *sev_common = SEV_COMMON(
|
||||
object_dynamic_cast(OBJECT(cgs), TYPE_SEV_COMMON));
|
||||
|
||||
/* Only update if we have valid reset information */
|
||||
if (!sev_common || !sev_common->reset_data_valid) {
|
||||
|
|
Loading…
Reference in New Issue