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 909B5C433FF for ; Mon, 5 Aug 2019 11:07:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6DA8E20856 for ; Mon, 5 Aug 2019 11:07:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727739AbfHELHv (ORCPT ); Mon, 5 Aug 2019 07:07:51 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45351 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727158AbfHELHu (ORCPT ); Mon, 5 Aug 2019 07:07:50 -0400 Received: by mail-wr1-f68.google.com with SMTP id f9so5056687wre.12 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=jJ1+NiQWhBcDrQsFT0UE9eur4AZpjjTiz3iFU5/UfT1Ih19c092zGe2nOxgrOPLVbz RvsvnrDq2c5g49iB3JBLsieuVZi6mYMFYhmX0MjgSpmPSnuCu3XvjwjnNFTsKe+cFZJx B/N8ipx/u7YUJM+H5tJrNB78qSKVkINEic8Mx26PMiYUhnfobDA1uNxRfmp7aGQFEpAg gYvsLWBgAXa3iizicVklY2Ic4eutZnx2yileZSolQ3zr6nyjLOe7kyD5jVgkJQ/fKc33 wgB13CtpxDpHHAEmxsQS/0bOGbzBPs1jBZs4hM1wgScS0WicBojoJNUjPKznEKTD8ZT9 5ViA== X-Gm-Message-State: APjAAAVzXFA21+TPYiSzgoQf5jQsEOCgj6Sxh7gumAECpJjsBHk9NU+z c4DjkRQ92XAgKYvgCk5KFhUHuJ++REY= X-Google-Smtp-Source: APXvYqwY2TBupRh8lLMErANvtlHmxHCz+tcgLZffCnKnX9W2SmLjysi6ybgwKxpN5XbDXgTAKzNV8Q== 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: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@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