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=-14.1 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 78806C433EF for ; Mon, 6 Sep 2021 03:24:32 +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 5C7E2603E7 for ; Mon, 6 Sep 2021 03:24:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5C7E2603E7 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]:48544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mN5FG-0006hC-Gj for qemu-devel@archiver.kernel.org; Sun, 05 Sep 2021 23:24:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mN5EK-0005sh-OE; Sun, 05 Sep 2021 23:23:32 -0400 Received: from out28-196.mail.aliyun.com ([115.124.28.196]:53823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mN5EH-0002zO-Rd; Sun, 05 Sep 2021 23:23:32 -0400 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.07790039|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.00338137-0.00059117-0.996027; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047207; MF=zhiwei_liu@c-sky.com; NM=1; PH=DS; RN=7; RT=7; SR=0; TI=SMTPD_---.LG4pgIz_1630898597; Received: from 10.0.2.15(mailfrom:zhiwei_liu@c-sky.com fp:SMTPD_---.LG4pgIz_1630898597) by smtp.aliyun-inc.com(10.147.42.241); Mon, 06 Sep 2021 11:23:17 +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: Mon, 6 Sep 2021 11:23:16 +0800 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-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: none client-ip=115.124.28.196; envelope-from=zhiwei_liu@c-sky.com; helo=out28-196.mail.aliyun.com X-Spam_score_int: -56 X-Spam_score: -5.7 X-Spam_bar: ----- X-Spam_report: (-5.7 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-3.832, 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 上午10:47, Bin Meng wrote: > On Thu, Sep 2, 2021 at 10:44 AM LIU Zhiwei wrote: >> >> 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. >> > Did your kernel enable asid? Yes. Is it matter? 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 1mN5EM-0005t5-6b for mharc-qemu-riscv@gnu.org; Sun, 05 Sep 2021 23:23:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mN5EK-0005sh-OE; Sun, 05 Sep 2021 23:23:32 -0400 Received: from out28-196.mail.aliyun.com ([115.124.28.196]:53823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mN5EH-0002zO-Rd; Sun, 05 Sep 2021 23:23:32 -0400 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.07790039|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.00338137-0.00059117-0.996027; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047207; MF=zhiwei_liu@c-sky.com; NM=1; PH=DS; RN=7; RT=7; SR=0; TI=SMTPD_---.LG4pgIz_1630898597; Received: from 10.0.2.15(mailfrom:zhiwei_liu@c-sky.com fp:SMTPD_---.LG4pgIz_1630898597) by smtp.aliyun-inc.com(10.147.42.241); Mon, 06 Sep 2021 11:23:17 +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: Mon, 6 Sep 2021 11:23:16 +0800 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-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: none client-ip=115.124.28.196; envelope-from=zhiwei_liu@c-sky.com; helo=out28-196.mail.aliyun.com X-Spam_score_int: -56 X-Spam_score: -5.7 X-Spam_bar: ----- X-Spam_report: (-5.7 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-3.832, 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: Mon, 06 Sep 2021 03:23:33 -0000 On 2021/9/2 上午10:47, Bin Meng wrote: > On Thu, Sep 2, 2021 at 10:44 AM LIU Zhiwei wrote: >> >> 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. >> > Did your kernel enable asid? Yes. Is it matter? Thanks, Zhiwei > > Regards, > Bin