From nobody Mon Nov 25 01:58:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1719482509; cv=none; d=zohomail.com; s=zohoarc; b=htN9vYl9E+oAD/Qj+4hfXD/TcMYNkt3Q3TIAAsSI54TPwMVnBTlvpGBrzc6mPuBB0P24Ix/EQtl879In5QrVpQr1jlO0elwB5gnlAFtmGiSGW9fX7CLWD9+lKBbmOpmeqdyjiLffQUzDXs95VDuvu/SY6BKH2y4cdE0Y+6tJTno= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719482509; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9SbOXMdD9Afo9G+k2c8nKcFprRWncVmzYgA0dcpIFRM=; b=WVhx6G5HZXLmvnKLvFWcNcuJaygH16bFZbkIv2XLV7Y7iYAumDmr73nOpieUCukI5OUOR9zw2dtqDnZYsw5RZTbSD3vLsHP0FJz26ALQVDDtjcDZZPStIDAmMeTnfNDj2SnxPKm52b9Ep7iTzP6nNjIDqyaSELeh3biTjtnl9J8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719482509722176.51945473228147; Thu, 27 Jun 2024 03:01:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMlwH-0004wh-3I; Thu, 27 Jun 2024 06:01:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMlwF-0004wT-UD for qemu-devel@nongnu.org; Thu, 27 Jun 2024 06:01:11 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMlwE-0001ZC-B3 for qemu-devel@nongnu.org; Thu, 27 Jun 2024 06:01:11 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-7067a2e9607so3839391b3a.3 for ; Thu, 27 Jun 2024 03:01:09 -0700 (PDT) Received: from toolbox.alistair23.me (2403-580b-97e8-0-82ce-f179-8a79-69f4.ip6.aussiebb.net. [2403:580b:97e8:0:82ce:f179:8a79:69f4]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-706b4a07326sm932431b3a.111.2024.06.27.03.01.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 03:01:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719482469; x=1720087269; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9SbOXMdD9Afo9G+k2c8nKcFprRWncVmzYgA0dcpIFRM=; b=fl9UINKxO0NLuqqzyo8BT2fq5WyQXDQZRQdWHakguc15GULVtHUO4hCbOhFLN62IMd ZB2sl//WkbQv7ZnnK+BXlFe7i6KyVrvoKFM5KBlQ0VaVR+vvL6NO1hqN/l7bddbX7WXW a47+XXXmkyKWvqID1ScGQ2JUeWh3dTw+UEzm4nEY1lCsmmK7B4Fm4BvAW1CLUHXoazK/ lQoBjsb/A2PYCQft7JeQHaM5+Ohy6Bi4f8VDjaSE35W7klCoQZLqjhHQPm80jl8M1hu6 Ev3rC0ztXYjFLIMRhT0OsVABu6IC2kkAn291LZLpe8czZCPr7Ny3LqXux6AnkoFrL38V PMew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719482469; x=1720087269; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9SbOXMdD9Afo9G+k2c8nKcFprRWncVmzYgA0dcpIFRM=; b=mcO+jj6sUVQOxHKV+tsCN+NBg7eD16OtwUjb4NOl3wbP/QuC5S6lkwPsV6x3WZxYpR FT+4SS/UCaKawc9ZCPfdBQRK62akJuWLuboPfQ5AujdQbwgreSS1joQMXsa2pYvkft5u D+WhIzOyeOba6pGRaewGcgZnGbruYLVMpTcUQCbKxCwCF+/GaNrB/h9vxtu2I0kESQ8Q MtJf4iewcxX+VtJFL5F2DJRNUURNekmAuPVgrNQ7aeWAN67C98dMhOp89KXz3cnpLXbd QjcSXqYZK8zjAJH2igvVct61H4sP0T9rdAafI507e6j8lj/Gay4tecMKv1Sgg1ElTNwK cRsg== X-Gm-Message-State: AOJu0YwzmGfmr29ml32dqenShQNM8eFhSemW+ESSTUrydNtVElm7VRed 8siZL0PreN0kNDVRCbTYb+4WkKEiDl+GvqZdG9GvsSXcUGB1IDRkn/EOP8pE X-Google-Smtp-Source: AGHT+IF3MUcSMi3w/Up7qCoJNqQKwduv5II7kpoB4syDjuHb27AzrelLTkCBjZsYc8HV4bQwjwBOhw== X-Received: by 2002:a05:6a00:18a3:b0:704:3a0f:1d88 with SMTP id d2e1a72fcca58-70670ffc05dmr19409067b3a.21.1719482468559; Thu, 27 Jun 2024 03:01:08 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Rajnesh Kanwal , Daniel Henrique Barboza , Alistair Francis Subject: [PULL 01/32] target/riscv: Extend virtual irq csrs masks to be 64 bit wide. Date: Thu, 27 Jun 2024 20:00:22 +1000 Message-ID: <20240627100053.150937-2-alistair.francis@wdc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240627100053.150937-1-alistair.francis@wdc.com> References: <20240627100053.150937-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=alistair23@gmail.com; helo=mail-pf1-x432.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1719482511697100003 Content-Type: text/plain; charset="utf-8" From: Rajnesh Kanwal AIA extends the width of all IRQ CSRs to 64bit even in 32bit systems by adding missing half CSRs. This seems to be missed while adding support for virtual IRQs. The whole logic seems to be correct except the width of the masks. Fixes: 1697837ed9 ("target/riscv: Add M-mode virtual interrupt and IRQ filt= ering support.") Fixes: 40336d5b1d ("target/riscv: Add HS-mode virtual interrupt and IRQ fil= tering support.") Signed-off-by: Rajnesh Kanwal Reviewed-by: Daniel Henrique Barboza Acked-by: Alistair Francis Message-ID: <20240520125157.311503-2-rkanwal@rivosinc.com> Signed-off-by: Alistair Francis --- target/riscv/csr.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 58ef7079dc..dd89edb06a 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -1197,18 +1197,18 @@ static const target_ulong sstatus_v1_10_mask =3D SS= TATUS_SIE | SSTATUS_SPIE | */ =20 /* Bit STIP can be an alias of mip.STIP that's why it's writable in mvip. = */ -static const target_ulong mvip_writable_mask =3D MIP_SSIP | MIP_STIP | MIP= _SEIP | +static const uint64_t mvip_writable_mask =3D MIP_SSIP | MIP_STIP | MIP_SEI= P | LOCAL_INTERRUPTS; -static const target_ulong mvien_writable_mask =3D MIP_SSIP | MIP_SEIP | +static const uint64_t mvien_writable_mask =3D MIP_SSIP | MIP_SEIP | LOCAL_INTERRUPTS; =20 -static const target_ulong sip_writable_mask =3D SIP_SSIP | LOCAL_INTERRUPT= S; -static const target_ulong hip_writable_mask =3D MIP_VSSIP; -static const target_ulong hvip_writable_mask =3D MIP_VSSIP | MIP_VSTIP | +static const uint64_t sip_writable_mask =3D SIP_SSIP | LOCAL_INTERRUPTS; +static const uint64_t hip_writable_mask =3D MIP_VSSIP; +static const uint64_t hvip_writable_mask =3D MIP_VSSIP | MIP_VSTIP | MIP_VSEIP | LOCAL_INTERRUPTS; -static const target_ulong hvien_writable_mask =3D LOCAL_INTERRUPTS; +static const uint64_t hvien_writable_mask =3D LOCAL_INTERRUPTS; =20 -static const target_ulong vsip_writable_mask =3D MIP_VSSIP | LOCAL_INTERRU= PTS; +static const uint64_t vsip_writable_mask =3D MIP_VSSIP | LOCAL_INTERRUPTS; =20 const bool valid_vm_1_10_32[16] =3D { [VM_1_10_MBARE] =3D true, --=20 2.45.2