[Top][All Lists]

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

Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set

From: BALATON Zoltan
Subject: Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set
Date: Tue, 20 Oct 2020 13:37:07 +0200 (CEST)

On Tue, 20 Oct 2020, Markus Armbruster wrote:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> writes:

One thing I have thought about is being able to mark a link property
as mandatory so if a value hasn't been set before realize then you

A non-null value, I presume.

Do you mean something like distinguish between NULL and INVALID_VALUE where setting the latter as initial value means property is mandatory?

receive a fatal error. This would be for cases like this where 2
internal devices are connected together without any formal interface,
i.e. in cases where -device wouldn't work anyway.

Moves the check from code one step closer to data: from the realize
method to the object_property_add_link() call.

I like doing things in data, because data is easier to reason about than

Except when object initialisation is scattered around in boiler plate code as in QEMU where it may not be obvious why a realize method fails due to something set/documented in a class_init method elsewhere, whereas an assert in the realize method is quite self evident and would document the same requirements.


reply via email to

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