From patchwork Wed Dec 18 06:36:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 22622 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BDB4223FBE for ; Wed, 18 Dec 2013 06:36:24 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id j5sf239504qaq.5 for ; Tue, 17 Dec 2013 22:36:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ZpYkigxgmyJ7x8QSL6wAxTATNxoZM7grGxbJxxPgtvw=; b=b/AEGX5K58fBwXkCXDhBZzIvCFPKgdraCR/QohDfjFq1oIjdq8Ebq9muNAENsAyqma aLrfi/xmJf319kl+FBLEYksFq0284TKDOh8y4xIPPGVYg9NOJZ6qex3rn+/Qq0dwycpv hT00ZcMozhCxDp2EDaJ58/Hu5pqvSZ70ti4PjYyJiuYTmL4fF1ZIEmR6mUl0ZXdKmJXZ HzKCCPmRT/O+LipfDJczU3YfTGLqedh+URqx8I0M10igBhf4ZFeCFmTlgpLabZkqCWBV SdEkwei2HDyXkbIx4th7JRjc5rdbSoV+w8xFCYPKmLAmu+t1erUa/djokNJGj9wBnoA4 T7Dw== X-Gm-Message-State: ALoCoQm6sfSYzrgepC84ai4JrOULWrZV9HEfIU1rsN4KYIRPUL7Fw9SeRC3qriumY2QIGBHihdxg X-Received: by 10.236.36.39 with SMTP id v27mr9244710yha.5.1387348583845; Tue, 17 Dec 2013 22:36:23 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.12.46 with SMTP id v14ls2815459qeb.31.gmail; Tue, 17 Dec 2013 22:36:23 -0800 (PST) X-Received: by 10.220.184.70 with SMTP id cj6mr8072543vcb.23.1387348583766; Tue, 17 Dec 2013 22:36:23 -0800 (PST) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by mx.google.com with ESMTPS id xn9si5473901vcb.41.2013.12.17.22.36.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Dec 2013 22:36:23 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.44; Received: by mail-vb0-f44.google.com with SMTP id x8so4806323vbf.3 for ; Tue, 17 Dec 2013 22:36:23 -0800 (PST) X-Received: by 10.58.254.200 with SMTP id ak8mr12539975ved.12.1387348583699; Tue, 17 Dec 2013 22:36:23 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp219663ved; Tue, 17 Dec 2013 22:36:22 -0800 (PST) X-Received: by 10.66.232.129 with SMTP id to1mr7919077pac.29.1387348582044; Tue, 17 Dec 2013 22:36:22 -0800 (PST) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by mx.google.com with ESMTPS id tr4si13515397pab.5.2013.12.17.22.36.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Dec 2013 22:36:22 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.43 is neither permitted nor denied by best guess record for domain of christoffer.dall@linaro.org) client-ip=209.85.220.43; Received: by mail-pa0-f43.google.com with SMTP id bj1so5540623pad.30 for ; Tue, 17 Dec 2013 22:36:21 -0800 (PST) X-Received: by 10.66.14.41 with SMTP id m9mr32255424pac.123.1387348581467; Tue, 17 Dec 2013 22:36:21 -0800 (PST) Received: from localhost.localdomain (c-67-169-181-221.hsd1.ca.comcast.net. [67.169.181.221]) by mx.google.com with ESMTPSA id ef10sm52172647pac.1.2013.12.17.22.36.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Dec 2013 22:36:20 -0800 (PST) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, Christoffer Dall , Peter Maydell Subject: [RFC PATCH] KVM: arm/arm64: Clarify KVM_ARM_VCPU_INIT api Date: Tue, 17 Dec 2013 22:36:12 -0800 Message-Id: <1387348572-3636-1-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 1.8.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christoffer.dall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , There is nothing technically or semantically wrong with calling KVM_ARM_VCPU_INIT more than once, and even calling this on a VCPU after the VCPU has been executed. It just happens that user space will need a way to reset the VCPU or put the VCPU back in PSCI power-off mode after the VM has run, for example when driving a system reset from user space. Clarify that it is perfectly fine to use this API for that purpose. Cc: Peter Maydell Signed-off-by: Christoffer Dall --- Documentation/virtual/kvm/api.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index aad3244..d813a61 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -2341,6 +2341,11 @@ return ENOEXEC for that vcpu. Note that because some registers reflect machine topology, all vcpus should be created before this ioctl is invoked. +Calling this a second time on a VCPU will reset the cpu registers to +their initial values and can be used with the feature bits to change the +CPU state, for example to put the CPU into power off mode from user +space. + Possible features: - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state. Depends on KVM_CAP_ARM_PSCI.