Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3113524rdb; Tue, 26 Dec 2023 17:11:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMnhmDtmKRD7rvIAS19TpPCWxfmXi+oOqq+His0tDuvpJ641E/z3nxTm13LKfjZg5aclFp X-Received: by 2002:adf:a2dc:0:b0:333:e8d:99d8 with SMTP id t28-20020adfa2dc000000b003330e8d99d8mr3744144wra.36.1703639512617; Tue, 26 Dec 2023 17:11:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703639512; cv=none; d=google.com; s=arc-20160816; b=LR/eUFuwvAg3g+TOMOkaui9vGt0pggvTN2iWncELEVPi6mm+1sOt8P+j6kLDOtmSSJ cd8++9lCCO+o1f6+PESWEIs84/88rEdo7fgywX5eQKtqEyRHwC+0uCESP7AYGK9EQ+1h pm/w2I7ouFrnXxDbXfWBfgqUOaFxil6WXGISL5gXXNp91uaLtoQdfIEz5NUnd0Vrb7Ly IdL3XU1uxEzewmywqTTzO418iG+v5HrIccd0Hw3F51L31cTLY1nehbH8gYSaTUze0dhj 1kQlsXyry4qv3HF/SI8KovVV0qZK6oJVWJJiUeuHyqMUCk+hKeGAao9u/HZk2Mlu0l+W DbZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=OiWj2IiRhTyQe5gPsjF+NCfCybpp0NSBGMwPObIbJtY=; fh=G4hKcbhahBoFZ0wIpd9Am6qqYqY5Elx4ZhEULpt/irA=; b=wycvya0dJrcOL2f8PE06Ig7CzmrvqqBfsbSXw+jMP9+Ee8cywuOMOO62FwkEHohnfH 4jT+0F+76ZvBwI+4ThHypzbEM6BDgqXfdkg6iV3e53zJteDmE79kdVz+jH0ePgNZOV+P YgnyBtqGoPeXlc8HRcA9vmbmLtleXI10hKEWCAEj2rBBnqicWjrrQLs/bHyfaiwCsulE 76w7HJLcmQUyuQzDRnWt79bkU8GhzHig7QWBTj8qdRrMvLHx10EyBHDz6gZgfRers76+ cOgfsMt0muW9dy8P3G60U6E6XMd3cV5dfJif+c39oKquHZzcX1ObnB/UZxHceIrlXXSH VhkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="rBeI/rl4"; spf=pass (google.com: domain of linux-kernel+bounces-11754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11754-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r27-20020a50d69b000000b0055337d0a87dsi5778140edi.426.2023.12.26.17.11.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 17:11:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="rBeI/rl4"; spf=pass (google.com: domain of linux-kernel+bounces-11754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11754-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5B3CF1F21653 for ; Wed, 27 Dec 2023 01:11:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E8F81FCC; Wed, 27 Dec 2023 01:11:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rBeI/rl4" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 AD06A1FA3; Wed, 27 Dec 2023 01:11:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48555C433C8; Wed, 27 Dec 2023 01:11:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703639500; bh=O2jkYF1Uj7zpLQqP5wedmD/DGNDodYvLwbo4m5DcCbU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=rBeI/rl4c4s+waM0bn3V1PHFedX3Vi7PRDnxv9QeDGB9m09QU6HcCJv0/jVWGH4Xx aFX3F7qxi0VlM/6bYKK1jSoYmdk2atswEf7ftMC0S6DZe9nOPxXZHiwSMhgetJmWii zAOGp0mDOApvVjFx0H7wm+3geKQlo4/CDTIUUH93RF7HCHnTgwE7AJb037bhqX19bI OmjygCEsmDbNRN4shHr9/Mj1GsXv59bQv5S7G3ff8ie9XlbNtQJyuzTiVwSZ5Q4mj2 j/bUnl6gOG2/1iX6jXMF37pjVcpoyElqpb7ynNZPUDoo3orHPEBAZZrAbbHZDXhAMs 8nrUQ8Nl2ClGA== Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-55539cac143so687242a12.0; Tue, 26 Dec 2023 17:11:40 -0800 (PST) X-Gm-Message-State: AOJu0YzSqm5kDdNH8mhkteyjdEAc3n1Wup9QBRsSDXx61YEYn6PWlnBd VEU7T+oLYrQW+zBpOtAOzUFw7mHJZPrQ+9nhhRU= X-Received: by 2002:a17:906:3397:b0:a26:ee66:7928 with SMTP id v23-20020a170906339700b00a26ee667928mr1671728eja.105.1703639498782; Tue, 26 Dec 2023 17:11:38 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231227010742.21539-1-rdunlap@infradead.org> In-Reply-To: <20231227010742.21539-1-rdunlap@infradead.org> From: Huacai Chen Date: Wed, 27 Dec 2023 09:11:28 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] LoongArch: KVM: add a return kvm_own_lasx() stub To: Randy Dunlap Cc: linux-kernel@vger.kernel.org, Bibo Mao , Tianrui Zhao , Huacai Chen , WANG Xuerui , kvm@vger.kernel.org, loongarch@lists.linux.dev, Stephen Rothwell Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Randy, Could you please fix kvm_own_lsx() together? Huacai On Wed, Dec 27, 2023 at 9:07=E2=80=AFAM Randy Dunlap wrote: > > The stub for kvm_own_lasx() when CONFIG_CPU_HAS_LASX is not defined > should have a return value since it returns an int, so add > "return -EINVAL;" to the stub. Fixes the build error: > > In file included from ../arch/loongarch/include/asm/kvm_csr.h:12, > from ../arch/loongarch/kvm/interrupt.c:8: > ../arch/loongarch/include/asm/kvm_vcpu.h: In function 'kvm_own_lasx': > ../arch/loongarch/include/asm/kvm_vcpu.h:73:39: error: no return statemen= t in function returning non-void [-Werror=3Dreturn-type] > 73 | static inline int kvm_own_lasx(struct kvm_vcpu *vcpu) { } > > Fixes: 118e10cd893d ("LoongArch: KVM: Add LASX (256bit SIMD) support") > Signed-off-by: Randy Dunlap > Cc: Bibo Mao > Cc: Tianrui Zhao > Cc: Huacai Chen > Cc: WANG Xuerui > Cc: kvm@vger.kernel.org > Cc: loongarch@lists.linux.dev > Cc: Stephen Rothwell > --- > arch/loongarch/include/asm/kvm_vcpu.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -- a/arch/loongarch/include/asm/kvm_vcpu.h b/arch/loongarch/include/= asm/kvm_vcpu.h > --- a/arch/loongarch/include/asm/kvm_vcpu.h > +++ b/arch/loongarch/include/asm/kvm_vcpu.h > @@ -70,7 +70,7 @@ int kvm_own_lasx(struct kvm_vcpu *vcpu); > void kvm_save_lasx(struct loongarch_fpu *fpu); > void kvm_restore_lasx(struct loongarch_fpu *fpu); > #else > -static inline int kvm_own_lasx(struct kvm_vcpu *vcpu) { } > +static inline int kvm_own_lasx(struct kvm_vcpu *vcpu) { return -EINVAL; = } > static inline void kvm_save_lasx(struct loongarch_fpu *fpu) { } > static inline void kvm_restore_lasx(struct loongarch_fpu *fpu) { } > #endif >