[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/5] qdev: Introduce DEFINE_PROP_RESERVED_REGION
From: |
Auger Eric |
Subject: |
Re: [PATCH v3 1/5] qdev: Introduce DEFINE_PROP_RESERVED_REGION |
Date: |
Tue, 23 Jun 2020 17:22:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
Hi Markus,
On 6/23/20 5:15 PM, Markus Armbruster wrote:
> 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?
:-)
Eric
>
> [...]
>
>
[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