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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0049C71157 for ; Tue, 24 Jun 2025 04:38:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UlrYMcoXpGLNZtvioIAVbGCEdrBvgXPrf8oMQMbUl2Q=; b=BGGYBpYmKwU1E3 ZnXICzBrk8XIAmtqwFRLeG00tWvep9/sDOg3ev5F0g0OuSBtR4hPvaom06k5YlJDQyRVy3+pXvuoz vceQo8Iz0ImEyFlErlKJRtSjJjIhZsAggmrsanvx7WWmtZxyFFOlg97sifY2sdo2c2BfsZhj6ZaiI dh1yW+g15ayTEvW5mdWQEVew5IFIAyvixXp8kf+yBWxrqNG+EoxwZYauHT3FSRgZYa2TKg2QMjw+U wiPh7lBZ6waVgh2ZxqlHz9CAs4WfKYAr9j/mykAj6Aywhs9TKs5aZLlfllqHFBTiQ+pF8xj6Odwru E2t8F/e2qA3I69ntiwJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uTvQW-00000004ce9-3ivZ; Tue, 24 Jun 2025 04:38:32 +0000 Received: from out-173.mta0.migadu.com ([91.218.175.173]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uTuOO-00000004YAc-0Ndk for kvm-riscv@lists.infradead.org; Tue, 24 Jun 2025 03:32:17 +0000 Message-ID: <78c18dd2-69d4-49f3-a464-b582a00d2f4c@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1750735932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vHvWN0nBK/1iz0XiFx6EVa3LaybalcP67xeWcGnBLH0=; b=HYQKctI2Shhd8seRP+ffCb3LO9nhqD7N5XzbRtBvvmx20rGKyUE0+ZVMEm4lP0TQmosZva 2v6HcJeeDP3UogmB/VfE/f86E+/hPeX1FEc1PaIGH+KSe+mwYN3w/eo0D5MSCWCIa7Oj6K gwhXfltsaeBa8rjqYfcS6KrGrnWVVZY= Date: Mon, 23 Jun 2025 20:32:07 -0700 MIME-Version: 1.0 Subject: Re: [PATCH v3 01/12] RISC-V: KVM: Check kvm_riscv_vcpu_alloc_vector_context() return value To: Anup Patel Cc: Palmer Dabbelt , Paul Walmsley , Alexandre Ghiti , Andrew Jones , Anup Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20250618113532.471448-1-apatel@ventanamicro.com> <20250618113532.471448-2-apatel@ventanamicro.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Atish Patra In-Reply-To: <20250618113532.471448-2-apatel@ventanamicro.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250623_203216_327173_C15ECB41 X-CRM114-Status: GOOD ( 12.13 ) X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+kvm-riscv=archiver.kernel.org@lists.infradead.org On 6/18/25 4:35 AM, Anup Patel wrote: > The kvm_riscv_vcpu_alloc_vector_context() does return an error code > upon failure so don't ignore this in kvm_arch_vcpu_create(). > > Signed-off-by: Anup Patel > --- > arch/riscv/kvm/vcpu.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c > index 303aa0a8a5a1..b467dc1f4c7f 100644 > --- a/arch/riscv/kvm/vcpu.c > +++ b/arch/riscv/kvm/vcpu.c > @@ -148,8 +148,9 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu) > > spin_lock_init(&vcpu->arch.reset_state.lock); > > - if (kvm_riscv_vcpu_alloc_vector_context(vcpu)) > - return -ENOMEM; > + rc = kvm_riscv_vcpu_alloc_vector_context(vcpu); > + if (rc) > + return rc; > > /* Setup VCPU timer */ > kvm_riscv_vcpu_timer_init(vcpu); Reviewed-by: Atish Patra -- kvm-riscv mailing list kvm-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kvm-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-177.mta0.migadu.com (out-177.mta0.migadu.com [91.218.175.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E3028462 for ; Tue, 24 Jun 2025 03:32:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750735936; cv=none; b=I6nerT2Fre0pYpWrEApE8Cinf3snYwtE+BTjziH4eKXYwG1xgPKEHYeN+AVVgSxqDjKRffr2fHyHP86cUa2RVJSzWnxm9zYVeqouJL9o9MhDYlW5CD6pt5721EbkE3pg9g9zbRbGymGZJnR4XrWOdZY6+Q3XWXquZ4ban8hZQ1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750735936; c=relaxed/simple; bh=M6AdOiQsUgSJClzTHfGsZyI4BzAfupJfHcAQ8+AVXU4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QkkFcgzOBOroGP5SEM+agY88Syn+qbHJhQsOMdMYiRFmROCs59ahYdMF2RuFbambeMPiKnQJWv72p/1e0FR/Z9GR3yIXCLKfWABEOSjUJ2mAQJiVEzLasXnO6ru0e8Bv23svFPMjnUKj/gdsm1XCLTsqo6dodZvvJT5lGbmCcLs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=HYQKctI2; arc=none smtp.client-ip=91.218.175.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="HYQKctI2" Message-ID: <78c18dd2-69d4-49f3-a464-b582a00d2f4c@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1750735932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vHvWN0nBK/1iz0XiFx6EVa3LaybalcP67xeWcGnBLH0=; b=HYQKctI2Shhd8seRP+ffCb3LO9nhqD7N5XzbRtBvvmx20rGKyUE0+ZVMEm4lP0TQmosZva 2v6HcJeeDP3UogmB/VfE/f86E+/hPeX1FEc1PaIGH+KSe+mwYN3w/eo0D5MSCWCIa7Oj6K gwhXfltsaeBa8rjqYfcS6KrGrnWVVZY= Date: Mon, 23 Jun 2025 20:32:07 -0700 Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v3 01/12] RISC-V: KVM: Check kvm_riscv_vcpu_alloc_vector_context() return value To: Anup Patel Cc: Palmer Dabbelt , Paul Walmsley , Alexandre Ghiti , Andrew Jones , Anup Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20250618113532.471448-1-apatel@ventanamicro.com> <20250618113532.471448-2-apatel@ventanamicro.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Atish Patra In-Reply-To: <20250618113532.471448-2-apatel@ventanamicro.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 6/18/25 4:35 AM, Anup Patel wrote: > The kvm_riscv_vcpu_alloc_vector_context() does return an error code > upon failure so don't ignore this in kvm_arch_vcpu_create(). > > Signed-off-by: Anup Patel > --- > arch/riscv/kvm/vcpu.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c > index 303aa0a8a5a1..b467dc1f4c7f 100644 > --- a/arch/riscv/kvm/vcpu.c > +++ b/arch/riscv/kvm/vcpu.c > @@ -148,8 +148,9 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu) > > spin_lock_init(&vcpu->arch.reset_state.lock); > > - if (kvm_riscv_vcpu_alloc_vector_context(vcpu)) > - return -ENOMEM; > + rc = kvm_riscv_vcpu_alloc_vector_context(vcpu); > + if (rc) > + return rc; > > /* Setup VCPU timer */ > kvm_riscv_vcpu_timer_init(vcpu); Reviewed-by: Atish Patra 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7CD0DC7115B for ; Tue, 24 Jun 2025 03:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TXnT+Ma9j1Rh3kBK8soeTQutrOgDQoEiHJznx6wqB5M=; b=lDVzgwfrF70mMq GeZjpxSVVcMn2beu5DnC1ODPZhA4UXLgdGtDF8scNhQD0mAidtXknP7vz2IT15zkJqc6ekhYrdARi qgbPXcWS9VfK8imfFRiRgSAQ1Z1ELDl4OMMIdLDM8RemwxzEEpYvN5khQxlPedYSBry0+IjQFo4TL s4227Jpr3VqyYyib0zIgF7KVBEkLIbEtN5RQF/Re8x+ynQCGH8pGmgVdykn8obJ8mclHkKEfug6Sh +LIRhd7XI2nvFbyuh8Zn0AT4yryooanIl8H90h5cI+ebOYbCd6DxpZRseZJalmUHqIS7BNjpK4kAR Z/sdAJTopgqFBJdWfMkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uTuOZ-00000004YCu-0IvX; Tue, 24 Jun 2025 03:32:27 +0000 Received: from out-182.mta0.migadu.com ([2001:41d0:1004:224b::b6]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uTuOW-00000004YCE-1zfI for linux-riscv@lists.infradead.org; Tue, 24 Jun 2025 03:32:25 +0000 Message-ID: <78c18dd2-69d4-49f3-a464-b582a00d2f4c@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1750735932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vHvWN0nBK/1iz0XiFx6EVa3LaybalcP67xeWcGnBLH0=; b=HYQKctI2Shhd8seRP+ffCb3LO9nhqD7N5XzbRtBvvmx20rGKyUE0+ZVMEm4lP0TQmosZva 2v6HcJeeDP3UogmB/VfE/f86E+/hPeX1FEc1PaIGH+KSe+mwYN3w/eo0D5MSCWCIa7Oj6K gwhXfltsaeBa8rjqYfcS6KrGrnWVVZY= Date: Mon, 23 Jun 2025 20:32:07 -0700 MIME-Version: 1.0 Subject: Re: [PATCH v3 01/12] RISC-V: KVM: Check kvm_riscv_vcpu_alloc_vector_context() return value To: Anup Patel Cc: Palmer Dabbelt , Paul Walmsley , Alexandre Ghiti , Andrew Jones , Anup Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20250618113532.471448-1-apatel@ventanamicro.com> <20250618113532.471448-2-apatel@ventanamicro.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Atish Patra In-Reply-To: <20250618113532.471448-2-apatel@ventanamicro.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250623_203224_655553_CC5B8069 X-CRM114-Status: GOOD ( 12.22 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On 6/18/25 4:35 AM, Anup Patel wrote: > The kvm_riscv_vcpu_alloc_vector_context() does return an error code > upon failure so don't ignore this in kvm_arch_vcpu_create(). > > Signed-off-by: Anup Patel > --- > arch/riscv/kvm/vcpu.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c > index 303aa0a8a5a1..b467dc1f4c7f 100644 > --- a/arch/riscv/kvm/vcpu.c > +++ b/arch/riscv/kvm/vcpu.c > @@ -148,8 +148,9 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu) > > spin_lock_init(&vcpu->arch.reset_state.lock); > > - if (kvm_riscv_vcpu_alloc_vector_context(vcpu)) > - return -ENOMEM; > + rc = kvm_riscv_vcpu_alloc_vector_context(vcpu); > + if (rc) > + return rc; > > /* Setup VCPU timer */ > kvm_riscv_vcpu_timer_init(vcpu); Reviewed-by: Atish Patra _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv