Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1249182ybl; Fri, 23 Aug 2019 16:10:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqylfh3DLegJrZ7+6CpTMd7okw/yzVrdcvicyRRLoppq2Lj2x0zHBXvNhZPCkbbOdRm5CGVN X-Received: by 2002:aa7:9191:: with SMTP id x17mr8002809pfa.23.1566601814718; Fri, 23 Aug 2019 16:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566601814; cv=none; d=google.com; s=arc-20160816; b=EwiAKjKaywHgCvURjiJARzhs9Bt/qm3kbhg+F3O24oSpWBVyCJ/P87fWNHyXqTK5If eSpUEhSQijVkYkHj5fSk7W3t6uorIL+7LQ49goU4IV6dHRnQVfZlbivKYAqwkYQg0fLu E6MnqomrmxzrB2hQsY8Zf3dGtfIRxhYk7L9nc12A2++qIHmb29yAi423YLsjqXRF/8WP E+PNtZI71+oA009bIxSpncOWEnJ+6fyIltt8wOOIN9qMd6mg7/lVbhQnwwDf8AVKD7P0 XjDbjYNnHoGTxWO8K7f/Kc/dCj6qiLrSWoTjMtWyI2onGpM3Eoh0teFagAeo3dFxaSSN AFeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=RHYS8jGRkdr3gB9hs1d2WnBjre+WbM/f68EhPrZ6uEY=; b=j8A99O44KmAZ09x8rqtYY2A2LjPQuqeqhD8JjSu28lCnK3ngFaMIksbOG/e/0XvmGZ tAk+4WxkDJvaRvS+9y62Rcvfo8GRdVoV9Uuokv2NBeANFmh8k4bndRWW6OBtZrgrzlsJ DZ6rkRj1Z+gWAq+Bhga2CUCk/tw6OlxMKLvTY434muwvr7yjOdJvt9mFxWqjuLkgy/Nr P1ON9PVk0WqJ27TjGLAgfgdPFLQyY7Kre+VqGXqcp8M0811OHTx2tuzXrns99+WIUL8l aY8cH32qKY/8rVxFjuFErYqprxc28Egtj6ZVPQDM04hN9AWAB3Dxb7e4z0CDttLoqTiN Cqng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=aGd0V+IF; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m6si3341518pjv.67.2019.08.23.16.09.59; Fri, 23 Aug 2019 16:10:14 -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=pass header.i=@amazon.com header.s=amazon201209 header.b=aGd0V+IF; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393087AbfHWLot (ORCPT + 99 others); Fri, 23 Aug 2019 07:44:49 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:61375 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392869AbfHWLos (ORCPT ); Fri, 23 Aug 2019 07:44:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1566560687; x=1598096687; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=RHYS8jGRkdr3gB9hs1d2WnBjre+WbM/f68EhPrZ6uEY=; b=aGd0V+IFmEhhOVD6XFz1K+hfKvUvwxfmSd6QCGoGaf4e+wUT9E9EiYZb He8XU0JP3cP7cfdRu42bUEwkdkYCAEbd3Y1S/ddvbmxrUvtsx4povt5K/ JS3B7XnAFsCGx/Oqou/Z7KIkiQsOIT+mK3N0NBI0Yu70rg8mSBHGu/4p/ k=; X-IronPort-AV: E=Sophos;i="5.64,421,1559520000"; d="scan'208";a="823019313" Received: from sea3-co-svc-lb6-vlan2.sea.amazon.com (HELO email-inbound-relay-2a-6e2fc477.us-west-2.amazon.com) ([10.47.22.34]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 23 Aug 2019 11:44:45 +0000 Received: from EX13MTAUWC001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2a-6e2fc477.us-west-2.amazon.com (Postfix) with ESMTPS id 901A6A24D2; Fri, 23 Aug 2019 11:44:44 +0000 (UTC) Received: from EX13D20UWC002.ant.amazon.com (10.43.162.163) by EX13MTAUWC001.ant.amazon.com (10.43.162.135) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 23 Aug 2019 11:44:44 +0000 Received: from EX13D20UWC001.ant.amazon.com (10.43.162.244) by EX13D20UWC002.ant.amazon.com (10.43.162.163) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 23 Aug 2019 11:44:43 +0000 Received: from EX13D20UWC001.ant.amazon.com ([10.43.162.244]) by EX13D20UWC001.ant.amazon.com ([10.43.162.244]) with mapi id 15.00.1367.000; Fri, 23 Aug 2019 11:44:43 +0000 From: "Graf (AWS), Alexander" To: Anup Patel CC: Anup Patel , Palmer Dabbelt , "Paul Walmsley" , Paolo Bonzini , Radim K , Daniel Lezcano , Thomas Gleixner , Atish Patra , Alistair Francis , Damien Le Moal , Christoph Hellwig , "kvm@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v5 00/20] KVM RISC-V Support Thread-Topic: [PATCH v5 00/20] KVM RISC-V Support Thread-Index: AQHVWYn+hiT/O4W/4EWKNvIhq6UCB6cIl+EAgAAFWns= Date: Fri, 23 Aug 2019 11:44:43 +0000 Message-ID: <757C929B-D26C-46D9-98E8-1191E3B86F3C@amazon.com> References: <20190822084131.114764-1-anup.patel@wdc.com> <8a2a9ea6-5636-e79a-b041-580159e703b2@amazon.com>, In-Reply-To: Accept-Language: en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Am 23.08.2019 um 13:26 schrieb Anup Patel : >=20 >> On Fri, Aug 23, 2019 at 1:39 PM Alexander Graf wrote: >>=20 >>> On 22.08.19 10:42, Anup Patel wrote: >>> This series adds initial KVM RISC-V support. Currently, we are able to = boot >>> RISC-V 64bit Linux Guests with multiple VCPUs. >>>=20 >>> Few key aspects of KVM RISC-V added by this series are: >>> 1. Minimal possible KVM world-switch which touches only GPRs and few CS= Rs. >>> 2. Full Guest/VM switch is done via vcpu_get/vcpu_put infrastructure. >>> 3. KVM ONE_REG interface for VCPU register access from user-space. >>> 4. PLIC emulation is done in user-space. In-kernel PLIC emulation, will >>> be added in future. >>> 5. Timer and IPI emuation is done in-kernel. >>> 6. MMU notifiers supported. >>> 7. FP lazy save/restore supported. >>> 8. SBI v0.1 emulation for KVM Guest available. >>>=20 >>> Here's a brief TODO list which we will work upon after this series: >>> 1. Handle trap from unpriv access in reading Guest instruction >>> 2. Handle trap from unpriv access in SBI v0.1 emulation >>> 3. Implement recursive stage2 page table programing >>> 4. SBI v0.2 emulation in-kernel >>> 5. SBI v0.2 hart hotplug emulation in-kernel >>> 6. In-kernel PLIC emulation >>> 7. ..... and more ..... >>=20 >> Please consider patches I did not comment on as >>=20 >> Reviewed-by: Alexander Graf >>=20 >> Overall, I'm quite happy with the code. It's a very clean implementation >> of a KVM target. >=20 > Thanks Alex. >=20 >>=20 >> The only major nit I have is the guest address space read: I don't think >> we should pull in code that we know allows user space to DOS the kernel. >> For that, we need to find an alternative. Either you implement a >> software page table walker and resolve VAs manually or you find a way to >> ensure that *any* exception taken during the read does not affect >> general code execution. >=20 > I will send v6 next week. I will try my best to implement unpriv trap > handling in v6 itself. Are you sure unpriv is the only exception that can hit there? What about NM= Is? Do you have #MCs yet (ECC errors)? Do you have something like ARM's #SE= rror which can asynchronously hit at any time because of external bus (PCI)= errors? Alex >=20 > Regards, > Anup >=20 >>=20 >>=20 >> Thanks, >>=20 >> Alex