Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4269664ybi; Mon, 29 Jul 2019 22:54:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwx0AiRc3fCUOHxxxMzy6V9EZJrF/JVa0jAQjgi4DOu+cMESfr+MLAusCaOSXoTSNkLRO1 X-Received: by 2002:a17:902:5c3:: with SMTP id f61mr105465534plf.98.1564466082018; Mon, 29 Jul 2019 22:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564466082; cv=none; d=google.com; s=arc-20160816; b=xxu9eAiXXatOdUyYH8aRv4wAfZQRpiz+MgNsjcYMrcjbOthP08DVSdVF/Ug2qturtj hiM77bgyBkDtta+xlr/0jMDRVglyX5aCN0dfu3fSaq3qd4Kzx9FElzvjPNtWezc6RywV TYhyRYDBBQ/I4zt1lHp+0yj3GmSabF0Vz+rOf6OEGW74A/h9FgL9Sx0IDSaU54bJNA+V FbWVxCYONKLAozkoVCl5hVrZZHbcfOqoOJuP/TGCEBdH+UYHri8KkWTxuL9i/BhOLUcx XgYdnvyHARLB0pnC/qo46WXFuhHUu9fSJ+2U2jucx5kcuCn7ImtkEm5oOupiJamGseC0 h/dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=47K6Qgo5QbrZVacaid1WG9JiEbdXdWfBJ5xwgMh492Q=; b=kxAMPKtPXQ9jeaHxdY+Elb9WHHrKEfEQc0TiscQwT3YY2815Q3E1ziWeqb47U1s4Q9 qA3iSjkI/d3jktee/h/mmiMMsGSNTc/5LkluAkF6KbKb/PWcXP41T4HR4W2Oy+6eXnF8 0h9kKCbkg01sHmBAxdS2bsq8EgYYZV4jBeERCS2uJ2Ww/BXWMif2F7JWLgaahF4iQ0Uu xRTlLj8p6Pu7+OZ1zssLs5xZLgIwTtobOioqCfand7nqSuFm7JVQEJ5k4aUTW4b3K1DM GcWs6TNF1JsRAygVSxKoDyHSGWE1tQRFtRbCT7eaihJUABAQCJvqomELoQ7abKABB15X /v2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=y2smEzLU; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o23si31237641pfp.131.2019.07.29.22.54.27; Mon, 29 Jul 2019 22:54:42 -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=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=y2smEzLU; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729256AbfG3F0r (ORCPT + 99 others); Tue, 30 Jul 2019 01:26:47 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:50560 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728297AbfG3F0r (ORCPT ); Tue, 30 Jul 2019 01:26:47 -0400 Received: by mail-wm1-f67.google.com with SMTP id v15so55815829wml.0 for ; Mon, 29 Jul 2019 22:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=47K6Qgo5QbrZVacaid1WG9JiEbdXdWfBJ5xwgMh492Q=; b=y2smEzLUhjWfJzia8TXdaSlDHyftOWzuH910O0PkAhV1T6cHiL6c6wLlk8CxkgNnU0 CNwqtZsdVpRwMEbeXWYMlwX4m1NfMzmFn6GBQHJ6CzUFo3C69Tr5JOS0xCvt8Ze3HNGC TckHauXiV7jipXhyCxjA3RPxJCMB+MZz3nGc67U/l8hmsOQAUtl9Tcq+7tjBDWIYOuF+ EYWGQLwgoYd32dqpj0MjQitNehY3lKlRWC3tQiCmiH5hSrEvYb/kHkhXoaBR7KbnB8Qv 4aImkrmH/Oa0pcwxkJpzyoxP0n/5MHwqp1lrlT0U46nf+oHTCHpu0YTYMS6ii62EJGZP fX9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=47K6Qgo5QbrZVacaid1WG9JiEbdXdWfBJ5xwgMh492Q=; b=KyNl2AZ8sxT6TnYDc8DjPXBlC41kcQzjFl89u24rDnAzRDT+YraEOD7owER+GkDzqa 54aZWszx+A/m0k5oa0u1nICQ1fQiEtzIrkJ9VuWxd69saab9Lo17hfao8bwJgY41wkjM VE5+F6UUIRK1VrawarSF2s0juzWaPa8EjFFytB3t4i/7OlTkCYAita8CZ3KfJUXSymu0 kwNAT5miB5v1wrqvcaQSG+xXaAfUtdIn9eNotS6t4EPe3vtpVph2BFedZEMPBZ+il5oj RiRQvf4qSBmoWfHDe1bUm6M0oLmhOeMeNNv4CRQ6clzBTnV6hUZCkSTlSb++8UUQ6XWi kg6g== X-Gm-Message-State: APjAAAVWCUEWju2ldbkS2OjjKwb1emyYgWLCnX4mcsAHCIOHfYsQpXUo ILwf2h0O9c/AgxE+20GIUl70YUl14UpesrAspZI= X-Received: by 2002:a1c:cfc5:: with SMTP id f188mr94263067wmg.24.1564464405064; Mon, 29 Jul 2019 22:26:45 -0700 (PDT) MIME-Version: 1.0 References: <20190729115544.17895-1-anup.patel@wdc.com> <72e9f668-f496-3fca-a1a8-a3c3122a3fd9@redhat.com> In-Reply-To: <72e9f668-f496-3fca-a1a8-a3c3122a3fd9@redhat.com> From: Anup Patel Date: Tue, 30 Jul 2019 10:56:33 +0530 Message-ID: Subject: Re: [RFC PATCH 00/16] KVM RISC-V Support To: Paolo Bonzini Cc: Anup Patel , Palmer Dabbelt , Paul Walmsley , 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" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 30, 2019 at 3:17 AM Paolo Bonzini wrote: > > On 29/07/19 13:56, 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. > > > > Few key aspects of KVM RISC-V added by this series are: > > 1. Minimal possible KVM world-switch which touches only GPRs and few CSRs. > > 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. > > > > More feature additions and enhancments will follow after this series and > > eventually KVM RISC-V will be at-par with other architectures. > > This looks clean and it shouldn't take long to have it merged. Please > sort out the MAINTAINERS additions. It would also be nice if > tools/testing/selftests/kvm/ worked with RISC-V from the beginning; > there have been recent ARM and s390 ports that you can take some > inspiration from. Thanks Paolo. We will certainly include a patch in v2 series for MAINTAINERS entry. We referred existing implementation of KVM ARM/ARM64, KVM powerpc and KVM mips when we started KVM RISC-V port. Here's a brief TODO list which we want to immediately work upon after this series: 1. Handle trap from unpriv access in SBI v0.1 emulation 2. In-kernel PLIC emulation 3. SBI v0.2 emulation in-kernel 4. SBI v0.2 hart hotplug emulation in-kernel 5. ..... and so on ..... We will include above TODO list in v2 series cover letter as well. Apart from above, we also have a more exhaustive TODO list based on study of other KVM ports which we want to discuss at upcoming LPC 2019. We were thinking to keep KVM RISC-V disabled by default (i.e. keep it experimental) until we have validated it on some FPGA or real HW. For now, users can explicitly enable it and play-around on QEMU emulation. I hope this is fine with most people ? Regards, Anup