Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2623250ybh; Mon, 5 Aug 2019 04:08:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvGUO1gd7bQK8AtklpRneekjKtesWL+wt6/krMGxN1bYkCyCWIdBPLU1GifunwPEgigH6A X-Received: by 2002:a63:c1c:: with SMTP id b28mr103913060pgl.354.1565003319269; Mon, 05 Aug 2019 04:08:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565003319; cv=none; d=google.com; s=arc-20160816; b=dSorBPvbXfCIg5sA+FtHJB/tOqBJIdl0yW7vUD8yxDQhyxyTXfZBZr7ClZCmSirUpw Jxw0hqfPmbFirflaEFDowBTlC6eFTKeSjVwIGr0xDtn9DGXWDDjP8YUx19uLBrC5cz2r Xl1CPqdQxr/MebPl8qnVen9FojiOl1EHVlSC+V66QSbZOtOtRHwqE7wc+T/iwUafpbxU LGD5ulh+SXPbpC5SGWvUua3kE4zEZwzjaSdNiyvH7VyTAHgqf4zD8VJQ0clwA0JhURvE IKpzhErGu7xljFc/VHGj9CugdWbn0sI9A1p3ytu9myf8BqtJxWSNuI1WfloRggPcMm3P 9fMw== 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:openpgp:from:references:cc:to:subject; bh=jbcOsE9b8vLYsdBbVt92rvn4fVfUC3MaKB8N6ShV3KU=; b=bpjlUvxHJjO1yxG3GypxpY834mUyqHUBwRCQ/79PJ17qSH5Gaw3a2B1Eg9aRH2vBqv VPPUAIZYFMlka18zdfLlqneRaGFNsKIh5Wk3KyRmotWA3mBg1O6f/MgJMMzZ5gT7iS9U Zf4mN8Hr3z0G8wJK5AKxJfUNJzFZ79sMrdLUV9f/GkgVLLRWuzijWaVq+1ImazCkvZG/ PTpRgkGJltlgO0toYbc8cExZRgkmy5z9h4d5CuPqEtr6q3nS9m105O4etFEeGtScv5O3 3Bet4g1OmU8t+TCW4PxCXvJGSH2p5g+2sGwNnxzAzbT5wL7to4kXOPaF98765geIqojg ezTQ== 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 q13si41720094pls.369.2019.08.05.04.08.23; Mon, 05 Aug 2019 04:08:39 -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 S1728111AbfHELHv (ORCPT + 99 others); Mon, 5 Aug 2019 07:07:51 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38773 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727328AbfHELHu (ORCPT ); Mon, 5 Aug 2019 07:07:50 -0400 Received: by mail-wr1-f66.google.com with SMTP id g17so83971180wrr.5 for ; Mon, 05 Aug 2019 04:07:49 -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:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jbcOsE9b8vLYsdBbVt92rvn4fVfUC3MaKB8N6ShV3KU=; b=WRcUAOBFlybhKmHvXXM2CzVA/vAY5HvybKac+diMpX48EKw3Tj9JFYfaV//G7XUjcw 2bAx35KaDZ1hr7uNbdzWn1jSGllqe7o/zjVwmw89e1Rf9VDKU4eaXTLsreJjDTzyNSk2 0uVKY2OAMY/QfEiEdWyAhR0jm0rWret21mLPNkZjhgdr9B8LdBUfEjDMzXwmelvjKOrC xLP3RKy+Cove1P4u57u/IL5Ai7xq7xNPrQwtp2Ofzu9VeBbPpphyZ/TvPV3odgpdgFMW c4Hin+zBMk3R7u/OeTr/vgY9svDj0EUgnD6MxPcms+2LAom2PtJXCqWXVKral4j910K7 Wbnw== X-Gm-Message-State: APjAAAV770HHbYMdgYDTStyQ9SumJ8jptjbLOI/3r+ZPoNfQHUkDT/Gm hoASN9Qm28RoGlh6Db7cG0fOutVPGDI= X-Received: by 2002:adf:e541:: with SMTP id z1mr68507743wrm.48.1565003268629; Mon, 05 Aug 2019 04:07:48 -0700 (PDT) Received: from [192.168.178.40] ([151.21.165.91]) by smtp.gmail.com with ESMTPSA id a8sm70719207wma.31.2019.08.05.04.07.45 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 05 Aug 2019 04:07:48 -0700 (PDT) Subject: Re: [RFC PATCH v2 07/19] RISC-V: KVM: Implement KVM_GET_ONE_REG/KVM_SET_ONE_REG ioctls To: Anup Patel 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" References: <20190802074620.115029-1-anup.patel@wdc.com> <20190802074620.115029-8-anup.patel@wdc.com> <03f60f3a-bb50-9210-8352-da16cca322b9@redhat.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: Date: Mon, 5 Aug 2019 13:07:45 +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: 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 05/08/19 13:00, Anup Patel wrote: >>> I think we can do this at start of kvm_riscv_vcpu_flush_interrupts() as well. >> Did you mean at the end? (That is, after modifying >> vcpu->arch.guest_csr.vsip based on mask and val). With the above switch >> to percpu, the only write of CSR_VSIP and vsip_shadow should be in >> kvm_riscv_vcpu_flush_interrupts, which in turn is only called from >> kvm_vcpu_ioctl_run. > Yes, I meant at the end of kvm_riscv_vcpu_flush_interrupts() but I am > fine having separate kvm_riscv_update_vsip() function as well. At end is certainly fine for me. Paolo