From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RW8L1-0007Ul-9T for qemu-devel@nongnu.org; Thu, 01 Dec 2011 10:14:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RW8L0-0003Fh-7h for qemu-devel@nongnu.org; Thu, 01 Dec 2011 10:14:15 -0500 Received: from mail-gy0-f173.google.com ([209.85.160.173]:57878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RW8L0-0003Fb-5H for qemu-devel@nongnu.org; Thu, 01 Dec 2011 10:14:14 -0500 Received: by ghbg19 with SMTP id g19so2479770ghb.4 for ; Thu, 01 Dec 2011 07:14:13 -0800 (PST) Message-ID: <4ED799C3.5040506@codemonkey.ws> Date: Thu, 01 Dec 2011 09:14:11 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1322687028-29714-1-git-send-email-aliguori@us.ibm.com> <1322687028-29714-8-git-send-email-aliguori@us.ibm.com> <4ED76325.6080305@redhat.com> <4ED784B3.8060800@codemonkey.ws> <4ED7892A.1050502@redhat.com> <4ED794DF.8090800@us.ibm.com> <4ED79730.6090503@redhat.com> In-Reply-To: <4ED79730.6090503@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/18] qom: add link properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Kevin Wolf , Peter Maydell , Stefan Hajnoczi , Jan Kiszka , qemu-devel@nongnu.org, Markus Armbruster , Avi Kivity , Luiz Capitulino On 12/01/2011 09:03 AM, Gerd Hoffmann wrote: > Hi, > >> In terms of QMP client code, you just do: >> >> qom-set /path/to/usb-controller.slave /some/other/device > > Lacks notification. usb-controller doesn't notice that you have plugged > in some usb device and thus can't raise an IRQ to notify the guest ... Properties will have flags. One of those flags makes the property mutable only while the device isn't realized. This is a case where the property is mutable during realize. You wouldn't use a normal link here. You would use a "hotpluggable link" which would have a notify hook. This works because all properties are get/set through an accessor interface and there's a rich error interface. The original QOM series I posted had this logic in it. Regards, Anthony Liguori > > cheers, > Gerd > >