Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4610996ybi; Tue, 30 Jul 2019 05:10:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtC7VEGGcsQcjMgImTQ02u3ULvD6S5EdG41kccVyqBXGQ0ZGGOPbseKR8OoNANLO7DRoeo X-Received: by 2002:a17:90a:c58e:: with SMTP id l14mr116015903pjt.104.1564488600862; Tue, 30 Jul 2019 05:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564488600; cv=none; d=google.com; s=arc-20160816; b=SYcUX6p/onJcG1LCPGRnurL/+6bn4oefnmOXLAH7ekL4pDp9aLVGGSxMdb5I4Ocazp pbwskiU5ZpTJGcWQF/XTydXnhGrgX+aNXzM2ohfIue7Z2GFIS22MEOZu/dRzOh8Zy2Ya +4Cm/DAOvydPICQnqu8QBYbagd6kdzdFoPiRPJ9UgTop5AUzIjXwsbB6Onk2KPt2eEvi NRi1JPrr79oFS/HBBNcuyzIBati7mBFZK6pWmwJVMVwF+AWJyzxDD2N+NkzAhtHL7JbJ Gi+Ndi7rkQ5C88Rtju2EOjl2HdX9zECVUK00PEcQRFratr3vaHumNDXAhrVFi2KOTbm7 BJ2g== 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=kAaSPn1SAnhMdouNiZFncd+kh2nGtT7o+fO0/xriDJM=; b=rC13tkEtnJkjSGUQfN2vWc1wnKalG/DOGrqzJipxarbmZo5rlCPSNMoXeqoXrpwgEz U1w40dfgWApTX3JijzbnmTTbuJaU1g/GiUCFpZiHEpcyBh/biEeWWHwcuBH1rHUOWx+o ycYMYRPHOUP8+OM13qwFTd6SmhFlG18ykXiVHmPAQo30a/rOx3ecqMQHGaRx1PImEnV1 1Qf/VAlDrVx6vgCtkU/UH7r+jZlVyX4KF2SzNUFZJ8RJOH85/Eb5rtISzyokOBFJVKXz NQSq5HyQPy+KU4ZRkt3lmnvKqu1TrP2eDCEX1n8xET86EyzuYncw6yL/4L85DvejIhjt SHig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=rtURJ5tj; 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 70si27149189plc.253.2019.07.30.05.09.46; Tue, 30 Jul 2019 05:10:00 -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=rtURJ5tj; 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 S1730018AbfG3LEI (ORCPT + 99 others); Tue, 30 Jul 2019 07:04:08 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55589 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726432AbfG3LEI (ORCPT ); Tue, 30 Jul 2019 07:04:08 -0400 Received: by mail-wm1-f68.google.com with SMTP id a15so56723737wmj.5 for ; Tue, 30 Jul 2019 04:04:07 -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=kAaSPn1SAnhMdouNiZFncd+kh2nGtT7o+fO0/xriDJM=; b=rtURJ5tjTGQezYchXptus1tZePK5IushptflcrP+I4zOEDOzawXa8lEWlpLTyABP05 WcvP42levCh9WFweBkXwjLV1O5gjaYCtAwo+LxmXtdams5440uB9Au+0IOqlvgvCQDox 0QOqGc7cZaSYRFIthov7WGk9xFRrfQ0yCDdK0rjX6zdeViKjkIRWrKXe9a22hTtEjF5w KGjWactDJtFahKEJAaqTgK/W8UYIa3JZ9O0X+MmpSKu+T2/MtMpStwlLkpTtXNhqkvZn rOUJC9iwH8FJ0XRoZsS1uEXPEwUTIwGTrq2+SSYaj9QV4vsq0oNdAjo25MqtWEk3+RUF 80Jg== 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=kAaSPn1SAnhMdouNiZFncd+kh2nGtT7o+fO0/xriDJM=; b=txfgu3ivM+2XWo2K5baRkW2lS5sAkOdHajDJVJ52oD5182tLUb35ngsd/BpdycmxV5 XaXUafRcjtLt5mpWPHED2NISgb0J4K0yI0Dx5vu2kkd0P9EETDJhxzu0K1MtzkMJN0RN PW4w76E2J57HRYltnwyty8lAmwEwaHH2NvDpLp50hgbEATSHdaN+L++d4SrX+FQ/m77G cmY6k9InmFzHMxEN31/+W+7FFm2wOWTrwe7XlVpadFvyarp4hUZq5ZNHjo+5AAfnNwJd qY032+qFt+8FEWv23MnkFdx4XY86a5XWb56JeXUxHybxt1wQYKxE63RhJCU6jXgpyf8l BZUw== X-Gm-Message-State: APjAAAXRw0V+Ka8e14sREMIDKefWfE96hZS5tLvIwkqYkm8qZ4CX4Ta0 v86lIhWaFqzmAtcrErileX9pub7LpW/nBwJ5gzU= X-Received: by 2002:a05:600c:254b:: with SMTP id e11mr97733084wma.171.1564484646738; Tue, 30 Jul 2019 04:04:06 -0700 (PDT) MIME-Version: 1.0 References: <20190729115544.17895-1-anup.patel@wdc.com> <20190729115544.17895-4-anup.patel@wdc.com> In-Reply-To: From: Anup Patel Date: Tue, 30 Jul 2019 16:33:55 +0530 Message-ID: Subject: Re: [RFC PATCH 03/16] RISC-V: Add initial skeletal KVM support 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 Tue, Jul 30, 2019 at 2:55 PM Paolo Bonzini wrote: > > 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 :)) Not used as of now. The intention was to have APIs for freezing/unfreezing Guest which can be used to do some work which is atomic from Guest perspective. I will remove it and add it back when required. Regards, Anup