Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp149024ybp; Wed, 16 Oct 2019 15:29:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxG4tnYPA18O3hflrLcdsWfqmqkGUNmfCw+HR6AOcTmVcMck895cERQLE5ylPO0WhmsOrh/ X-Received: by 2002:a17:906:e8d:: with SMTP id p13mr638201ejf.236.1571264980361; Wed, 16 Oct 2019 15:29:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1571264980; cv=pass; d=google.com; s=arc-20160816; b=KDxwi3W5T5MWnK//AZ1WbVAgQStAd4mSx568AQpNfv9uU8oZtCjAo127zjklAX71LU WZ6nA4DTGObbpKFr1ZIjoRzUN0NJc45o7ETAzxQH3FGSnRMLpLFOs17cP474NS97BLTm RWM6n0KTZDyaOolPU0fsEmbOtp1krcPPQkqtn37tfrU7kZJ0xoJsCE4GcF5L1MVXOFrB 6QfNFX1Elr+p2aJWAOb/oqIGNzel30fThiQafiu/HRp6L4MFX5Ynly+hpS9h7T4LB7bt jtGFufrdpMr4WUHOKKfdDOZDSMLKhYd7H4+Br1QXiHaCUf9XTiH9Iqcg85a++whkYTij dyuQ== 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=xI8rW9lgwMgfuuA+l4LpZS8ywasprBg2yLcjwHr5178=; b=RNvgFLAfZoATOzvkDlJM5D6LVPQkwOk4gLp5IgQ/MqVXDUnMtcuURf6pwE50COAYC4 BrGlc8LWHZCeIrNw/K1bpvCIwkfOA/4GAZldzZ5qTFrfegpHcbiN4gN4dlIJT0V5yZLQ Z08RlcS0XXaSfP0V7hk51vHeEn9ryddRaVoiT6lRSeRyfOxzwvZHn6BmG22ozXlij9FP ms/MiuhuZefvr++tozhRsdcwc1B1sNZ7usp5tV4mDnn0O+hl6W/6ATbbcDiKFpvXgsH7 0myJ5N/I+zwzc6aGR/sKjH//Ga4hVlHZs4CSH5M+rkJ+jyv1Em2gfY4etyXqT4khH6hW aJOg== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=YGZYNDR8; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=l6we3dkA; 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 x29si229346eda.297.2019.10.16.15.29.17; Wed, 16 Oct 2019 15:29:40 -0700 (PDT) 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=YGZYNDR8; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=l6we3dkA; 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 S2405441AbfJPQLK (ORCPT + 99 others); Wed, 16 Oct 2019 12:11:10 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:14475 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392037AbfJPQLJ (ORCPT ); Wed, 16 Oct 2019 12:11:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1571242269; x=1602778269; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=HQF9P0w86Pfws7Y8lRbISGrDWdFNXqpNiHUzI0GxU5M=; b=YGZYNDR8D/yuDtySYLYDX9jyfm8bAHH7HU/5JVclPxvL33yj8doQBX4h nAEg+rYjlQlm1DlPnrIJMmmnrjZNTWlRzV2r8E5DXMX9x9Xtq7s6vOPK0 D9ae7ThVLkaJTlCHjDtBKOuIgBPSJ8mNiMwiMZ7g3I+ipbrsFfDzoNVzY 5pjqKKl4JrIsk6iAf3qYG4UePuoDpSYI2+AbYZ3b4vyUkfAqNuGn9v74g ESIRd7azJLaT3W5naQZG7bYUPAX01QncEnnmfwznMHPGuBQnarnuEujTX EOE0waDEZErBBKkt4gKJYrhxXt2Ix3c0w0aDxJlQxlfSMrG9oVd5fYbXV w==; IronPort-SDR: xJfXiNJL0gmbdzY84JKja55rhMmP1lDimz8oVteHhbCcUqSLmQ+K3Y/TA/VDvGlKGo9846udhl 8KDYcVjhMCJCl8JiA7HUOJHwBYJY3d9HvbDJ9WfeMOV30Fx6FB85ajDfRvtaeCIisWUSxNV2Dv 02NzGr+gOXqcXC/9QMRhH3LCZywBwV5PW8oU2wWFub9TomJhfVKAGrubmQPzEcd5vC8lq1Vm4o F5FqYcwZcs36DOmdkJfQrh5yP8v3KRndDrQ26FvTgj86m1mKI/n3vg75mf5xyHJI1n3AaYjk1b 2Qw= X-IronPort-AV: E=Sophos;i="5.67,304,1566835200"; d="scan'208";a="121448343" Received: from mail-dm3nam03lp2058.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([104.47.41.58]) by ob1.hgst.iphmx.com with ESMTP; 17 Oct 2019 00:11:08 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F0ASHp/JLrwkyvs8iSG88sgmaQ3ffZJ/8rhZKMIN7duZVaI2OZqzZtb/iWLe0QtPKLq2tWyTqK7f7Y7mAyTenXYsBiwgqj7UmdMgZK/MzdEjxe2K2l5JkdKmF68OIBFMWwBbT8my75fVWsTxLWuXxNpYLy1xiWEYbY+rq/LKKqwFi8xzIrCy31Pr0kLwSQm7aTTOAtnFLvMFYMsCzovMTAyjk2Ql/2K9Nh0AgbFisCwFCwKPkHR5rJ8tomTVOH2Q/ZyGFmEqcRaxrD5sCz25pGeScvpKNpCv41AGzsbf7hblTX3/3UBAQuADWGAgXkzM965fqjEN+R1R67gPBCXMdA== 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=xI8rW9lgwMgfuuA+l4LpZS8ywasprBg2yLcjwHr5178=; b=WiFi/cR/MAqREONLIxXRD+EZ2qoM54wEApaks0bR8atD58dSCW4qbYq4XG3HgV9KLLy8gea69AtvT9f8Rb6riAYN2RApjGVe1WbzVhvdw4IdA8MEsZPqBA7Q/YBlFCf5qe20J2/J3waWtePHqwXSF9ouHeCa+TepeON1QBg1lTKxGLIIBAF4rqu++kT1FgjwsJu0CNhUNS5DKBH5aAlsea0j/+QQmRQpLxN0Pl8i/j4Qs8xxL7Q5NPmMWytmy6O96d9oH5oYRj3bJTBiCIJLMx7mNgHUDm6YcPYheJMaatE+JdsPESGbFQ9wFUTS2YlBz6jesF3mKOEtCLtHs8LgLg== 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=xI8rW9lgwMgfuuA+l4LpZS8ywasprBg2yLcjwHr5178=; b=l6we3dkAg92BZtG8+MWmV2PTmhb3tN9xD5iOLITbiQAw8RSMUQpxJcHfyZO5Jq/jCjDPnA2DZhwvJhStf0ayKDSp+Wlpc3eREac8lcDuWfeCLdTRaGUhAxyl6jrJAtuOCqhLQwSG0bP8712L5FuECPVD69+XZaZqGP5Fyq6L/mQ= Received: from MN2PR04MB6061.namprd04.prod.outlook.com (20.178.246.15) by MN2PR04MB6397.namprd04.prod.outlook.com (52.132.170.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.17; Wed, 16 Oct 2019 16:11:06 +0000 Received: from MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::1454:87a:13b0:d3a]) by MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::1454:87a:13b0:d3a%7]) with mapi id 15.20.2347.023; Wed, 16 Oct 2019 16:11:06 +0000 From: Anup Patel To: Palmer Dabbelt , Paul Walmsley , Paolo Bonzini , Radim K CC: Daniel Lezcano , Thomas Gleixner , Alexander Graf , Atish Patra , Alistair Francis , Damien Le Moal , Christoph Hellwig , Anup Patel , "kvm@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Anup Patel Subject: [PATCH v9 15/22] RISC-V: KVM: Implement ONE REG interface for FP registers Thread-Topic: [PATCH v9 15/22] RISC-V: KVM: Implement ONE REG interface for FP registers Thread-Index: AQHVhDxQHlLxgir5ykyEtKqS8mr7Gg== Date: Wed, 16 Oct 2019 16:11:06 +0000 Message-ID: <20191016160649.24622-16-anup.patel@wdc.com> References: <20191016160649.24622-1-anup.patel@wdc.com> In-Reply-To: <20191016160649.24622-1-anup.patel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MAXPR01CA0098.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:5d::16) 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.27.162] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 88e5a04e-cafd-4a5a-d0c6-08d752537313 x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: MN2PR04MB6397: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:854; x-forefront-prvs: 0192E812EC x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(4636009)(366004)(346002)(396003)(376002)(39860400002)(136003)(199004)(189003)(71190400001)(71200400001)(66556008)(66476007)(66446008)(64756008)(66946007)(6116002)(3846002)(66066001)(76176011)(52116002)(256004)(99286004)(25786009)(7416002)(14454004)(4326008)(478600001)(7736002)(8676002)(305945005)(110136005)(476003)(54906003)(86362001)(2616005)(11346002)(446003)(316002)(102836004)(81166006)(486006)(55236004)(44832011)(5660300002)(50226002)(26005)(9456002)(186003)(8936002)(36756003)(1076003)(6436002)(6512007)(2906002)(6486002)(386003)(81156014)(6506007);DIR:OUT;SFP:1102;SCL:1;SRVR:MN2PR04MB6397;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: Y0kSxOnQNnUt8FG3whYnWHdcXvUjfJGD13Iwu/NgX+y7EU3mjzB1DymY9NyQmN84PKhOmAS4DLVNFCqqW0KUBXIM0iZ3BpMCB0H0oB4NL3gS1gPSYh8UuBqK19ObqgPJYIQjbd8UvuRlj+9bpBsIyTyFshjqbOrpi1S503ct9tktfBrn4AyV+5Ym+l9xhewX5mgGwa277ea2rXwxvr5hTIO28BYk0+B/IVQcswqGBXr/MwTCKrFv/sUcisW9di98YxTzhxUaLDADeQMcVQb5IZIyArY6/fC5WfcO5qNx40rSrdWOC1px3CREralta5t32vqdBv5Vc/l964x2WqULT0NS/LKr36nc+Fg/aB6UMAFc3CS2DE7JuokTphoiVLN9naOhw+qtc89pU3HdSNxhgqnYiEm/7Zwx77+dx7QrW0E= 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: 88e5a04e-cafd-4a5a-d0c6-08d752537313 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2019 16:11:06.4385 (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: bIJMuzjr60sFwBSrZAwJz/tiuUvMinzeg3hzug1L8w+RtcF+kPCNHsypRK3LQvKsgR4u7kZ4gAfCI2Sygtk0Aw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB6397 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 997b85f6fded..19811823ab70 100644 --- a/arch/riscv/include/uapi/asm/kvm.h +++ b/arch/riscv/include/uapi/asm/kvm.h @@ -96,6 +96,16 @@ struct kvm_riscv_csr { #define KVM_REG_RISCV_CSR_REG(name) \ (offsetof(struct kvm_riscv_csr, name) / sizeof(unsigned long)) =20 +/* F extension registers are mapped as type4 */ +#define KVM_REG_RISCV_FP_F (0x04 << 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 5 */ +#define KVM_REG_RISCV_FP_D (0x05 << 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 7ed556979b89..092b209644de 100644 --- a/arch/riscv/kvm/vcpu.c +++ b/arch/riscv/kvm/vcpu.c @@ -430,6 +430,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) { @@ -439,6 +531,12 @@ static int kvm_riscv_vcpu_set_reg(struct kvm_vcpu *vcp= u, return kvm_riscv_vcpu_set_reg_core(vcpu, reg); else if ((reg->id & KVM_REG_RISCV_TYPE_MASK) =3D=3D KVM_REG_RISCV_CSR) return kvm_riscv_vcpu_set_reg_csr(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; } @@ -452,6 +550,12 @@ static int kvm_riscv_vcpu_get_reg(struct kvm_vcpu *vcp= u, return kvm_riscv_vcpu_get_reg_core(vcpu, reg); else if ((reg->id & KVM_REG_RISCV_TYPE_MASK) =3D=3D KVM_REG_RISCV_CSR) return kvm_riscv_vcpu_get_reg_csr(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