From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20794C433FF for ; Tue, 30 Jul 2019 09:36:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1A3D2089E for ; Tue, 30 Jul 2019 09:36:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731556AbfG3JgB (ORCPT ); Tue, 30 Jul 2019 05:36:01 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:35159 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731536AbfG3Jf6 (ORCPT ); Tue, 30 Jul 2019 05:35:58 -0400 Received: by mail-wr1-f67.google.com with SMTP id y4so64993833wrm.2 for ; Tue, 30 Jul 2019 02:35:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LfBe8BIZguRGaVcqxBIUd21ri7wgmIbA7EXh3G0N3Hw=; b=n5PnWtJDftzfZKQfifvnWJZj9bq1w4qzITwF/RpkWVxxMhlDc4zTxJ5YrfQZ6iWlFD MZ+t1HlAgJztRmj8JWUgqTCKMVLQFcuQeVijvaKiHvaLh1KbJPn3Poh5qSOQ+lNQ1bqN uwWCnbXB/q1xRyxSx4nTCE9l7lRqFIL+aF60E47XVqVktSPn3LvrZicfiAYPR3R8+Lbk Cq59m5sZHMd/HIE77b7fitw1QwG+8KUp1yOlrD3guTy6KFnluhXWgZpltPzNY3e1gOXg kS63D4wy1dCSaSgwIywR98EUEiUf0qScpztJkKJlqsn11Q4RS7ZVFvywsgYfpeF1S9iQ zVDw== X-Gm-Message-State: APjAAAXLh8Cvr5+s2ltxWkklKLlnsZcy5wyY+DORSrCQPFNA/1qVXv9t lVAp73uiMYPtNmGkj6E/gLczSbWVGkc= X-Google-Smtp-Source: APXvYqwq3Hft9cpeFWfJQOdIrZK1BvEf6TQWeB6zhzE98jxFZtCFfEZfO6QPRJKZp8CB+tTOovDs0w== X-Received: by 2002:a5d:4f01:: with SMTP id c1mr45610035wru.43.1564479356485; Tue, 30 Jul 2019 02:35:56 -0700 (PDT) Received: from [192.168.10.150] ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id v204sm67712311wma.20.2019.07.30.02.35.55 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jul 2019 02:35:55 -0700 (PDT) Subject: Re: [RFC PATCH 06/16] RISC-V: KVM: Implement KVM_GET_ONE_REG/KVM_SET_ONE_REG ioctls From: Paolo Bonzini To: Anup Patel , Palmer Dabbelt , Paul Walmsley , Radim K Cc: Daniel Lezcano , Thomas Gleixner , 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" References: <20190729115544.17895-1-anup.patel@wdc.com> <20190729115544.17895-7-anup.patel@wdc.com> <3caa5b31-f5ed-98cd-2bdf-88d8cb837919@redhat.com> Message-ID: <536673cd-3b84-4e56-6042-de73a536653f@redhat.com> Date: Tue, 30 Jul 2019 11:35:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <3caa5b31-f5ed-98cd-2bdf-88d8cb837919@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/07/19 10:43, Paolo Bonzini wrote: > On 29/07/19 13:56, Anup Patel wrote: >> The PC register represents program counter whereas the MODE >> register represent VCPU privilege mode (i.e. S/U-mode). >> > Is there any reason to include this pseudo-register instead of allowing > SSTATUS access directly in this patch (and perhaps also SEPC)? Nevermind, I was confused - the current MODE is indeed not accessible as a "real" CSR in RISC-V. Still, I would prefer all the VS CSRs to be accessible via the get/set reg ioctls. Paolo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C047BC0650F for ; Tue, 30 Jul 2019 09:38:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91C8B21726 for ; Tue, 30 Jul 2019 09:38:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ib7C1hgA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91C8B21726 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:From:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rrew0PK3WTwZEs/r+dfOzuXStW+I3eTMo03DBRDjUVo=; b=ib7C1hgAilJV1J RtkanGgAai4TwRnU2af3LPuz03R+/wfTJh/Ur0erRIorfN7iFQsAWAmEW4Zqrpql9Kd2etXVT0J/x Ezs4b3l6ZsK7dGEww46LtLQ37tiR5MptqFt/vZ1JE5XObDdyEcewL7/O1bj+VuP+Uka/SqkBdCIew tJ/hKzh0ftkgfIlgXvjSqmkaefWflknfNTFTQcNhNrqMZCKdB07ceODduCyvD8LVrCuKJGcQF2wwm EMzusQUNNe+rHaLruOSsYBQKNEH3QDSGf9thQkcosQ3Tvak+Bk+NeObGQfF2eXeEBFG1UPkRwEKIb CUxtavptfWtdqy3+TFUw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hsOas-00014o-Ir; Tue, 30 Jul 2019 09:38:54 +0000 Received: from mail-wr1-f65.google.com ([209.85.221.65]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hsOY1-0007Fb-SZ for linux-riscv@lists.infradead.org; Tue, 30 Jul 2019 09:35:59 +0000 Received: by mail-wr1-f65.google.com with SMTP id n4so65060182wrs.3 for ; Tue, 30 Jul 2019 02:35:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LfBe8BIZguRGaVcqxBIUd21ri7wgmIbA7EXh3G0N3Hw=; b=PsFb/QDSoWBHcHFjp7/LHXBJQNcrqRJ5XjCz2Zs9jucU69jfz0pBbA7Sn7o+EzcAXu nSSy6CBsI7ubKSTcqDFkQIcOoUJJwkAjaWpsJhaKHn3uOU6aRcmZ8FdXaVTBV+Jm1W60 fHNXXJBmbZBqKvX2o9cjbkyirKJNC7DkJbyslhGmexhpsSqrnpVr+BZEJaSiftepWNL7 MaGuOk9oAvCOhSNRSuymqvMogwiuRYlzMZkejOw0Vff6LpbPhSCStnF8Dx96rnnkQfNy gFKwNh9SymJlv9T2eF/MgOaTtps0SpGsC+zANxin2ePGuh0lZBSNqD4B2Ea8yI5HKV1B wfXQ== X-Gm-Message-State: APjAAAUpDwloH2utPHw8T1aVrBRmwYxTV5l/ocGbQDxXTkCAkoc1gQmZ Si4F/pa31R5JrAuis1wengVoeg== X-Google-Smtp-Source: APXvYqwq3Hft9cpeFWfJQOdIrZK1BvEf6TQWeB6zhzE98jxFZtCFfEZfO6QPRJKZp8CB+tTOovDs0w== X-Received: by 2002:a5d:4f01:: with SMTP id c1mr45610035wru.43.1564479356485; Tue, 30 Jul 2019 02:35:56 -0700 (PDT) Received: from [192.168.10.150] ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id v204sm67712311wma.20.2019.07.30.02.35.55 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jul 2019 02:35:55 -0700 (PDT) Subject: Re: [RFC PATCH 06/16] RISC-V: KVM: Implement KVM_GET_ONE_REG/KVM_SET_ONE_REG ioctls From: Paolo Bonzini To: Anup Patel , Palmer Dabbelt , Paul Walmsley , Radim K References: <20190729115544.17895-1-anup.patel@wdc.com> <20190729115544.17895-7-anup.patel@wdc.com> <3caa5b31-f5ed-98cd-2bdf-88d8cb837919@redhat.com> Message-ID: <536673cd-3b84-4e56-6042-de73a536653f@redhat.com> Date: Tue, 30 Jul 2019 11:35:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <3caa5b31-f5ed-98cd-2bdf-88d8cb837919@redhat.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190730_023558_153588_EBB8C083 X-CRM114-Status: GOOD ( 10.57 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damien Le Moal , "kvm@vger.kernel.org" , Anup Patel , Daniel Lezcano , "linux-kernel@vger.kernel.org" , Christoph Hellwig , Atish Patra , Alistair Francis , Thomas Gleixner , "linux-riscv@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org On 30/07/19 10:43, Paolo Bonzini wrote: > On 29/07/19 13:56, Anup Patel wrote: >> The PC register represents program counter whereas the MODE >> register represent VCPU privilege mode (i.e. S/U-mode). >> > Is there any reason to include this pseudo-register instead of allowing > SSTATUS access directly in this patch (and perhaps also SEPC)? Nevermind, I was confused - the current MODE is indeed not accessible as a "real" CSR in RISC-V. Still, I would prefer all the VS CSRs to be accessible via the get/set reg ioctls. Paolo _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv