From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51F04C433F5 for ; Mon, 13 Sep 2021 14:25:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0AA1960EC0 for ; Mon, 13 Sep 2021 14:25:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0AA1960EC0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:34434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPmtg-0004gH-U3 for qemu-devel@archiver.kernel.org; Mon, 13 Sep 2021 10:25:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPmgi-0003Vq-Qg for qemu-devel@nongnu.org; Mon, 13 Sep 2021 10:12:01 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:41802) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPmgX-0007LO-00 for qemu-devel@nongnu.org; Mon, 13 Sep 2021 10:12:00 -0400 Received: by mail-pf1-x434.google.com with SMTP id x7so8934607pfa.8 for ; Mon, 13 Sep 2021 07:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=NkG7nzRVGW2Lc6Zfq4Iglexdt1ElmjMZkrUFZFMqCeA=; b=PvLU9MkJ3C9PrCrcaHqfBzHD4NjGSyk6flWOYRXL1QzkNCvFRGwqen8XL5ADIxhA1T QlsSwCMxeWlo5R1hnnouc+7m83HZfg5E+IG9X+92t26LF42tHe0szsdHlHV4d+nOio47 AGHC/6x2/n6SNPXxCmBLe9+CrUEFf52OjdOnmS/TjKFQvgmS+5qGftpVR7iegJSYt1ic D/sSZddwJXOfItpyDLrFEVQp/tTxUlKd7JOhvOmVuLN8AmS/F+GoKU92o01VOumxysQl T2S7YFYXzd60whBMwRpniQ4ndoOuKEeeRUgEBDqyn6R/EJuQXCuTksw0OZAalOyP4TDH zH9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NkG7nzRVGW2Lc6Zfq4Iglexdt1ElmjMZkrUFZFMqCeA=; b=T+F9g77coUf4DqsjEzY5tskkNa9qzyEjvL/2ABVn7ZyCMlvZEFhnPsJxE40ckTVaO1 k1wQ+cOxMk6ceITUZFeJdpGTU+mTqiC69fvmACwLBPz/gE8TjH8ECNuf76AhTD3jlkmt 2YvdZviu/e0pZleAHjIhm3aXBvJ1qJiFb2TCMUf4pDim71CqkuDJ+GufoT4JZpJOz/rK BiftSJ2WK4v2ZsXuLahRKJX2up23ycrdZNrEs+RF1Fr+naW+wA/X/XzyzeZiAtEQ+1Z5 YH9zKVxZuLBUDiopz2UOzfNb8qa8cWB0Nssfs36XONZLGxCawAKoBriVUIma29l0UTL+ QnAQ== X-Gm-Message-State: AOAM531NhlNg0pzQpDlV7g3vAuKphv75K811PKnJPf/mKN0uZPkAHUxG M2+L8pwkqNz7ZgFD8mc9o6Yh6w== X-Google-Smtp-Source: ABdhPJzA8gCnqrUM9Ng4mzAxra5pIWgfZaOX+s+8YMeEqP5yrJfIrJT7tOlW7DNoTbzgD2T6gd7R/A== X-Received: by 2002:a63:7455:: with SMTP id e21mr11404398pgn.188.1631542307696; Mon, 13 Sep 2021 07:11:47 -0700 (PDT) Received: from [192.168.1.11] ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id d63sm7044212pjk.17.2021.09.13.07.11.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Sep 2021 07:11:47 -0700 (PDT) Subject: Re: [PATCH] accel/tcg: assert insn_idx will always be valid before plugin_inject_cb To: =?UTF-8?Q?Alex_Benn=c3=a9e?= References: <20210903145938.1321571-1-alex.bennee@linaro.org> <36bc7691-c0d9-9e18-dade-4d95405dcd62@linaro.org> <871r5swztj.fsf@linaro.org> <87h7eova8w.fsf@linaro.org> From: Richard Henderson Message-ID: Date: Mon, 13 Sep 2021 07:11:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <87h7eova8w.fsf@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x434.google.com X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-1.969, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 9/13/21 7:06 AM, Alex Bennée wrote: > Hmm so we have a separate list for speedy access: > > /* list to quickly access the injected ops */ > QSIMPLEQ_HEAD(, TCGOp) plugin_ops; > > I wonder if we should drop that and just scan QTAILQ_HEAD(, TCGOp) ops > so we can be properly aligned with the current instruction. > Alternatively we could just emit INDEX_op_insn_start to the plugin list > as well? I suspect that just scanning the whole list would be easiest. Then you don't need to maintain your own separate list. r~