mirror of https://gitee.com/openkylin/qemu.git
cpu: Unconditionalize CPUState fields
Commitsfc8c5b8c41
(Makefile.user: Define CONFIG_USER_ONLY for libuser/) anddd83b06ae6
(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 (8737c51c04
) and kvm_vcpu_dirty (20d695a925
) 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 <afaerber@suse.de> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
2dddbc2123
commit
c03c520d50
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue