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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3F8CC433EF for ; Mon, 18 Oct 2021 05:33:58 +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 46D9260EE3 for ; Mon, 18 Oct 2021 05:33:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 46D9260EE3 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]:47832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcLHZ-0007VW-71 for qemu-devel@archiver.kernel.org; Mon, 18 Oct 2021 01:33:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcLFh-0006bS-TH for qemu-devel@nongnu.org; Mon, 18 Oct 2021 01:32:02 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:41789) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mcLFf-0001BG-Df for qemu-devel@nongnu.org; Mon, 18 Oct 2021 01:32:00 -0400 Received: by mail-pl1-x635.google.com with SMTP id e10so5525165plh.8 for ; Sun, 17 Oct 2021 22:31:56 -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=JGZwShwgKrwz5GKrAYdmMeKE08mmQzUw0gujh+N8JpA=; b=Weid6OIPPQbz0NjqLZtIHdkxZkQ79dvxReK6VRAJEFtA1fF3T9+s9Tw3+DMwbzfxZB 3zv0uUGVIQ/N6tHO7NmOaRK3QvOoHfFnfP/dvgtBbM64Dd2pcbwuorPdMW+tc9YcjvIX OP0ijq+/UzC7VEARzhQuXnHfU+NFGFkuJ/iWUCHRjcQkGgxaq5P0OHyivkPJgjWSIVL0 hk8AQXy5zZL0a9aau1wWKOVhfSDZ8nv+OBo+sVYeuxmyYLEsi4d+wgKU+Wq76YWSO7bb s9fzbzUrfA9Udsi8WB878P/Pxyeq6rpCgL9HK9FvZkHrdvrpAh1+s7q1/YJzb3NqP7Ge 7vlA== 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=JGZwShwgKrwz5GKrAYdmMeKE08mmQzUw0gujh+N8JpA=; b=R1zc6lXOR9t2p+Hg8OqVOefqqlRbx/YRcsuHzFYMkIzrsUQDJx0YrLTnFt6tq5s/Iy 8/ClTJbrMh25dMQamDU7WUBU1LIOFKk36ZG6U36xK1zYQu/m+fvUlWZNoyjrLIboynkG ABhu7yEx/OwvYLbsPBH68MujCzl0dYWZ25sGelYK9gyoucqRi4rPXGYuTP17VNVYgt0B vINaIQftoIto4aVHWM5eunrIGBmrMOJodLPkuBOeuSJ8I3UanuZ7yUu+FUEneonZhICq UsPgs+bplwqq6BbJcnK0Nksr4I4hymL+aIZAVCoXaQbwvK2iNnPHmGT8Iw0DRgiXQPKU PTlw== X-Gm-Message-State: AOAM533fv4Z80sLuVY3VIA+PttHGW6YTsVaJLx+Fv6oYhUVlI9tz4qcE r3w1hC7mUKjrnp9LZtN/BOfCbw== X-Google-Smtp-Source: ABdhPJwAVEElnScyna0RgrJ+wENwN6aP2K7y+KQEXZTxl8EJkrNHZMUAJVal7MP1JIAoIjOxCYNezg== X-Received: by 2002:a17:90b:3786:: with SMTP id mz6mr44340924pjb.245.1634535115805; Sun, 17 Oct 2021 22:31:55 -0700 (PDT) Received: from [192.168.1.11] ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id i2sm12356090pjt.21.2021.10.17.22.31.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 17 Oct 2021 22:31:55 -0700 (PDT) Subject: Re: [PATCH v3 14/14] target/riscv: Compute mstatus.sd on demand To: Alistair Francis References: <20211016171412.3163784-1-richard.henderson@linaro.org> <20211016171412.3163784-15-richard.henderson@linaro.org> From: Richard Henderson Message-ID: Date: Sun, 17 Oct 2021 22:31:53 -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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: "open list:RISC-V" , Frank Chang , "qemu-devel@nongnu.org Developers" , Alistair Francis , Fabien Portas , =?UTF-8?B?RnLDqWTDqXJpYyBQw6l0cm90?= , liuzhiwei Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 10/17/21 9:52 PM, Alistair Francis wrote: > On Sun, Oct 17, 2021 at 3:32 AM Richard Henderson > wrote: >> >> The position of this read-only field is dependent on the >> current cpu width. Rather than having to compute that >> difference in many places, compute it only on read. >> >> Signed-off-by: Richard Henderson > > This means that the value reported by riscv_cpu_dump_state() and GDB > will both be incorrect though? Yep. Missed those; should have added another accessor. Also, for the record, it changes the vmstate, but since a previous patch in the series bumped the version number for the split on misa, we can call all of a piece and ok. r~