On 24 April 2013 08:25, li guang <lig.f...@cn.fujitsu.com> wrote: > 在 2013-04-24三的 09:11 +0200,Aurelien Jarno写道: >> On Wed, Apr 24, 2013 at 08:36:54AM +0200, Paolo Bonzini wrote: >> > Il 24/04/2013 03:48, liguang ha scritto: >> > > cs_base is only meaningful for target-i386/sparc, >> > > so, get rid of cs_base for other target >> > >> > This is really ugly, we're trying to get less target-dependent code >> > outside target-*, not more. > > I think it's easy to be arch independent by just > call a generic function
We already have that, this is exactly what the target cpu_get_tb_cpu_state() function is for! It abstracts away the target's specific use of these fields, so the common code can treat it as an opaque blob of state. > I'm not going to assume that (maybe it's the fact), > I did some random tests, seems break nothing. You have absolutely broken things here -- if your random tests didn't identify what then your testing process was just not solid enough to find the corner cases. -- PMM