qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 00/93] TCI fixes and cleanups


From: Stefan Weil
Subject: Re: [PATCH v2 00/93] TCI fixes and cleanups
Date: Thu, 4 Feb 2021 21:02:08 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

Am 04.02.21 um 10:58 schrieb Peter Maydell:
On Thu, 4 Feb 2021 at 01:49, Richard Henderson
<richard.henderson@linaro.org> wrote:
Almost 7 years ago I detailed 5 major problems in tci[1], of
which three still remain:

   * Unaligned accesses to the bytecode stream, which means
     that we immediately SIGBUS on any host requiring alignment.
   * Non-portable calls to helper functions.
   * Full of useless ifdefs and TODOs.

To my mind, this means the code is unmaintained, despite what it
says in MAINTAINERS.  Thus tci *should* be simply removed.
However, every time removal is suggested, someone comes out of the
woodwork and says we should keep it, because it's useful for $FOO.
Not listed, but also a problem:
  * it's a configure-time choice, not a runtime choice


That's the feature which I also desire most. Technically it was not possible to have native and interpreted TCG in the same code some years ago when I tried to implement this, but that might have changed as TCG has evolved a lot. Having TCI as a runtime choice would not only require less CI builds but also allow new use cases for TCG testing.

I also agree with most of Richard's list of problems and appreciate the efforts to fix them.

I disagree on the #ifdefs which can help to understand TCG better in my opinion, so for me they have a useful side effect of being also documentation.

Most of the problems which you named above were already mentioned in the README for TCI from 2011.

Nevertheless I had the impression that TCI was "good enough" for those who used it, and it was sufficient to fix a newly used TCG opcode which triggered a TODO assertion from time to time. Obviously I underestimated Richard's desire to have a 100 % working TCI. I am sorry for that.

Technically the patch series looks reasonable. I like especially the disassembler. Is there a Git repository which makes pulling all changes easier? It would also help if the patches which were already reviewed were already merged in qemu master.

Regarding misaligned bytecode access, there exist two solutions. We could either use code which handles that correctly (I had sent a patch using memcpy two years ago and recently sent a V2 which uses the QEMU standard functions for that). Or we can align the data like it is done in Richard's patches. For me it is not obvious which one is better. While a single access is faster for aligned data, this might be different for sequential access on misaligned data which might profit from better caching of smaller bytecode.

Kind regards,

Stefan






reply via email to

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