[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 14/20] memory-device: ids of virtio based dev
From: |
David Hildenbrand |
Subject: |
Re: [Qemu-devel] [PATCH v2 14/20] memory-device: ids of virtio based devices are special |
Date: |
Fri, 31 Aug 2018 13:55:52 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
>>> I don't like having virtio-specific code on memory-device.c.
>>> What about making it generic? Let device 2 register a read-only
>>> property for the user-visible ID, and make memory_device_id() use
>>> that property if it's present.
>>
>> Valid point. Or avoid properties and add a function to the memory-device
>> class?
>
> That works too, and it was my first thought. But if you want a
> method whose only purpose is to return a single value without
> affecting object state, a QOM property seems like a perfect fit.
>
> Either of those options would be good enough for me, though.
>
The function would only have to be defined for those overwriting it.
Will have a look. Thanks!
--
Thanks,
David / dhildenb
- [Qemu-devel] [PATCH v2 14/20] memory-device: ids of virtio based devices are special, (continued)
Re: [Qemu-devel] [PATCH v2 14/20] memory-device: ids of virtio based devices are special, Eduardo Habkost, 2018/08/31
[Qemu-devel] [PATCH v2 15/20] virtio-pmem: prototype, David Hildenbrand, 2018/08/29
[Qemu-devel] [PATCH v2 17/20] hmp: handle virtio-pmem when printing memory device infos, David Hildenbrand, 2018/08/29
[Qemu-devel] [PATCH v2 16/20] virtio-pci: proxy for virtio-pmem, David Hildenbrand, 2018/08/29
[Qemu-devel] [PATCH v2 18/20] numa: handle virtio-pmem in NUMA stats, David Hildenbrand, 2018/08/29
[Qemu-devel] [PATCH v2 19/20] virtio-pmem: hotplug support functions, David Hildenbrand, 2018/08/29
[Qemu-devel] [PATCH v2 20/20] pc: support for virtio-pmem, David Hildenbrand, 2018/08/29