[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 15/18] rtc: add a dynamic property for retrie
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH v2 15/18] rtc: add a dynamic property for retrieving the date |
Date: |
Tue, 13 Dec 2011 10:48:31 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111104 Red Hat/3.1.16-2.el6_1 Thunderbird/3.1.16 |
Hi,
> Now I understand that for dynamically created properties (like on your
> PCB) this is necessary and can't be avoided. For about 99% of the
> devices static definition of properties would be enough, though.
>
> So basically what I'm asking for is getting the static structs back for
> the 99% and have common code that parses them and calls the appropriate
> functions to actually the properties. The remaining 1% that
> creates/deletes properties during runtime and isn't covered can directly
> call whatever it needs.
Fully agree. I guess we can even generate those structs in many cases.
We will parse the ${device}State structs anyway for visitor-based
vmstate, so with some extra declaration we can generate property
descriptions too. For example this ...
static PCIDeviceInfo intel_hda_info = {
.qdev.name = "intel-hda",
[ ... ]
.qdev.props = (Property[]) {
DEFINE_PROP_UINT32("debug", IntelHDAState, debug, 0),
DEFINE_PROP_UINT32("msi", IntelHDAState, msi, 1),
DEFINE_PROP_END_OF_LIST(),
}
};
... could be just ...
struct IntelHDAState {
[ ... ]
/* properties */
uint32_t debug __property(0);
uint32_t msi __property(1);
};
cheers,
Gerd
- Re: [Qemu-devel] [PATCH v2 16/18] qom: optimize qdev_get_canonical_path using a parent link, (continued)
- [Qemu-devel] [PATCH v2 18/18] qom: add test tools (v2), Anthony Liguori, 2011/12/02
- [Qemu-devel] [PATCH v2 17/18] qmp: make qmp.py easier to use, Anthony Liguori, 2011/12/02
- [Qemu-devel] [PATCH v2 15/18] rtc: add a dynamic property for retrieving the date, Anthony Liguori, 2011/12/02
- Re: [Qemu-devel] [PATCH v2 15/18] rtc: add a dynamic property for retrieving the date, Kevin Wolf, 2011/12/09
- Re: [Qemu-devel] [PATCH v2 15/18] rtc: add a dynamic property for retrieving the date, Anthony Liguori, 2011/12/09
- Re: [Qemu-devel] [PATCH v2 15/18] rtc: add a dynamic property for retrieving the date, Kevin Wolf, 2011/12/09
- Re: [Qemu-devel] [PATCH v2 15/18] rtc: add a dynamic property for retrieving the date, Anthony Liguori, 2011/12/09
- Re: [Qemu-devel] [PATCH v2 15/18] rtc: add a dynamic property for retrieving the date, Kevin Wolf, 2011/12/13
- Re: [Qemu-devel] [PATCH v2 15/18] rtc: add a dynamic property for retrieving the date,
Gerd Hoffmann <=
- Re: [Qemu-devel] [PATCH v2 15/18] rtc: add a dynamic property for retrieving the date, Anthony Liguori, 2011/12/13
- Re: [Qemu-devel] [PATCH v2 15/18] rtc: add a dynamic property for retrieving the date, Anthony Liguori, 2011/12/13
- Re: [Qemu-devel] [PATCH v2 15/18] rtc: add a dynamic property for retrieving the date, Kevin Wolf, 2011/12/13
[Qemu-devel] [PATCH v2 11/18] qom: qom_{get, set} monitor commands (v2), Anthony Liguori, 2011/12/02