Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4563124ybi; Tue, 30 Jul 2019 04:17:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkP68jyzNxiy6GyB2FV8UOE+CsaAPMdgM84+5EvtIHqI46LFB3st0YY6N+RPfQfaUkSU74 X-Received: by 2002:a63:b46:: with SMTP id a6mr99610546pgl.235.1564485474700; Tue, 30 Jul 2019 04:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564485474; cv=none; d=google.com; s=arc-20160816; b=t9TeNRveYgYGcjFUAxsksTJEAObgcIfIJ1WoOoAs2cUePzcj6Ci9x0v+ar7L05wZRI ogAunYBwQ0DeTILbzgj9QXv3e6G7Tk8mXkPXPMGzV72zXb4zKmx5yn2chFoRMULNOy8t gL7cVR1f7mbuC6ssnHw5mklZEkxSXIxsrBBFjHb4TZRSd0JFtbXoWJSIJgXpvPZKqt+w /EFvWo39tuJ1FoShStwroAdzuzL7qPsUpHgiNUPAa+MXEEYsBNUv4W2V4n+7YLp8y1kA MK2C5TC+M1S5SLPDQB5zoDd704eSU0jD1KMOrjeHtv9xzBDKRNGe1fPkGpClqwCb72+E C5mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject; bh=LfBe8BIZguRGaVcqxBIUd21ri7wgmIbA7EXh3G0N3Hw=; b=AkbmG64bp4dXPEK5e0WO4qe1UNlOW2T6kFAQ7UT1KEJbuREVZyOvOYcGa2oc4gsnjS QvUKv7YvAjFGsfUSrhKowEgZsRlc4qfbtkUZDYzPRDDWwCYXlm5ghcwy4JLeG9M4Ps0J s9HC4Dwe9B/cOWhmaVJB1oUwwSUWR4Z/Zu4sEOKrR6316flE/K2+m15iAL/n3U1nidXp 65lRseVaIhbektI+V3dy18Tx7gWS9JnbtrnTQo3fWUnJVuayqYhqzMsOG3/7MABFvzBE Sdd+Z4YNrDtTq4f5nOtB+C0jKWkw8YYPx+Nrr1dNcnt6O8I5NduvNcT9PJjSrqk1QLqL dGiw== ARC-Authentication-Results: i=1; mx.google.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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s23si26819353plq.81.2019.07.30.04.17.40; Tue, 30 Jul 2019 04:17:54 -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; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731281AbfG3JgA (ORCPT + 99 others); Tue, 30 Jul 2019 05:36:00 -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-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