[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 36/37] cpu: Unconditionalize CPUState fields
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH 36/37] cpu: Unconditionalize CPUState fields |
Date: |
Mon, 28 Jan 2013 17:18:53 +0100 |
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 longer 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.
Signed-off-by: Andreas Färber <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
---
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 8097692..46f2247 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -93,10 +93,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;
--
1.7.10.4
- [Qemu-devel] [PATCH 23/37] target-alpha: Detect attempt to instantiate non-CPU type in cpu_init(), (continued)
- [Qemu-devel] [PATCH 23/37] target-alpha: Detect attempt to instantiate non-CPU type in cpu_init(), Andreas Färber, 2013/01/28
- [Qemu-devel] [PATCH 20/37] target-i386: Remove setting tsc-frequency from x86_def_t, Andreas Färber, 2013/01/28
- [Qemu-devel] [PATCH 24/37] target-m68k: Detect attempt to instantiate non-CPU type in cpu_init(), Andreas Färber, 2013/01/28
- [Qemu-devel] [PATCH 27/37] qom: Introduce object_class_is_abstract(), Andreas Färber, 2013/01/28
- [Qemu-devel] [PATCH 30/37] target-m68k: Catch attempt to instantiate abstract type in cpu_init(), Andreas Färber, 2013/01/28
- [Qemu-devel] [PATCH 26/37] target-unicore32: Detect attempt to instantiate non-CPU type in cpu_init(), Andreas Färber, 2013/01/28
- [Qemu-devel] [PATCH 32/37] target-unicore32: Catch attempt to instantiate abstract type in cpu_init(), Andreas Färber, 2013/01/28
- [Qemu-devel] [PATCH 33/37] target-openrisc: Use type_register() instead of type_register_static(), Andreas Färber, 2013/01/28
- [Qemu-devel] [PATCH 35/37] target-m68k: Use type_register() instead of type_register_static(), Andreas Färber, 2013/01/28
- [Qemu-devel] [PATCH 29/37] target-arm: Catch attempt to instantiate abstract type in cpu_init(), Andreas Färber, 2013/01/28
- [Qemu-devel] [PATCH 36/37] cpu: Unconditionalize CPUState fields,
Andreas Färber <=
- [Qemu-devel] [PATCH 31/37] target-openrisc: Catch attempt to instantiate abstract type in cpu_init(), Andreas Färber, 2013/01/28
- [Qemu-devel] [PATCH 37/37] kvm: Pass CPUState to kvm_on_sigbus_vcpu(), Andreas Färber, 2013/01/28
- [Qemu-devel] [PATCH 34/37] target-unicore32: Use type_register() instead of type_register_static(), Andreas Färber, 2013/01/28