qemu-devel
[Top][All Lists]
Advanced

[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: Wed, 21 Oct 2020 12:21:18 +0200 (CEST)

On Wed, 21 Oct 2020, Markus Armbruster wrote:
BALATON Zoltan via <qemu-devel@nongnu.org> writes:
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?

I doubt "somebody must have set some value (which could be null)" is
useful here.  I believe Mark was thinking about "somebody must have
connected the link (i.e. set a non-null value)".

This is all theoretical, as in this case we have no_user anyway so the problem can only happen through programmer error but if an object has several properties some of which can be NULL while others are mandatory how do you tell which one is mandataory? That's what I thouhgt having initial value some INVALID_VALUE could be used to say these are mandatory while those properties that are initially NULL don't need to have a valie. That way your generic check can work, otherwise it will need another way to describe mandatory properties which is additional complexity and more boilerplate or will make every link property mandatory which may not always work. Anyway, I was just trying to understand your suggestion and since we concluded that we don't really need it for this case we can just say "YAGNI" as I've learned from you and leave it at that.

Regards,
BALATON Zoltan



reply via email to

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