qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] target/i386: SEV: do not assume machine->cgs is SEV


From: Paolo Bonzini
Subject: Re: [PATCH] target/i386: SEV: do not assume machine->cgs is SEV
Date: Thu, 6 Jun 2024 08:32:03 +0200



Il gio 6 giu 2024, 05:52 Richard Henderson <richard.henderson@linaro.org> ha scritto:
> SEV_COMMON(object_dynamic_cast()) looks to be twice cast, we can just
> force to do conversion with pointer type:
>
> (SevCommonState *) object_dynamic_cast(OBJECT(cgs), TYPE_SEV_COMMON)

You don't need the explicit cast either, since C auto-converts from void*.

   sev_common = object_dynamic_cast(OBJECT(cgs), TYPE_SEV_COMMON);

Doh, of course. Thanks to both!

Paolo



r~


reply via email to

[Prev in Thread] Current Thread [Next in Thread]