Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4559511ybi; Tue, 30 Jul 2019 04:13:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzzpa+iJGf03WMZ3icvouiCD/U9Jl4C3Q9wEYHGBioeNuDkzyxhnEBF2iqwxUoUD2JgKutc X-Received: by 2002:a17:90a:eb08:: with SMTP id j8mr81448730pjz.72.1564485226404; Tue, 30 Jul 2019 04:13:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564485226; cv=none; d=google.com; s=arc-20160816; b=vjNA4KZt5v7pwynyqSGBKm1hAkBr9cTQnn8NdusA3KfZFY8VibKjOD5ciel5W7VK12 SV9Ndo5zVppG8syUfsW+4FewMcbv4j7tshSuECxUHtkDQv+GvpaSZJLhW3wyRuCevgCo vtJg2zpTx8vTLxH97jiEB8tpne91uFVLH3fmpsNEQrhAneRYdzGLYZQJaEY6371La4ZP ABbkZ52cReGL9rz8hKWVFnqSpejnp+ad7HpY+NkcHgpAdDGsq3Ia7nNLu0iY+l8ADy/N QbxfbfXxrv6BOnZw3atqgaMdwxlwdoZJwZwSbUceX61NDZ7UNylA9JEaMORWcJLLikEP sU8w== 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; bh=cUzWE80r0+/Jm/PmpREfM87NZ7CTSmB2MTbi4J4MfgQ=; b=f35SNqeK2Evci14Jsp5CIS+A5umnYtx88KAIr6+3aWeUYjuO2Z6b3LG6fJqjqL7uow bfumwJF3DuAukoAJ4jut2uGCtjx/00RHKvV+LLLN528vg7wNePCdKZ4vJ4z8R/QjCOys tNYYBOEY7PG56qfCV0gb0hoEP20jg22f2uJbOsxxtA071wRPmm+EwOvWs1Oj6uybdZPr z426/wyAwV6fH3YQuNqXTPs4FO5qoAUUZ2ai7eM02xiqqXilpd3YgnT+hvCtXVmZZ6kK OLgkrG0DkQF1SK59Poeu+/flJW/RkrhGSwsDVWax5sNaMUtcOnT5VCiEJGBFITDzqD0p PdMA== 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 i198si28732824pfe.228.2019.07.30.04.13.31; Tue, 30 Jul 2019 04:13:46 -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 S1730513AbfG3JZa (ORCPT + 99 others); Tue, 30 Jul 2019 05:25:30 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41500 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730193AbfG3JZ3 (ORCPT ); Tue, 30 Jul 2019 05:25:29 -0400 Received: by mail-wr1-f65.google.com with SMTP id c2so61735854wrm.8 for ; Tue, 30 Jul 2019 02:25:28 -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:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cUzWE80r0+/Jm/PmpREfM87NZ7CTSmB2MTbi4J4MfgQ=; b=PuXhGz1AOtpwKKLSZiu+2IMiBkH/W7zkmwsEzkN1CPFRhn5XQGQTd6njXGOR8ejBhK KBZ2hColLms/QzT74ihO/HkVRS+cSANziseIZZNk/2M3fcf+Di48ABnYmsvwWbajNued OVFG4VT7cX9s30ELaimT92Um1WF3AIxw4Xd5SjeIuExZQch51dhVXGcTTcpIbpOLzOwv LaTjRnUVrjSoCQ/OGizMfvaqUxf8liN6P2jedL0lY6+ipyoyoRIUL87zMpzAXheEWTVc LxwK7Y4LB9ptFTd4uIGfRiEt/w7k/M/x81E0VxTv5LEqck3vMIkgLeHqY/4s9XZX2c2h k0KQ== X-Gm-Message-State: APjAAAWS7eNv+jINUMf5HBqMcG0px7GtaExQ8/xpolMaQM0ItY30wlah aSUoYd5JBQOrGR4nDBJNBQIPHQvy/u0= X-Received: by 2002:adf:dd8e:: with SMTP id x14mr124398481wrl.344.1564478727541; Tue, 30 Jul 2019 02:25:27 -0700 (PDT) Received: from [192.168.10.150] ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id o7sm34682654wru.58.2019.07.30.02.25.26 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jul 2019 02:25:27 -0700 (PDT) Subject: Re: [RFC PATCH 03/16] RISC-V: Add initial skeletal KVM support 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-4-anup.patel@wdc.com> From: Paolo Bonzini Message-ID: Date: Tue, 30 Jul 2019 11:25:25 +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: <20190729115544.17895-4-anup.patel@wdc.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 29/07/19 13:56, Anup Patel wrote: > +void kvm_riscv_halt_guest(struct kvm *kvm) > +{ > + int i; > + struct kvm_vcpu *vcpu; > + > + kvm_for_each_vcpu(i, vcpu, kvm) > + vcpu->arch.pause = true; > + kvm_make_all_cpus_request(kvm, KVM_REQ_SLEEP); > +} > + > +void kvm_riscv_resume_guest(struct kvm *kvm) > +{ > + int i; > + struct kvm_vcpu *vcpu; > + > + kvm_for_each_vcpu(i, vcpu, kvm) { > + vcpu->arch.pause = false; > + swake_up_one(kvm_arch_vcpu_wq(vcpu)); > + } Are these unused? (Perhaps I'm just blind :)) Paolo