qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/6] Drop the irredeemably racy cpu_unlink_tb()


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 0/6] Drop the irredeemably racy cpu_unlink_tb()
Date: Thu, 09 May 2013 12:26:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

Am 09.05.2013 10:09, schrieb Michael Tokarev:
> 22.02.2013 22:09, Peter Maydell wrote:
>>   cpu-exec: wrap tcg_qemu_tb_exec() in a fn to restore the PC
> 
> This needed a "back merge" of env+cpu states back to cpu.
> Maybe we should somehow revisit the whole concept of the
> two, because it's sorta fun: at some point all functions
> has been converted to accept `cpu' instead of `env', but
> in many places the first thing a function does is to
> get `env' pointer out of `cpu'.

The concept is really easy: There is so much CPU code around that for
many years no one dared to touch it, ;) so changes need to be done
incrementally - not only to identify any fallout! If one function is
converted to no longer rely on env, then rather likely in some caller it
still needs to convert from env -> cpu. Once that caller is converted
too, it goes on moving the conversion "outwards" until the only
remaining env functions are TCG-related. env access from a specific *CPU
type is cheap, thus only talking about common code here. You will find
more background on the big "QOM CPUState part X" series. CPU_COMMON is
definitely not the way for the future, it should be okay for backporting
though in this case.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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