From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoDbI-0000E3-FH for qemu-devel@nongnu.org; Mon, 19 Oct 2015 12:47:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoDbF-0005om-5O for qemu-devel@nongnu.org; Mon, 19 Oct 2015 12:47:56 -0400 Received: from mx2.suse.de ([195.135.220.15]:51865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoDbE-0005oi-Un for qemu-devel@nongnu.org; Mon, 19 Oct 2015 12:47:53 -0400 References: <1444878732-12626-1-git-send-email-zhugh.fnst@cn.fujitsu.com> <56238007.80001@gmail.com> <20151018152027-mutt-send-email-mst@redhat.com> <5623C750.6090005@suse.de> <20151019154715.GD4914@thinpad.lan.raisama.net> From: =?UTF-8?Q?Andreas_F=c3=a4rber?= Message-ID: <56251EB6.5000105@suse.de> Date: Mon, 19 Oct 2015 18:47:50 +0200 MIME-Version: 1.0 In-Reply-To: <20151019154715.GD4914@thinpad.lan.raisama.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RESEND PATCH v3] i386: keep cpu_model field in MachineState uptodate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: marcel@redhat.com, pbonzini@redhat.com, Zhu Guihua , qemu-devel@nongnu.org, "Michael S. Tsirkin" Am 19.10.2015 um 17:47 schrieb Eduardo Habkost: > On Sun, Oct 18, 2015 at 06:22:40PM +0200, Andreas F=E4rber wrote: >> Am 18.10.2015 um 14:20 schrieb Michael S. Tsirkin: >>> On Sun, Oct 18, 2015 at 02:18:31PM +0300, Marcel Apfelbaum wrote: >>>> On 10/15/2015 06:12 AM, Zhu Guihua wrote: > [...] >>>>> - cpu =3D pc_new_cpu(current_cpu_model, apic_id, &local_err); >>>>> + cpu =3D pc_new_cpu(machine->cpu_model, apic_id, &local_err);t >>>> >>>> Hi, >>>> >>>> I am not going to "stop" this patch and I do agree with what is tryi= ng to do. >>>> What I still don't get is if we are "allowed" to directly access QOM= object's private >>>> fields outside the implementation C file. >>>> >>>> This is why we have some wrappers in include/hw/boards.h when we acc= ess machine's fields. >>>> >>>> Just wanted to raise the question, other than that (for what is wort= h): >>>> Reviewed-by: Marcel Apfelbaum >>> >>> Andreas, could you ack/nack this patch pls? >> >> I won't nack it, as putting it into the QOM state now is a good idea. >> But I would rather put this into PCMachineState, as current_cpu_model >> was PC-only and I'd prefer not to encourage more uses of the old API. >=20 > I don't undersand what you suggest. The patch doesn't add any new state= , > it is just updating the existing MachineState::cpu_model field (just > like it is already done by multiple arm, mips, ppc, and tricore > machines). Looking at the full patch now, you are right. It is not adding a new field but merely setting it. Acked-by: Andreas F=E4rber Sorry for the confusion, Andreas --=20 SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Felix Imend=F6rffer, Jane Smithard, Graham Norton; HRB 21284 (AG N=FC= rnberg)