qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH v5 1/5] tpm_spapr: Support TPM for ppc64 using CRQ based inte


From: Stefan Berger
Subject: Re: [PATCH v5 1/5] tpm_spapr: Support TPM for ppc64 using CRQ based interface
Date: Wed, 18 Dec 2019 20:59:18 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 12/18/19 8:54 PM, David Gibson wrote:
On Tue, Dec 17, 2019 at 02:44:04PM -0500, Stefan Berger wrote:
On 12/16/19 7:29 PM, David Gibson wrote:


Since you need to change compatible based on an internal variable,
we'd need to replace the static dt_compatible in the class with a
callback.

Why can we not initialize it once we know the version of TPM? From the
perspective of SLOF at least this seems to be building the device tree fine
since it sees the proper value...
Because it's a serious layering / isolation violation.  You're
modifying QOM type information from the runtime code of a specific
instance.  You get away with it (now) because there's only one
instance and the ordering of things happens to let it work, but that's
assuming way too much about QOM's implementation details.

As a rule, once the QOM classes are set up with their class_init
function, they should never be modified.


If we now add a get_dt_compatible() callback to the class that gets invoked when dt_compatible is NULL, does this then solve the issue?





reply via email to

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