From patchwork Wed Aug 12 16:40:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 506702 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AA65814016A for ; Thu, 13 Aug 2015 02:46:13 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=w/NZK6j8; dkim-atps=neutral Received: from localhost ([::1]:39501 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPZAJ-0002Ni-SZ for incoming@patchwork.ozlabs.org; Wed, 12 Aug 2015 12:46:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPZ5X-0001hi-Kl for qemu-devel@nongnu.org; Wed, 12 Aug 2015 12:41:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPZ5W-00088o-7L for qemu-devel@nongnu.org; Wed, 12 Aug 2015 12:41:15 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:36561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPZ5V-00087W-UZ for qemu-devel@nongnu.org; Wed, 12 Aug 2015 12:41:14 -0400 Received: by wicja10 with SMTP id ja10so120029369wic.1 for ; Wed, 12 Aug 2015 09:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=VG36DPlw4vtTQiGhjyiUCSPAr3jniu2LjRgDmMf2ebk=; b=w/NZK6j8FYyJWYtL+iCaoV9yYdf8c4eM4GX3pKbaCgRhi1LhNDBDeheWfd2tVKbpU0 uGlc0RVYWdgoYlYPNLNLbH8s8noR2CDj2VQj3BXovzs83ARbmvjRkFEudqvhrL3uX1vF FnWBPr1UfAn89wRSFi9CvHGc04Od4Lx0oBft7/2GwJhDYjPFN/+t1thCa0d5CE7SRld5 GsxtY1mjJCfcuBucFbsuF43lM1sThnmE8FYrM89SynqxprdAadu2QDgijGrIg+FakefH sFkQgBCgl5fXuWp3mMo7BrXWq8QgKI/N0Wryev0ntrH3sa7srLCS04QFL4y7zTtzNumh vCSg== X-Received: by 10.194.103.7 with SMTP id fs7mr69111966wjb.75.1439397672668; Wed, 12 Aug 2015 09:41:12 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-94-39-138-45.clienti.tiscali.it. [94.39.138.45]) by smtp.gmail.com with ESMTPSA id fa8sm9125466wib.14.2015.08.12.09.41.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Aug 2015 09:41:12 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 12 Aug 2015 18:40:56 +0200 Message-Id: <1439397664-70734-5-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1439397664-70734-1-git-send-email-pbonzini@redhat.com> References: <1439397664-70734-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::236 Cc: mttcg@greensocs.com, fred.konrad@greensocs.com Subject: [Qemu-devel] [PATCH 04/10] exec-all: remove non-TCG stuff from exec-all.h header. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The header is included from basically everywhere, thanks to cpu.h. It should be moved to the (TCG only) files that actually need it. As a start, remove non-TCG stuff. While adding a #ifndef CONFIG_USER_ONLY include section to cpu-exec.c, move memory API files under it. Signed-off-by: Paolo Bonzini --- cpu-exec.c | 9 ++++++--- include/exec/exec-all.h | 6 ------ include/exec/ram_addr.h | 1 + include/sysemu/sysemu.h | 3 +++ 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index c680cca..599e64d 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -22,12 +22,15 @@ #include "disas/disas.h" #include "tcg.h" #include "qemu/atomic.h" -#include "sysemu/qtest.h" #include "qemu/timer.h" +#include "exec/tb-hash.h" +#include "qemu/rcu.h" + +#if !defined(CONFIG_USER_ONLY) #include "exec/address-spaces.h" #include "exec/memory-internal.h" -#include "qemu/rcu.h" -#include "exec/tb-hash.h" +#include "sysemu/sysemu.h" +#endif /* -icount align implementation. */ diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index dafd177..eb77373 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -92,7 +92,6 @@ void cpu_exec_init(CPUState *cpu, Error **errp); void QEMU_NORETURN cpu_loop_exit(CPUState *cpu); #if !defined(CONFIG_USER_ONLY) -bool qemu_in_vcpu_thread(void); void cpu_reload_memory_map(CPUState *cpu); void tcg_cpu_address_space_init(CPUState *cpu, AddressSpace *as); /* cputlb.c */ @@ -320,8 +319,6 @@ extern uintptr_t tci_tb_ptr; #if !defined(CONFIG_USER_ONLY) -void phys_mem_set_alloc(void *(*alloc)(size_t, uint64_t *align)); - struct MemoryRegion *iotlb_to_region(CPUState *cpu, hwaddr index); @@ -346,7 +343,4 @@ extern int singlestep; /* cpu-exec.c */ extern volatile sig_atomic_t exit_request; -#if !defined(CONFIG_USER_ONLY) -void migration_bitmap_extend(ram_addr_t old, ram_addr_t new); -#endif #endif diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index c113f21..7e7566e 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -249,5 +249,6 @@ uint64_t cpu_physical_memory_sync_dirty_bitmap(unsigned long *dest, return num_dirty; } +void migration_bitmap_extend(ram_addr_t old, ram_addr_t new); #endif #endif diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 44570d1..93a70e3 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -205,6 +205,9 @@ QemuOpts *qemu_get_machine_opts(void); bool defaults_enabled(void); bool usb_enabled(void); +bool qemu_in_vcpu_thread(void); +void phys_mem_set_alloc(void *(*alloc)(size_t, uint64_t *align)); + extern QemuOptsList qemu_legacy_drive_opts; extern QemuOptsList qemu_common_drive_opts; extern QemuOptsList qemu_drive_opts;