From nobody Fri Dec 19 19:16:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail header.i=@wdc.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=wdc.com ARC-Seal: i=1; a=rsa-sha256; t=1572047912; cv=none; d=zoho.com; s=zohoarc; b=EEUAcNVdhFZpn6cxpFxuMyutqZEeAfYUYBgq/YehlSUIETTuD01Xn6+ghilIlBVJz58ZqqwlvYqOUAX86LKLcrBW/aOHu8ARvXwF1KDa22nQyfRIbeTv/G1a9hzl/W0dAbC9eJebxBXl3Y4qvqvtYRCutgPgYi+h2CmBlC7BoiY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572047912; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8s5grRxZRCnBkyDORRsGKhw8JzNWkpN+ED7OjbDPmb8=; b=dudTp/4YQ/rCws1PpJI2YL+p9U+rOr5zwVHj2dWCWu3QJqCTgTW95EUlmlVZamhTxcyM3R6h4LHjBzIp++kxF+BQaR+yAZpR/zpjSMIpZNQKC0D1fX/dT4Wu7UIHu8weZF4T8CS2wA/xwIdndDYX2gvVQV0Amm8+v9HbGRsNmnI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail header.i=@wdc.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1572047912305139.97889617395845; Fri, 25 Oct 2019 16:58:32 -0700 (PDT) Received: from localhost ([::1]:37244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iO9TQ-0007rf-Gc for importer@patchew.org; Fri, 25 Oct 2019 19:58:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49863) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iO91C-0005BN-5X for qemu-devel@nongnu.org; Fri, 25 Oct 2019 19:29:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iO91A-0004Xz-Vh for qemu-devel@nongnu.org; Fri, 25 Oct 2019 19:29:17 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:36801) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iO917-0004Sy-Pg; Fri, 25 Oct 2019 19:29:14 -0400 Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 26 Oct 2019 07:29:13 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2019 16:24:39 -0700 Received: from risc6-mainframe.sdcorp.global.sandisk.com (HELO risc6-mainframe.int.fusionio.com) ([10.196.157.58]) by uls-op-cesaip01.wdc.com with ESMTP; 25 Oct 2019 16:29:13 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1572046154; x=1603582154; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=X5dyDZAU+qyzeBfQWrLfqPPCa3H8yb2Aup7zkIbTqeU=; b=iOBbjpO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Z3FMnLFGM6bzUqEmwh0Ltu3W8aL9VxPYnymF3x+hruIbkXxyAVeNzu qU5ELiEbFcBfdoIsQN+jQ8RX33NHwi+rZpbWZhg9IndU0HgZ6CqF/RNc8o/qbXEj9FOMUlqb05 7sOSxhZ2GWONZiiKtkvsLRSTyewEBqLGJqR9jZzcIX3EvvzlJ6Z2sEyjzi0xycfWQr7Nrn5FX0 mymP3uS87QcbMDtoupZL0FbjmOYulJHPJT5DE9U0ub6Nyo8gYTs9dFVwRv7CGc9eDICDyk1Vy+ U9k= WDCIronportException: Internal From: Alistair Francis To: qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH v2 20/27] target/riscv: Disable guest FP support based on virtual status Date: Fri, 25 Oct 2019 16:24:17 -0700 Message-Id: <8014e06e5b0c5fad5b0a33e977bf9bb50a8cab30.1572045716.git.alistair.francis@wdc.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 216.71.154.45 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: alistair23@gmail.com, palmer@sifive.com, alistair.francis@wdc.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" When the Hypervisor extension is in use we only enable floating point support when both status and vsstatus have enabled floating point support. Signed-off-by: Alistair Francis Reviewed-by: Palmer Dabbelt --- target/riscv/cpu_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 41cd314f64..79966ac6e6 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -91,6 +91,9 @@ bool riscv_cpu_exec_interrupt(CPUState *cs, int interrupt= _request) bool riscv_cpu_fp_enabled(CPURISCVState *env) { if (*env->mstatus & MSTATUS_FS) { + if (riscv_cpu_virt_enabled(env) && !(env->vsstatus & MSTATUS_FS)) { + return false; + } return true; } =20 --=20 2.23.0