Revision 97577fd4
b/include/sysemu/kvm.h | ||
---|---|---|
270 | 270 |
|
271 | 271 |
uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, |
272 | 272 |
uint32_t index, int reg); |
273 |
void kvm_cpu_synchronize_state(CPUState *cpu); |
|
274 |
|
|
275 |
/* generic hooks - to be moved/refactored once there are more users */ |
|
276 |
|
|
277 |
static inline void cpu_synchronize_state(CPUState *cpu) |
|
278 |
{ |
|
279 |
if (kvm_enabled()) { |
|
280 |
kvm_cpu_synchronize_state(cpu); |
|
281 |
} |
|
282 |
} |
|
283 | 273 |
|
284 | 274 |
#if !defined(CONFIG_USER_ONLY) |
285 | 275 |
int kvm_physical_memory_addr_from_host(KVMState *s, void *ram_addr, |
... | ... | |
288 | 278 |
|
289 | 279 |
#endif /* NEED_CPU_H */ |
290 | 280 |
|
281 |
void kvm_cpu_synchronize_state(CPUState *cpu); |
|
291 | 282 |
void kvm_cpu_synchronize_post_reset(CPUState *cpu); |
292 | 283 |
void kvm_cpu_synchronize_post_init(CPUState *cpu); |
293 | 284 |
|
285 |
/* generic hooks - to be moved/refactored once there are more users */ |
|
286 |
|
|
287 |
static inline void cpu_synchronize_state(CPUState *cpu) |
|
288 |
{ |
|
289 |
if (kvm_enabled()) { |
|
290 |
kvm_cpu_synchronize_state(cpu); |
|
291 |
} |
|
292 |
} |
|
293 |
|
|
294 | 294 |
static inline void cpu_synchronize_post_reset(CPUState *cpu) |
295 | 295 |
{ |
296 | 296 |
if (kvm_enabled()) { |
b/qom/cpu.c | ||
---|---|---|
162 | 162 |
CPUClass *cc = CPU_GET_CLASS(cpu); |
163 | 163 |
|
164 | 164 |
if (cc->dump_state) { |
165 |
cpu_synchronize_state(cpu); |
|
165 | 166 |
cc->dump_state(cpu, f, cpu_fprintf, flags); |
166 | 167 |
} |
167 | 168 |
} |
b/target-i386/helper.c | ||
---|---|---|
188 | 188 |
char cc_op_name[32]; |
189 | 189 |
static const char *seg_name[6] = { "ES", "CS", "SS", "DS", "FS", "GS" }; |
190 | 190 |
|
191 |
cpu_synchronize_state(cs); |
|
192 |
|
|
193 | 191 |
eflags = cpu_compute_eflags(env); |
194 | 192 |
#ifdef TARGET_X86_64 |
195 | 193 |
if (env->hflags & HF_CS64_MASK) { |
b/target-ppc/translate.c | ||
---|---|---|
9536 | 9536 |
CPUPPCState *env = &cpu->env; |
9537 | 9537 |
int i; |
9538 | 9538 |
|
9539 |
cpu_synchronize_state(cs); |
|
9540 |
|
|
9541 | 9539 |
cpu_fprintf(f, "NIP " TARGET_FMT_lx " LR " TARGET_FMT_lx " CTR " |
9542 | 9540 |
TARGET_FMT_lx " XER " TARGET_FMT_lx "\n", |
9543 | 9541 |
env->nip, env->lr, env->ctr, cpu_read_xer(env)); |
Also available in: Unified diff