qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] tb lock in qemu cpu-exec.c


From: Xin Tong
Subject: Re: [Qemu-devel] tb lock in qemu cpu-exec.c
Date: Sat, 21 Jan 2012 15:46:11 -0500

If the unlinking does not happen. ( i.e., interrupt checking in every
TB is used instead of unlinking and force an exit). is the lock still
needed ?


Thanks


Xin


On Sat, Jan 21, 2012 at 2:55 PM, Peter Maydell <address@hidden> wrote:
> On 21 January 2012 19:39, Xin Tong <address@hidden> wrote:
>> There is a TB lock in the cpu-exec.c. It is held before a vcpu is
>> trying to find the next tb it is trying to execute. I am wondering
>> what this lock is for. Currently, qemu is time multiplexing on a host
>> cpu to emulate smp. No other vcpu can be running while the tb
>> lookup/translation is performed.
>
> The thing that needs to be locked is (a) cpu thread is in this
> cpu-exec.c code doing a lookup for a TB (b) another thread (io
> thread) or signal handler (linux-user case) calls cpu_exit(),
> which manipulates the TB links.
>
> Unfortunately the tb_lock doesn't actually achieve this purpose;
> it is just broken and there are race conditions here.
>
> -- PMM



reply via email to

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