Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2398433ybh; Mon, 5 Aug 2019 00:13:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGrlmGStbVwJed7QlF1pAhcYRFP0BfygNaq1UBpzRg0Rf5hEL7AiZyj2wJN4aMec7r5eJK X-Received: by 2002:a17:902:4683:: with SMTP id p3mr132070700pld.31.1564989220344; Mon, 05 Aug 2019 00:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564989220; cv=none; d=google.com; s=arc-20160816; b=dTzinF/tOuhjKZASPAC2AH8KMQyI5iK0tX/bHcqg5lq3Q76MOogDW+YfbF2UkPhznb IUld9M06cxc4u3u0SV3VVVw3hVPQPl2CDAE1F24L6aHyh9iAXzTJx1TUOOuZYYEa4o2j IY6MkTuAGUchWLCruRdiKif/idD1mTjwvBjqCCrHSF8JJDSrQLr7h6mPL925gg66DtLL 3LFBXMW8h3Apiqh7TEavAvkw+erDP4omnK8jCsfQGU/5wxebWJTmVtkevxa4Zx5KxuKK 70JDbP4S2jSuZDufGZEV8z8WE7IxOltkMSU8cNetdO2T6W2oN0Mlrl9z7EL7LdQMlalc Y8Aw== 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=RbR9NwuvYbRC7roIhZ22yTnxvDklbtSaOkHnRd59pwA=; b=QwzgyrmZdIZkj7a/GZzOn+mgTLfSlRI/pY3UpzUzfGy9DTihwBtISDR4y/nVXvfir3 3LoTuxDEYsnzLK1BYgkE3VqhXEv1NO80HbGjYUIcZ6Tad7vZ0C4Tm5+JSeaSzL5Hyhju E+NCy4A36f9FoLtW/D8jrERVx8jC0ueRBD85gXA21mWAabbIgW08QxCYyAZebF9VW38t 0GT3pkPA6t0e1kz/HJ0+QDWP/mgETPN6tRrHfo40ewPlQ+Yau+htxNvr/5JP7JpKMcyb a5/Gb1Wb2q8GiIW2GBPtfxHlwXvGyZz2SJQjOomtuRzvbLhyZwk9Yg4tzUopLL6xNwYE 1WeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=fkloISZ+; 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 1si38823411plz.129.2019.08.05.00.13.24; Mon, 05 Aug 2019 00:13:40 -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=fkloISZ+; 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 S1727529AbfHEHMS (ORCPT + 99 others); Mon, 5 Aug 2019 03:12:18 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:34700 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726394AbfHEHMR (ORCPT ); Mon, 5 Aug 2019 03:12:17 -0400 Received: by mail-wm1-f65.google.com with SMTP id w9so5974736wmd.1 for ; Mon, 05 Aug 2019 00:12:16 -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=RbR9NwuvYbRC7roIhZ22yTnxvDklbtSaOkHnRd59pwA=; b=fkloISZ+Sy0hPMWNbFKzEh/r7BhtZqP4GA9lIr/AitoV+f7H+Fa7NB134TAcewDaga io6DQRB5IDIoD4C8l3IdKPdVydc3xBbfQTQKNK4pvGQOtEOV7NPS9kLb/ycbLIYQ4ixj S+BY0o8SGrF7PrawJsDGnZJA1XjoraSGN7GwBv63aKNlTAXgwRHD16mxFdujm2jDq5nE pnxdBIoxB7WYlD0IEyZQsOy0CB7mD1+BhBc4wxNsSVMAYDlxkDIhcx21gpviKA6DUGzT DGcGMFNArITF0bDZIC0/1AZ5lXMhi51gYZ8uNmpGsK/l2c/0V6EZBuSAK5qpuKlGM5Sl 4C7w== 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=RbR9NwuvYbRC7roIhZ22yTnxvDklbtSaOkHnRd59pwA=; b=aXNER62rzEDLLUgt2vJc7hPL5cwAODYlMjixlQCKft/+l5cWEUZ8bRMU24v/agQWNX p/8fIWhmVb2f0UjNEg4FFX4sOq++PvOHQXXOpUf+rEQ4/NVOh6+R4WiU1iaYvG27j8s2 3Gn6H1lS4hj6cBDQDrFbAlEGAMuxf7IWLQfaiwHNondzhPo/uXoqN0wL/DPyx2c/4nL0 S7/r0pjAK3qko8wNDWBZhtS5YoG4NpEKZprM1bkVCNWLzBA18TsZKNz/nRHZuNcJq1qC LDlB0iz9zZQeg/8If2MiOkwDQpUFpGG7f0l4eZidB86gEYo6go/jNfg+QB1QoTdOvB2L dOEg== X-Gm-Message-State: APjAAAWu+d76pdiD7IUWnnYHHCbMQe6wuznY9pCAvYrDit+zD4Ky8Itm lklRbHU96D8QRw0F9CBfzePFgjQV5N9Lmr+LsBK+LA== X-Received: by 2002:a1c:cfc5:: with SMTP id f188mr15608477wmg.24.1564989135533; Mon, 05 Aug 2019 00:12:15 -0700 (PDT) MIME-Version: 1.0 References: <20190802074620.115029-1-anup.patel@wdc.com> <20190802074620.115029-11-anup.patel@wdc.com> <5b966171-4d11-237d-5a43-dc881efb7d0a@redhat.com> In-Reply-To: <5b966171-4d11-237d-5a43-dc881efb7d0a@redhat.com> From: Anup Patel Date: Mon, 5 Aug 2019 12:42:03 +0530 Message-ID: Subject: Re: [RFC PATCH v2 10/19] RISC-V: KVM: Handle WFI exits for VCPU 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 Fri, Aug 2, 2019 at 2:33 PM Paolo Bonzini wrote: > > On 02/08/19 09:47, Anup Patel wrote: > > + if (!kvm_riscv_vcpu_has_interrupt(vcpu)) { > > This can be kvm_arch_vcpu_runnable instead, since kvm_vcpu_block will > check it anyway before sleeping. I think we can skip this check here because kvm_vcpu_block() is checking it anyway. Agree ?? Regards, Anup