Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6295475ybl; Mon, 23 Dec 2019 03:38:42 -0800 (PST) X-Google-Smtp-Source: APXvYqzOokd4xOJcS+LjdSRj0Zokwk82a0Wcv86aY5vQrec6yRhaYGCAxcUy9NVaPtq2zgxYiRfh X-Received: by 2002:a05:6830:1608:: with SMTP id g8mr30419359otr.169.1577101122507; Mon, 23 Dec 2019 03:38:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1577101122; cv=pass; d=google.com; s=arc-20160816; b=Uhhl6wc/zlCLveC7GdwuSvD3Qvx5ZlE6szWOUybRMVp+1Y3bN7zzL+aRj88cwNXDG3 SuZuwzOfkzR2b2v687z8Urgxa/ui+bco/tVmXpL3Kd6m4z7XRJXxJUOPoJ5syl0V4fRU SkGM9HuyPEPf37cHsE9cLafQU8Wde451gZ4IiyTTEcqeJaYqX7vfCoqsUi+H9P4rIPOd +GKrwXYkGuwzWxk78MvP8r1DmwTb8HKgr5oj33a9O9uJXH86c/PS8ronO1NYpO8OcCh9 FowcoO/eUUjg2ab0whhGSB/7QGyFgcyuuGQnuII8wQ8n8Q+Hq0apYRtJwb0Nqp7Kvch1 eaWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :wdcipoutbound:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature:ironport-sdr:dkim-signature; bh=Q0Kf2ObIpnRC207tVWW8R+obCb5P9RPWBBMJiDlP2zo=; b=KiuUT81Nv7hPjWSEuErtNiZBmxwYQvbWrgfIKKO4mki/zOdUpD5FUaPwd0jn/zakh9 F4IXYdP8bWEEAG2l/SrhQyog1oG+WMG8/Co3xo1HE6LSTpG1CfV0qrgAiPfq1Yq+iIRn uD8D364dMWMQ5Ds3Sm950qERKWXOc6qU6Oin8kNC4XdZv3ZvwojOMPlAHuxp5vuStmEN wRKSUk8utO5/qbjotQhvR31dGnUVTwfxovZF071tI7HKxbwCL5gzBqLkZTeSG4814bUp sogsfEStm//jj+Rur6Mn5XAPBVQU86azAATcMhIbiCdazWdnR12/hPbQGjlUbCHc03qb cfgw== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=f+ZHyLvl; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=pSLOIPNQ; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b17si8038283otl.320.2019.12.23.03.38.30; Mon, 23 Dec 2019 03:38:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=f+ZHyLvl; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=pSLOIPNQ; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727389AbfLWLh2 (ORCPT + 99 others); Mon, 23 Dec 2019 06:37:28 -0500 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:12796 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726791AbfLWLh1 (ORCPT ); Mon, 23 Dec 2019 06:37:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1577101047; x=1608637047; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=++PyPZyj4luXnNd4K3+8od+MXMsczvogYRnD5jbC560=; b=f+ZHyLvl4XVyzENo31kFGiIAMh+hz5vQuaaPFVs0OiFkE/m2047vO4Yy hJSZ7LwSAKFGJowibL71XxLiHPFLdCn82oiPPVsBCWIhkcuj6szcz6Mad CvGnTh3pvEVFYCu/hu9h86LB8iH0CLUm6j5nEyOlK4eQNOs/VU+FEAh07 DaI2iTRTJ1ROYl+CYyq0wLB0H7jhNyy2L4sPYw91DwhbAbPG01qqFrT/U 859gnQFPoKUKkMq9g/kuqSJEUtva2N9jBRxT4nyjcUEkd0mnJutr6P+/c C6rNxf6sACnA95nBfzZfLm2eVFiGONCCe5OvnYT+AAMCw1mPA+JDPZX40 w==; IronPort-SDR: EuDVWCnG9h/YmlFidGCm5u70eqVDmdPHM+GapkZtyciKcAM2/ulBKEUW9phGQ54hAjSpyOx9VO 5sokmC26Y57qPi7+G1TtcmtTS9lSvn4PHbWM0gtBuPIuGgoDvQu1gdjVwFrFArTmtXtuhX8UCj UaB4oAXHCQ/I8DUkJSNMnVcvVO2Agee5IjG73r8C2VNswhj7OkFIUiDUGnnhUOqw5uLvbxxfo5 yGbtbajsr5oANli8zdSeJ7MIRLlCW5Ppe1m/00wy+itQE6u07WV1WZohIFNttVn8oJmaiW7j4M 4YE= X-IronPort-AV: E=Sophos;i="5.69,347,1571673600"; d="scan'208";a="126720981" Received: from mail-mw2nam12lp2045.outbound.protection.outlook.com (HELO NAM12-MW2-obe.outbound.protection.outlook.com) ([104.47.66.45]) by ob1.hgst.iphmx.com with ESMTP; 23 Dec 2019 19:37:26 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fo2W6iUn1+jitP3/letuh7sRgZWWv1a/f3/t+yZ3jzAVQ8ajVbPYxsl0l0Jq/cj2WKAdMABjNl0pzbVb34fl75ffySArB0kkaxb7LJ5CZg5FmgKofgX8VX+Wl244S/MCKK9kFT2Q1GznluYfeKrotk1gXtFzV2jnc5lgP6hCj+uTvQBsgxRRsDNWHlMk/wfY9blhlCw5wA+uU+akzKswYbY4BuCR1NbAKpxC5cWTnNHGfTDdFC2pmGOvj2IV8XhMQrkeVt47pKQXZjZbk10qLM9D9F9/A2BKqo0sDIkWD8PRR/ZuyBr/j7Zmv9AQoJUyqAdJSg8t8xQ54awiNSrYKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q0Kf2ObIpnRC207tVWW8R+obCb5P9RPWBBMJiDlP2zo=; b=S6fF1UTfAUoYHKkk5jD33tNupLYALh1GPSDqhaIHha+IUutdP42XF97Lwee5QHsj5VXkYNMSwuZlmkEyvceJk46jPQw6D+a8jYMzZxH/A845XC70+zLwhYKshoRUIx1IWiDrHnyNVKSqTy0LW7AVGje69h7qkYg1xi3J7XL4BWYevulk+NFBi93TLITFkB4ntx0+lOZBfp/K8VUNQs1INiG9F+yUm3jDVduUvkC/4MG54GVDirFKdFwd9ximsoI2Qpqsq6czNaTNRsC2Notc73tK0VyVrbxQeNfKFKnlycQNWk7+pU6aOQwfPvupOFtVLk/IqmGa/uNXIFnUj+ZLRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q0Kf2ObIpnRC207tVWW8R+obCb5P9RPWBBMJiDlP2zo=; b=pSLOIPNQOJwI1iyV9YqDn2R7kxfgiAC5xPsSNEAmz3/+G5zxRSzbRcYwrbDbIaqdpEE40zFGPMP+HRj7w35z3dJ7w1tTNIPl6ZDhkcEiAm5LLochvfLREesXJxnvvhRFmOgMCewxDiKocBrbdCOZpYeWT8HyXsUKRJkc1bY6Bt0= Received: from MN2PR04MB6061.namprd04.prod.outlook.com (20.178.246.15) by MN2PR04MB6480.namprd04.prod.outlook.com (52.132.171.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2559.15; Mon, 23 Dec 2019 11:37:24 +0000 Received: from MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::a9a0:3ffa:371f:ad89]) by MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::a9a0:3ffa:371f:ad89%7]) with mapi id 15.20.2559.017; Mon, 23 Dec 2019 11:37:24 +0000 Received: from wdc.com (106.51.20.238) by MA1PR01CA0077.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00::17) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Mon, 23 Dec 2019 11:37:17 +0000 From: Anup Patel To: Palmer Dabbelt , Paul Walmsley , Albert Ou , Paolo Bonzini , Radim K CC: Alexander Graf , Atish Patra , Alistair Francis , Damien Le Moal , Christoph Hellwig , Anup Patel , "kvm@vger.kernel.org" , "kvm-riscv@lists.infradead.org" , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Anup Patel Subject: [PATCH v10 16/19] RISC-V: KVM: Implement ONE REG interface for FP registers Thread-Topic: [PATCH v10 16/19] RISC-V: KVM: Implement ONE REG interface for FP registers Thread-Index: AQHVuYVYzopkaGpri0i7CVEjWJRHvQ== Date: Mon, 23 Dec 2019 11:37:24 +0000 Message-ID: <20191223113443.68969-17-anup.patel@wdc.com> References: <20191223113443.68969-1-anup.patel@wdc.com> In-Reply-To: <20191223113443.68969-1-anup.patel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MA1PR01CA0077.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00::17) To MN2PR04MB6061.namprd04.prod.outlook.com (2603:10b6:208:d8::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Anup.Patel@wdc.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [106.51.20.238] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: d247d0ac-cedc-4418-c9f5-08d7879c7a9d x-ms-traffictypediagnostic: MN2PR04MB6480: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:854; x-forefront-prvs: 0260457E99 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(4636009)(366004)(396003)(136003)(39860400002)(346002)(376002)(199004)(189003)(36756003)(2616005)(956004)(478600001)(44832011)(2906002)(55016002)(7416002)(52116002)(7696005)(66446008)(66556008)(64756008)(66476007)(4326008)(6666004)(1006002)(66946007)(8936002)(26005)(1076003)(54906003)(110136005)(186003)(8676002)(71200400001)(81166006)(81156014)(55236004)(86362001)(16526019)(8886007)(5660300002)(316002)(32040200004);DIR:OUT;SFP:1102;SCL:1;SRVR:MN2PR04MB6480;H:MN2PR04MB6061.namprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1ybLxc66kQIRPKUVAGPjpoDdRqzuEkEZldXma8uMuDkcIoilwqY9+Qw2xQQ6sYSb9kf6WUQ2zE9k+nWuxICDt7LzYIp7oUwNZBC9+jDRtGUHHaRQj/SuaHh3HKxxP4Tx5adLDKeaQBQ9PAQhxHm+Aihgzrr82QJnJSctZgkurwXVWO8FxpY35UxtfOEnd3bbOU0/A9/2eqpmkRY2EV54FKhcFvcacNEmF2+ErEd/Pw85bc4c6MmFnNs5vZnuGPyCpQFcVdsbMV7DFNAnE046EZA6T2zC9BT5eri1AX7mBPIypaCq85z/CURmXB4bH9zwWTxF01Th+5MmsZpFwgPcS9l1S5UVbVFnJ45P3Qh4BIQW7Stdt5sB9hxqBuUF3eT0RbxeLp6M8t33HBekevmlXRoXFfy2plsk4q5KagBj92HjJHZN5hUFZNkCJJdHGEOF0aRAGjivIRu1HkvgJRVGG1SS0YMeCZxaBPqElq8Tl2OCQMzEHlbjvPDsZSdHtwym Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: d247d0ac-cedc-4418-c9f5-08d7879c7a9d X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Dec 2019 11:37:24.2041 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9QH3ni8lo1KPTmOFA9UsLoaj3fLMQsfN5SBIYEt6u+DPWHmXBmZzDAT/3DyAaNVSfARvv489t2FVgOyoeg4Opg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB6480 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Atish Patra Add a KVM_GET_ONE_REG/KVM_SET_ONE_REG ioctl interface for floating point registers such as F0-F31 and FCSR. This support is added for both 'F' and 'D' extensions. Signed-off-by: Atish Patra Signed-off-by: Anup Patel Acked-by: Paolo Bonzini Reviewed-by: Paolo Bonzini Reviewed-by: Alexander Graf --- arch/riscv/include/uapi/asm/kvm.h | 10 +++ arch/riscv/kvm/vcpu.c | 104 ++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) diff --git a/arch/riscv/include/uapi/asm/kvm.h b/arch/riscv/include/uapi/as= m/kvm.h index 8f15eee35a1e..f4274c2e5cdc 100644 --- a/arch/riscv/include/uapi/asm/kvm.h +++ b/arch/riscv/include/uapi/asm/kvm.h @@ -112,6 +112,16 @@ struct kvm_riscv_timer { #define KVM_REG_RISCV_TIMER_REG(name) \ (offsetof(struct kvm_riscv_timer, name) / sizeof(u64)) =20 +/* F extension registers are mapped as type 5 */ +#define KVM_REG_RISCV_FP_F (0x05 << KVM_REG_RISCV_TYPE_SHIFT) +#define KVM_REG_RISCV_FP_F_REG(name) \ + (offsetof(struct __riscv_f_ext_state, name) / sizeof(u32)) + +/* D extension registers are mapped as type 6 */ +#define KVM_REG_RISCV_FP_D (0x06 << KVM_REG_RISCV_TYPE_SHIFT) +#define KVM_REG_RISCV_FP_D_REG(name) \ + (offsetof(struct __riscv_d_ext_state, name) / sizeof(u64)) + #endif =20 #endif /* __LINUX_KVM_RISCV_H */ diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c index a3f1a9d59afc..a2547517680e 100644 --- a/arch/riscv/kvm/vcpu.c +++ b/arch/riscv/kvm/vcpu.c @@ -433,6 +433,98 @@ static int kvm_riscv_vcpu_set_reg_csr(struct kvm_vcpu = *vcpu, return 0; } =20 +static int kvm_riscv_vcpu_get_reg_fp(struct kvm_vcpu *vcpu, + const struct kvm_one_reg *reg, + unsigned long rtype) +{ + struct kvm_cpu_context *cntx =3D &vcpu->arch.guest_context; + unsigned long isa =3D vcpu->arch.isa; + unsigned long __user *uaddr =3D + (unsigned long __user *)(unsigned long)reg->addr; + unsigned long reg_num =3D reg->id & ~(KVM_REG_ARCH_MASK | + KVM_REG_SIZE_MASK | + rtype); + void *reg_val; + + if ((rtype =3D=3D KVM_REG_RISCV_FP_F) && + riscv_isa_extension_available(&isa, f)) { + if (KVM_REG_SIZE(reg->id) !=3D sizeof(u32)) + return -EINVAL; + if (reg_num =3D=3D KVM_REG_RISCV_FP_F_REG(fcsr)) + reg_val =3D &cntx->fp.f.fcsr; + else if ((KVM_REG_RISCV_FP_F_REG(f[0]) <=3D reg_num) && + reg_num <=3D KVM_REG_RISCV_FP_F_REG(f[31])) + reg_val =3D &cntx->fp.f.f[reg_num]; + else + return -EINVAL; + } else if ((rtype =3D=3D KVM_REG_RISCV_FP_D) && + riscv_isa_extension_available(&isa, d)) { + if (reg_num =3D=3D KVM_REG_RISCV_FP_D_REG(fcsr)) { + if (KVM_REG_SIZE(reg->id) !=3D sizeof(u32)) + return -EINVAL; + reg_val =3D &cntx->fp.d.fcsr; + } else if ((KVM_REG_RISCV_FP_D_REG(f[0]) <=3D reg_num) && + reg_num <=3D KVM_REG_RISCV_FP_D_REG(f[31])) { + if (KVM_REG_SIZE(reg->id) !=3D sizeof(u64)) + return -EINVAL; + reg_val =3D &cntx->fp.d.f[reg_num]; + } else + return -EINVAL; + } else + return -EINVAL; + + if (copy_to_user(uaddr, reg_val, KVM_REG_SIZE(reg->id))) + return -EFAULT; + + return 0; +} + +static int kvm_riscv_vcpu_set_reg_fp(struct kvm_vcpu *vcpu, + const struct kvm_one_reg *reg, + unsigned long rtype) +{ + struct kvm_cpu_context *cntx =3D &vcpu->arch.guest_context; + unsigned long isa =3D vcpu->arch.isa; + unsigned long __user *uaddr =3D + (unsigned long __user *)(unsigned long)reg->addr; + unsigned long reg_num =3D reg->id & ~(KVM_REG_ARCH_MASK | + KVM_REG_SIZE_MASK | + rtype); + void *reg_val; + + if ((rtype =3D=3D KVM_REG_RISCV_FP_F) && + riscv_isa_extension_available(&isa, f)) { + if (KVM_REG_SIZE(reg->id) !=3D sizeof(u32)) + return -EINVAL; + if (reg_num =3D=3D KVM_REG_RISCV_FP_F_REG(fcsr)) + reg_val =3D &cntx->fp.f.fcsr; + else if ((KVM_REG_RISCV_FP_F_REG(f[0]) <=3D reg_num) && + reg_num <=3D KVM_REG_RISCV_FP_F_REG(f[31])) + reg_val =3D &cntx->fp.f.f[reg_num]; + else + return -EINVAL; + } else if ((rtype =3D=3D KVM_REG_RISCV_FP_D) && + riscv_isa_extension_available(&isa, d)) { + if (reg_num =3D=3D KVM_REG_RISCV_FP_D_REG(fcsr)) { + if (KVM_REG_SIZE(reg->id) !=3D sizeof(u32)) + return -EINVAL; + reg_val =3D &cntx->fp.d.fcsr; + } else if ((KVM_REG_RISCV_FP_D_REG(f[0]) <=3D reg_num) && + reg_num <=3D KVM_REG_RISCV_FP_D_REG(f[31])) { + if (KVM_REG_SIZE(reg->id) !=3D sizeof(u64)) + return -EINVAL; + reg_val =3D &cntx->fp.d.f[reg_num]; + } else + return -EINVAL; + } else + return -EINVAL; + + if (copy_from_user(reg_val, uaddr, KVM_REG_SIZE(reg->id))) + return -EFAULT; + + return 0; +} + static int kvm_riscv_vcpu_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { @@ -444,6 +536,12 @@ static int kvm_riscv_vcpu_set_reg(struct kvm_vcpu *vcp= u, return kvm_riscv_vcpu_set_reg_csr(vcpu, reg); else if ((reg->id & KVM_REG_RISCV_TYPE_MASK) =3D=3D KVM_REG_RISCV_TIMER) return kvm_riscv_vcpu_set_reg_timer(vcpu, reg); + else if ((reg->id & KVM_REG_RISCV_TYPE_MASK) =3D=3D KVM_REG_RISCV_FP_F) + return kvm_riscv_vcpu_set_reg_fp(vcpu, reg, + KVM_REG_RISCV_FP_F); + else if ((reg->id & KVM_REG_RISCV_TYPE_MASK) =3D=3D KVM_REG_RISCV_FP_D) + return kvm_riscv_vcpu_set_reg_fp(vcpu, reg, + KVM_REG_RISCV_FP_D); =20 return -EINVAL; } @@ -459,6 +557,12 @@ static int kvm_riscv_vcpu_get_reg(struct kvm_vcpu *vcp= u, return kvm_riscv_vcpu_get_reg_csr(vcpu, reg); else if ((reg->id & KVM_REG_RISCV_TYPE_MASK) =3D=3D KVM_REG_RISCV_TIMER) return kvm_riscv_vcpu_get_reg_timer(vcpu, reg); + else if ((reg->id & KVM_REG_RISCV_TYPE_MASK) =3D=3D KVM_REG_RISCV_FP_F) + return kvm_riscv_vcpu_get_reg_fp(vcpu, reg, + KVM_REG_RISCV_FP_F); + else if ((reg->id & KVM_REG_RISCV_TYPE_MASK) =3D=3D KVM_REG_RISCV_FP_D) + return kvm_riscv_vcpu_get_reg_fp(vcpu, reg, + KVM_REG_RISCV_FP_D); =20 return -EINVAL; } --=20 2.17.1