Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp283790ybn; Tue, 24 Sep 2019 23:06:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDQ9JNUK8L3ZoSofRNMEX37Zy5+vVKbudIv8sDC9kOwiYJjjjvZaNMwWkNeeco5zpN1C+4 X-Received: by 2002:a7b:c0d9:: with SMTP id s25mr1109048wmh.74.1569391600495; Tue, 24 Sep 2019 23:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569391600; cv=none; d=google.com; s=arc-20160816; b=x9dSbYTzu4D65jArO3vNTpsVslY5/43edbUKSUsk6w6KCJf1pBDT/EDpfrkh67rpmu dRoIZeH9161tHpjrLQBZqm0uhz6USbCTuTLD82/uBeFw1rpWxH7B6hdiIiTbAaU592GI +MyXGSP54zjoqxQb6FuTZMVneNFU5KnsZPBd5FMrMQSISgfOKhPJRkkd67+n3yWyr2TQ 3YS6u0czh2Wg/MsWd+zFobbGH0uKrlAwMj6WljOTD/fvkypl2G/vKmjgmmPboJogJTfZ V0olVEeNj5Oy+FEJ0bzUYYYPgqzjc/lND7LAkUgXU8ePrK/IkMgJse4A/WyxlJTOZ1+W f8Nw== 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:from:references:cc:to:subject:dkim-signature; bh=0LuES5jNYjOJrVNcd7E+YqVsn5M9qjRy0UqX6zqVjPQ=; b=MgiNzVxyEsT1kSZ7PPHDFr/pZpACVyXscljFfSpWbaXgSp2TC6zXIzad/jC7CzbY5B gBUUdzX1vXx051l3pZhZDqdCzmLflNRVq9kmChXb2FsG53+VN3CitE0hDVOsJPtcXheQ wNc6jRBEsYSoyRCVH3/gG8tnGogFHXkeHIjdzakeQH/rxwZ8iGkfzMNdJZSsR3BlbV7n qPzV53KWcUiCgh0+3JTukFwLIe6WkZTlSfJTA8h0brSZBlvVwNluXebmsR3ahYq6YOE7 LsRAxC5JTzHCUDiM44zPiVxHbkonGtKfkE0qnXbp0w8mPMfUcpqfLHxv0w4BLXmPqTjR E5pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b="V/9z/I/c"; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ci21si2058398ejb.320.2019.09.24.23.06.17; Tue, 24 Sep 2019 23:06: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=@amazon.com header.s=amazon201209 header.b="V/9z/I/c"; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393347AbfIWGyX (ORCPT + 99 others); Mon, 23 Sep 2019 02:54:23 -0400 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]:24477 "EHLO smtp-fw-2101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388937AbfIWGyW (ORCPT ); Mon, 23 Sep 2019 02:54:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1569221661; x=1600757661; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=0LuES5jNYjOJrVNcd7E+YqVsn5M9qjRy0UqX6zqVjPQ=; b=V/9z/I/cSgh/62qUMNbPQCjnEiA+S777eXFJHh1cQU7ynE9KxVgOWYLv ZT97z6Bn+OsKn/96AIug55Fdvpx0l6W+gDFTdV+IHLCuqXMjD/Z7ciHmB nAOrGbZbJc8LG6TdL/WZI7IJ4+GzHuHGBKQ55RLgtre4ZGQOV2uIiIen+ Y=; X-IronPort-AV: E=Sophos;i="5.64,539,1559520000"; d="scan'208";a="752438067" Received: from iad6-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-1e-a70de69e.us-east-1.amazon.com) ([10.124.125.2]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP; 23 Sep 2019 06:54:21 +0000 Received: from EX13MTAUWC001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1e-a70de69e.us-east-1.amazon.com (Postfix) with ESMTPS id D5DF9A0745; Mon, 23 Sep 2019 06:54:16 +0000 (UTC) Received: from EX13D20UWC001.ant.amazon.com (10.43.162.244) by EX13MTAUWC001.ant.amazon.com (10.43.162.135) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 23 Sep 2019 06:54:15 +0000 Received: from 38f9d3867b82.ant.amazon.com (10.43.161.217) by EX13D20UWC001.ant.amazon.com (10.43.162.244) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 23 Sep 2019 06:53:58 +0000 Subject: Re: [PATCH v7 11/21] RISC-V: KVM: Handle WFI exits for VCPU To: Anup Patel , Palmer Dabbelt , "Paul Walmsley" , Paolo Bonzini , 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: <20190904161245.111924-1-anup.patel@wdc.com> <20190904161245.111924-13-anup.patel@wdc.com> From: Alexander Graf Message-ID: <3c149ec4-38df-9073-2880-b28148d3c059@amazon.com> Date: Mon, 23 Sep 2019 08:53:49 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20190904161245.111924-13-anup.patel@wdc.com> Content-Language: en-US X-Originating-IP: [10.43.161.217] X-ClientProxiedBy: EX13D28UWC002.ant.amazon.com (10.43.162.145) To EX13D20UWC001.ant.amazon.com (10.43.162.244) Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org CgpPbiAwNC4wOS4xOSAxODoxNSwgQW51cCBQYXRlbCB3cm90ZToKPiBXZSBnZXQgaWxsZWdhbCBp bnN0cnVjdGlvbiB0cmFwIHdoZW5ldmVyIEd1ZXN0L1ZNIGV4ZWN1dGVzIFdGSQo+IGluc3RydWN0 aW9uLgo+IAo+IFRoaXMgcGF0Y2ggaGFuZGxlcyBXRkkgdHJhcCBieSBibG9ja2luZyB0aGUgdHJh cHBlZCBWQ1BVIHVzaW5nCj4ga3ZtX3ZjcHVfYmxvY2soKSBBUEkuIFRoZSBibG9ja2VkIFZDUFUg d2lsbCBiZSBhdXRvbWF0aWNhbGx5Cj4gcmVzdW1lZCB3aGVuZXZlciBhIFZDUFUgaW50ZXJydXB0 IGlzIGluamVjdGVkIGZyb20gdXNlci1zcGFjZQo+IG9yIGZyb20gaW4ta2VybmVsIElSUUNISVAg ZW11bGF0aW9uLgo+IAo+IFNpZ25lZC1vZmYtYnk6IEFudXAgUGF0ZWwgPGFudXAucGF0ZWxAd2Rj LmNvbT4KPiBBY2tlZC1ieTogUGFvbG8gQm9uemluaSA8cGJvbnppbmlAcmVkaGF0LmNvbT4KPiBS ZXZpZXdlZC1ieTogUGFvbG8gQm9uemluaSA8cGJvbnppbmlAcmVkaGF0LmNvbT4KPiAtLS0KPiAg IGFyY2gvcmlzY3Yva3ZtL3ZjcHVfZXhpdC5jIHwgNzI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