From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKoTb-0002de-Vb for qemu-devel@nongnu.org; Tue, 04 Mar 2014 07:29:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKoTW-00083a-02 for qemu-devel@nongnu.org; Tue, 04 Mar 2014 07:29:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKoTV-00083P-OK for qemu-devel@nongnu.org; Tue, 04 Mar 2014 07:29:33 -0500 Message-ID: <5315C727.4090902@redhat.com> Date: Tue, 04 Mar 2014 13:29:27 +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> <5315C667.8050501@gmail.com> In-Reply-To: <5315C667.8050501@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:26, Xuebing wang ha scritto: >>> >>> #ifdef NEED_CPU_H >>> +#include "cpu.h" /* target-xxx/cpu.h, required for target_ulong */ >>> >>> void kvm_setup_guest_memory(void *start, size_t size); >>> void kvm_flush_coalesced_mmio_buffer(void); >> >> Perhaps move debugging-related definitions to a new file >> sysemu/kvm-debug.h and include it only from gdbstub.c, kvm-all.c, >> kvm-stub.c, target-*/kvm.c. >> > > Thanks for suggestion. This patch is strictly confined to "NEED_CPU_H" > and making qemu build. :-) Making QEMU build is not a good idea if it complicates things. Adding dependencies to a file complicates things. What you're doing here is taking dependencies out of one central file (qemu-common.h) and adding it to a dozen peripheral files. This complicates things. Removing "#ifdef NEED_CPU_H" can be a good idea, but it has to make things simpler, otherwise it is not a good idea anymore. Paolo