From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2h5e-0008Ol-CX for qemu-devel@nongnu.org; Fri, 26 Jul 2013 08:25:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2h5d-0006Ci-5g for qemu-devel@nongnu.org; Fri, 26 Jul 2013 08:25:46 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55658 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2h5c-0006Ce-St for qemu-devel@nongnu.org; Fri, 26 Jul 2013 08:25:45 -0400 Message-ID: <51F26AC6.5060701@suse.de> Date: Fri, 26 Jul 2013 14:25:42 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1374681580-17439-1-git-send-email-mst@redhat.com> <51F1495F.2010502@suse.de> <20130725171805.GA7875@redhat.com> In-Reply-To: <20130725171805.GA7875@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 00/14] qemu: generate acpi tables for the guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, Anthony Liguori Am 25.07.2013 19:18, schrieb Michael S. Tsirkin: > On Thu, Jul 25, 2013 at 05:50:55PM +0200, Andreas F=E4rber wrote: >> Am 24.07.2013 18:01, schrieb Michael S. Tsirkin: >>> This code can also be found here: >>> git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git acpi >>> >>> Please review, and consider for 1.6. >> >> Quite frankly, this is still not looking the way I imagined it based o= n >> the KVM call discussion and Anthony's comments that I remember: >=20 > By the way, for examples which are exactly > like this code here, look no further than: >=20 > FWCfgState *fw_cfg_find(void); >=20 > and the use in hw/misc/pvpanic.c of said API. >=20 > Here we have device implementing an API to find it, and through this > pointer, it is accessed by more APIs access its state. >=20 > This is exactly what my patches do for piix etc. >=20 > So if you don't like this approach, please change > existing code using it. According to git-blame that code was recently added by you: http://repo.or.cz/w/qemu.git/commit/600c60b76d0682f6c39d19bfff79da9321e8c= f86?f=3Dhw/nvram/fw_cfg.c So the existing-code argument is kind of moot. ;) Further, that returns the device's state struct and does not copy fields from that state struct into another state struct. BTW if you want to avoid repeatedly hardcoding things, fw_cfg should be using object_resolve_path_component(), I'll prepare a patch. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg