[Top][All Lists]

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

[Qemu-devel] Question on block chaining

From: 陳韋任
Subject: [Qemu-devel] Question on block chaining
Date: Mon, 19 Sep 2011 18:27:26 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

Hi, all

  I am tracing how block linking is done in QEMU. I find
there is a comment in struct TranslationBlock says,

    /* list of TBs jumping to this one. This is a circular list using
       the two least significant bits of the pointers to tell what is
       the next pointer: 0 = jmp_next[0], 1 = jmp_next[1], 2 =
       jmp_first */
    struct TranslationBlock *jmp_next[2];
    struct TranslationBlock *jmp_first;

But after tracing the code, I think the comment might be
wrong. For example, if we want to link tb1 to tb2, i.e.,
tb1 -> tb2. Then roughly speaking, tb1->jmp_next[n] should
be tb2, and tb2->jmp_first should be tb1. So the comment
"list of TBs jumping to this one" looks weird to me.
Do I misunderstand how the block chaining is done?



Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667

reply via email to

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