From: Marcelo Tosatti <mtosatti@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: peter.crosthwaite@xilinx.com, qemu-devel@nongnu.org, afaerber@suse.de
Subject: Re: [Qemu-devel] [RFC PATCH 0/2] qom: custom link properties
Date: Thu, 5 Jun 2014 16:14:51 -0300 [thread overview]
Message-ID: <20140605191451.GA24355@amt.cnet> (raw)
In-Reply-To: <1401967435-17751-1-git-send-email-pbonzini@redhat.com>
On Thu, Jun 05, 2014 at 01:23:53PM +0200, Paolo Bonzini wrote:
> Both Marcelo's rtc patches and Peter's MemoryRegion patches showed
> the interest in having link properties with a custom representation
> and/or a different way to store the property.
>
> Such properties would still be link<>s for the outside world, but
> the internal implementation in QEMU would be different.
>
> This series proposes a way to introduce such custom link properties,
> using a new property callback "resolve" that generalizes the if/else
> ladder in object_resolve_path_component.
>
> The second patch shows how the mechanism could be used to add a simple
> immutable "alias" link. Example:
>
> $ ./qom-list -s /tmp/m1 /machine
> @rtc/ # this is an alias
> i440fx/
> fw_cfg/
> icc-bridge/
> unattached/
> peripheral/
> peripheral-anon/
> ...
>
> $ ./qom-get -s /tmp/m1 /machine.rtc
> /machine/unattached/device[8] # later could become /machine/piix3/rtc
> # or /machine/ich9/rtc and so on
>
> $ ./qom-get -s /tmp/m1 /machine/rtc.date
> tm_sec: 58
> tm_hour: 11
> tm_mday: 5
> tm_year: 114
> tm_mon: 5
> tm_min: 16
>
> Paolo
>
> Paolo Bonzini (2):
> qom: add a generic mechanism to resolve paths
> qom: add object_property_add_alias
>
> include/qom/object.h | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> qom/object.c | 68 +++++++++++++++++++++++++++++++++--------------
> 2 files changed, 123 insertions(+), 19 deletions(-)
>
> --
> 1.8.3.1
Thats nicer, thanks.
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
prev parent reply other threads:[~2014-06-05 23:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 11:23 [Qemu-devel] [RFC PATCH 0/2] qom: custom link properties Paolo Bonzini
2014-06-05 11:23 ` [Qemu-devel] [PATCH 1/2] qom: add a generic mechanism to resolve paths Paolo Bonzini
2014-06-06 5:54 ` Peter Crosthwaite
2014-06-05 11:23 ` [Qemu-devel] [PATCH 2/2] qom: add object_property_add_alias Paolo Bonzini
2014-06-10 18:31 ` Paolo Bonzini
2014-06-05 19:14 ` Marcelo Tosatti [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140605191451.GA24355@amt.cnet \
--to=mtosatti@redhat.com \
--cc=afaerber@suse.de \
--cc=pbonzini@redhat.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.