From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKoOE-0007GH-AS for qemu-devel@nongnu.org; Tue, 04 Mar 2014 07:24:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKoO8-0005mG-BY for qemu-devel@nongnu.org; Tue, 04 Mar 2014 07:24:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKoO8-0005mB-34 for qemu-devel@nongnu.org; Tue, 04 Mar 2014 07:24:00 -0500 Message-ID: <5315C5DA.1030609@redhat.com> Date: Tue, 04 Mar 2014 13:23:54 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1393901250-3922-1-git-send-email-xbing6@gmail.com> <1393901250-3922-3-git-send-email-xbing6@gmail.com> <5315A89F.40700@redhat.com> <5315C4D4.4080102@gmail.com> In-Reply-To: <5315C4D4.4080102@gmail.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Discussion 02/10] NEED_CPU_H: remove '#include "cpu.h"' from include/qemu-common.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Xuebing wang , qemu-devel@nongnu.org Cc: afaerber@suse.de, stefanha@redhat.com Il 04/03/2014 13:19, Xuebing wang ha scritto: >> >> Like Andreas I don't like this particularly. You can add >> migration/vmstate.h to qom/cpu.h instead. >> > > In my humble opinion, qom/cpu is part of virtual machine along with > other hw peripherals, thus I'd prefer vmstate to depend on qom/cpu. > > From object oriented design perspective, qom/cpu is one-level lower than > the modeling of virtual machine, do you agree? vmstate is just the name of the infrastructure that takes a description of a struct's fields and serializes it onto a QEMUFile. If you look at include/migration, there's nothing that is specific to virtual machines except perhaps the declaration of two functions vmstate_register_ram and vmstate_unregister_ram. Paolo