[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] icount and tb chaining
From: |
陳韋任 |
Subject: |
Re: [Qemu-devel] icount and tb chaining |
Date: |
Thu, 19 Jan 2012 18:32:20 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
> What i mean here is that in gen-icount.h, the icount_decr.u32 field is
> exhausted and jumps out to the cpu-exec loop. This is where you would
> fall into tb_add_jump with the second argument being 2, and only if
> icount_extra was greater than zero. This is what I meant, and
> previously you showed me that the chaining is left intact by the check
> in tb_add_jump. Hope this is clearer. -Jim
I am not familiar with icount stuff, so some dunmp questions here. In
gen_icount_start (gen-icount.h), it loads icount_decr.u32 into count,
then subtracts 0xdeadbeef from count, finally stores count back to
icount_decr.u16.low.
1) Why subtract 0xdeadbeef from count? Does 0xdeadbeef have any meaning?
2) Why store count back to icount_decr.u16.low rather than icount_decr.u32?
In cpu_exec (cpu-exec.c),
// Does insns_left means how many guest instructions left in tb and needed
// to be executed?
insns_left = env->icount_decr.u32;
// what the if-branch means, in particular icount_extra? I guess it has
// something to do with Qemu timer, but not sure.
if (env->icount_extra && insns_left >= 0) {
// I cannot figure out what's going on here. Could you shed light on it?
} else {
}
Many thanks! :)
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj
- [Qemu-devel] icount and tb chaining, James Greensky, 2012/01/12
- [Qemu-devel] icount and tb chaining, James Greensky, 2012/01/12
- Re: [Qemu-devel] icount and tb chaining, 陳韋任, 2012/01/12
- Re: [Qemu-devel] icount and tb chaining, 陳韋任, 2012/01/18
- Re: [Qemu-devel] icount and tb chaining, James Greensky, 2012/01/18
- Re: [Qemu-devel] icount and tb chaining,
陳韋任 <=
- Re: [Qemu-devel] icount and tb chaining, James Greensky, 2012/01/24
Re: [Qemu-devel] icount and tb chaining, 陳韋任, 2012/01/17