qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 24/25] vmstate: port arm cpu


From: Paul Brook
Subject: Re: [Qemu-devel] [PATCH 24/25] vmstate: port arm cpu
Date: Tue, 25 Oct 2011 19:27:52 +0100
User-agent: KMail/1.13.7 (Linux/3.0.0-1-amd64; KDE/4.6.5; x86_64; ; )

> -    /* Avoid mode switch when restoring CPSR.  */
> -    env->uncached_cpsr = val & CPSR_M;
> -    cpsr_write(env, val, 0xffffffff);
> +
> +    env->uncached_cpsr = env->cpsr_vmstate & CPSR_M;
> +    cpsr_write(env, env->cpsr_vmstate, 0xffffffff);

You've removed the helpful comment explaining why this wierdness exists. 
Please put it back.

A comment in cpu.h explaining what cpsr_vmstate is for would also be nice.
Specifically it's a hack[1] to transfer data between the pre_save/post_load 
hooks and the vmstate machinery.  IMO "vmstate" is a sufficiently generic term 
that it could be confused with some actual cpu register, especially once we 
get round to implementing the hypervisor extensions.

Paul

[1] Maybe a necessary hack, but still a wart from requiring static table 
driven vmstate descriptions.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]