[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/5] qdev: Introduce DEFINE_PROP_RESERVED_REGION
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v3 1/5] qdev: Introduce DEFINE_PROP_RESERVED_REGION |
Date: |
Tue, 23 Jun 2020 17:15:32 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Auger Eric <eric.auger@redhat.com> writes:
> Hi Markus,
>
> On 6/22/20 1:22 PM, Markus Armbruster wrote:
>> Eric Auger <eric.auger@redhat.com> writes:
>>
>>> Introduce a new property defining a reserved region:
>>> <low address>, <high address>, <type>.
[...]
>> I dimly remember discussing the wisdom of numeric type here, dig, dig,
>> ..., aha:
>>
>> Subject: Re: [PATCH for-5.0 v11 12/20] qapi: Introduce
>> DEFINE_PROP_INTERVAL
>> Date: Fri, 13 Dec 2019 11:03:02 +0100
>> Message-ID: <87y2vg4k6h.fsf@dusky.pond.sub.org>
>>
>> >> So the "label" part of "<low address>,<high address>,label" is a
>> number?
>> > yes it is.
>> >>
>> >> Is a number appropriate for your use case, or would an enum be better?
>> > I think a number is OK. There might be other types of reserved regions
>> > in the future. Also if we want to allow somebody else to reuse that
>> > property in another context, I would rather leave it open?
>>
>> I'd prioritize the user interface over possible reuse (which might never
>> happen). Mind, I'm not telling you using numbers is a bad user
>> interface. In general, enums are nicer, but I don't know enough about
>> this particular case.
> Yep I remember too ;-) I left as it was because I think this property
> could be used for other use cases.
YAGNI :)
A string would work, too, wouldn't it?
[...]
[PATCH v3 3/5] virtio-iommu: Handle reserved regions in the translation process, Eric Auger, 2020/06/11
[PATCH v3 2/5] virtio-iommu: Implement RESV_MEM probe request, Eric Auger, 2020/06/11
[PATCH v3 4/5] virtio-iommu-pci: Add array of Interval properties, Eric Auger, 2020/06/11
[PATCH v3 5/5] hw/arm/virt: Let the virtio-iommu bypass MSIs, Eric Auger, 2020/06/11