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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C0B0C636D7 for ; Tue, 21 Feb 2023 04:37:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232789AbjBUEhL (ORCPT ); Mon, 20 Feb 2023 23:37:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232948AbjBUEhG (ORCPT ); Mon, 20 Feb 2023 23:37:06 -0500 Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E09324CBA for ; Mon, 20 Feb 2023 20:37:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1676954221; bh=lefJq0PkABiE40hGP+cE8pG5V0Ru6IiPZz+2dOAh2DQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=YYIpv6zJsqWzhdbfWvspbND955SnKSHHFRLw8GOhYDEntWPuWp0L+FW3BNKyhpLp8 tjQuqncIr+DGVWcPhVYOI7rQFoMxbie6E3hL+87kmR7kFjtselhdw478SZHkQVKeB0 /+2K8kPoxKsM5m7PzpEw7bx2ugJBGTfv7ArXjHII= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 9559265C4D; Mon, 20 Feb 2023 23:36:59 -0500 (EST) Message-ID: Subject: Re: [PATCH v2 01/29] LoongArch: KVM: Add kvm related header files From: Xi Ruoyao To: Tianrui Zhao , Paolo Bonzini Cc: Huacai Chen , WANG Xuerui , Greg Kroah-Hartman , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Jens Axboe , Mark Brown , Alex Deucher , Oliver Upton , maobibo@loongson.cn Date: Tue, 21 Feb 2023 12:36:58 +0800 In-Reply-To: <20230220065735.1282809-2-zhaotianrui@loongson.cn> References: <20230220065735.1282809-1-zhaotianrui@loongson.cn> <20230220065735.1282809-2-zhaotianrui@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2023-02-20 at 14:57 +0800, Tianrui Zhao wrote: /* snip */ > +/* > + * for KVM_GET_FPU and KVM_SET_FPU > + */ > +struct kvm_fpu { > + __u32 fcsr; > + __u32 none; > + __u64 fcc; /* 8x8 */ > + struct kvm_fpureg { > + __u64 val64[4]; //support max 256 bits > + } fpr[32]; Do we need __attribute__((__aligned__(16))) for fpureg (like sc_extcontext in struct sigcontext)? > +}; > + > +/* > + * For LOONGARCH, we use KVM_SET_ONE_REG and KVM_GET_ONE_REG to ^^^^^^^^^ LoongArch > access various > + * registers.=C2=A0 The id field is broken down as follows: > + * > + *=C2=A0 bits[63..52] - As per linux/kvm.h > + *=C2=A0 bits[51..32] - Must be zero. > + *=C2=A0 bits[31..16] - Register set. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University