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=-11.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=ham 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 570FAC432BE for ; Thu, 2 Sep 2021 02:46:20 +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 650FE610A4 for ; Thu, 2 Sep 2021 02:46:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 650FE610A4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=c-sky.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:56318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mLck6-0004oL-46 for qemu-devel@archiver.kernel.org; Wed, 01 Sep 2021 22:46:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLcil-0003v0-KC; Wed, 01 Sep 2021 22:44:55 -0400 Received: from out28-149.mail.aliyun.com ([115.124.28.149]:54672) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLcii-0000xe-Fm; Wed, 01 Sep 2021 22:44:55 -0400 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.08105341|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_regular_dialog|0.00221651-0.000382852-0.997401; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047205; MF=zhiwei_liu@c-sky.com; NM=1; PH=DS; RN=7; RT=7; SR=0; TI=SMTPD_---.LEK.SRY_1630550683; Received: from 10.0.2.15(mailfrom:zhiwei_liu@c-sky.com fp:SMTPD_---.LEK.SRY_1630550683) by smtp.aliyun-inc.com(10.147.44.118); Thu, 02 Sep 2021 10:44:43 +0800 Subject: Re: [PATCH] target/riscv: Fix satp write To: Bin Meng References: <20210901124539.222868-1-zhiwei_liu@c-sky.com> From: LIU Zhiwei Message-ID: Date: Thu, 2 Sep 2021 10:44:43 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: none client-ip=115.124.28.149; envelope-from=zhiwei_liu@c-sky.com; helo=out28-149.mail.aliyun.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-1.029, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, UNPARSEABLE_RELAY=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: "open list:RISC-V" , Bin Meng , Richard Henderson , "qemu-devel@nongnu.org Developers" , Palmer Dabbelt , Alistair Francis Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 2021/9/2 上午9:59, Bin Meng wrote: > On Thu, Sep 2, 2021 at 9:02 AM LIU Zhiwei wrote: >> >> On 2021/9/1 下午9:05, Bin Meng wrote: >>> On Wed, Sep 1, 2021 at 8:51 PM LIU Zhiwei wrote: >>>> These variables should be target_ulong. If truncated to int, >>>> the bool conditions they indicate will be wrong. >>>> >>>> As satp is very important for Linux, this bug almost fails every boot. >>> Could you please describe which Linux configuration is broken? >> I use the image from: >> >> https://gitlab.com/c-sky/buildroot/-/jobs/1251564514/artifacts/browse/output/images/ >> >>> I have >>> a 64-bit 5.10 kernel and it boots fine. >> The login is mostly OK for me. But the busybox can't run properly. > Which kernel version is this? 5.10.4 > Could you please investigate and > indicate in the commit message? > > I just tested current qemu-system-riscv64 can boot to Ubuntu 20.04 > distro user space. Very strange.  This will cause tlb_flush can't be called in this function. Thanks, Zhiwei > > Regards, > Bin From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mLcin-0003vU-F1 for mharc-qemu-riscv@gnu.org; Wed, 01 Sep 2021 22:44:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLcil-0003v0-KC; Wed, 01 Sep 2021 22:44:55 -0400 Received: from out28-149.mail.aliyun.com ([115.124.28.149]:54672) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mLcii-0000xe-Fm; Wed, 01 Sep 2021 22:44:55 -0400 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.08105341|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_regular_dialog|0.00221651-0.000382852-0.997401; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047205; MF=zhiwei_liu@c-sky.com; NM=1; PH=DS; RN=7; RT=7; SR=0; TI=SMTPD_---.LEK.SRY_1630550683; Received: from 10.0.2.15(mailfrom:zhiwei_liu@c-sky.com fp:SMTPD_---.LEK.SRY_1630550683) by smtp.aliyun-inc.com(10.147.44.118); Thu, 02 Sep 2021 10:44:43 +0800 Subject: Re: [PATCH] target/riscv: Fix satp write To: Bin Meng Cc: "qemu-devel@nongnu.org Developers" , "open list:RISC-V" , Palmer Dabbelt , Richard Henderson , Bin Meng , Alistair Francis References: <20210901124539.222868-1-zhiwei_liu@c-sky.com> From: LIU Zhiwei Message-ID: Date: Thu, 2 Sep 2021 10:44:43 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: none client-ip=115.124.28.149; envelope-from=zhiwei_liu@c-sky.com; helo=out28-149.mail.aliyun.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-1.029, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 02:44:55 -0000 On 2021/9/2 上午9:59, Bin Meng wrote: > On Thu, Sep 2, 2021 at 9:02 AM LIU Zhiwei wrote: >> >> On 2021/9/1 下午9:05, Bin Meng wrote: >>> On Wed, Sep 1, 2021 at 8:51 PM LIU Zhiwei wrote: >>>> These variables should be target_ulong. If truncated to int, >>>> the bool conditions they indicate will be wrong. >>>> >>>> As satp is very important for Linux, this bug almost fails every boot. >>> Could you please describe which Linux configuration is broken? >> I use the image from: >> >> https://gitlab.com/c-sky/buildroot/-/jobs/1251564514/artifacts/browse/output/images/ >> >>> I have >>> a 64-bit 5.10 kernel and it boots fine. >> The login is mostly OK for me. But the busybox can't run properly. > Which kernel version is this? 5.10.4 > Could you please investigate and > indicate in the commit message? > > I just tested current qemu-system-riscv64 can boot to Ubuntu 20.04 > distro user space. Very strange.  This will cause tlb_flush can't be called in this function. Thanks, Zhiwei > > Regards, > Bin