From patchwork Fri Jan 25 15:27:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 215773 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 578102C007E for ; Sat, 26 Jan 2013 02:27:59 +1100 (EST) Received: from localhost ([::1]:52623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TylC9-0005cn-H2 for incoming@patchwork.ozlabs.org; Fri, 25 Jan 2013 10:27:57 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50346) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TylBx-0005aJ-Va for qemu-devel@nongnu.org; Fri, 25 Jan 2013 10:27:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TylBr-0002sc-Sh for qemu-devel@nongnu.org; Fri, 25 Jan 2013 10:27:45 -0500 Received: from cantor2.suse.de ([195.135.220.15]:38947 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TylBr-0002sW-MC for qemu-devel@nongnu.org; Fri, 25 Jan 2013 10:27:39 -0500 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id AF218A38EA; Fri, 25 Jan 2013 16:27:38 +0100 (CET) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2013 16:27:27 +0100 Message-Id: <1359127647-10675-1-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH qom-cpu for-1.4] cpu: Unconditionalize CPUState fields 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 Commits fc8c5b8c41ee5ba69d7a2be63b02a08c7b0b155b (Makefile.user: Define CONFIG_USER_ONLY for libuser/) and dd83b06ae61cfa2dc4381ab49f365bd0995fc930 (qom: Introduce CPU class) specifically prepared the qom/cpu.c file to be compiled differently for softmmu and *-user. This broke as part of build system refactorings while CPU patches were in flight, adding conditional fields kvm_fd (8737c51c0444f832c4e97d7eb7540eae457e08e4) and kvm_vcpu_dirty (20d695a9254c1b086a456d3b79a3c311236643ba) for softmmu. linux-user and bsd-user would therefore get a CPUState type with instance_size ~8 bytes shorter than expected. Fix this by unconditionally having the fields in CPUState. In practice, target-specific CPU types' instance_size would compensate this, and upstream qom/cpu.c does not yet touch any affected field. Cc: Paolo Bonzini Signed-off-by: Andreas Färber Reviewed-by: Paolo Bonzini --- include/qom/cpu.h | 2 -- 1 Datei geändert, 2 Zeilen entfernt(-) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 773caf9..2333781 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -89,10 +89,8 @@ struct CPUState { bool stop; bool stopped; -#if !defined(CONFIG_USER_ONLY) int kvm_fd; bool kvm_vcpu_dirty; -#endif struct KVMState *kvm_state; struct kvm_run *kvm_run;