Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp43281pxb; Mon, 8 Feb 2021 14:39:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwo//6xdyP+0JjhfRmhOq4QlmjypeB0OQbeEDuJruRg3pMTTwk2FqlBMVGjrd1IdFn1/Fk1 X-Received: by 2002:a17:906:29d6:: with SMTP id y22mr9122176eje.306.1612823981882; Mon, 08 Feb 2021 14:39:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612823981; cv=none; d=google.com; s=arc-20160816; b=zMouZvKkLrOz9OUzxQZxiKk+jjhCkg6V5m7t3jmrR6bfgp9649sK8jTm8E20cSXiDN RI3qsLFruW9HkU5oyZQUSQ6atEw/6OEIf0Dln8+ETXGSsNq76qlY4U9BlYwoZz0bUFWY UBWjyfFDb1cUtqFzPiYEOlD/+kQBWVz5KJ9fpkQESls42v97Brz1nMa7k/c2QWxoJvR1 XmACIsn9CJvq6U2GH3ThgNUkTHu7QFLpoPP/kJfoiHb2zwZC3shKWftWTPePc+T/pDcW ej9gXNC8NjaepfRd3aZCkt7FAU9qaOTq0NFTQEppk+lbWzgDeVJ0TdiXZbSgCR/qHKZv OdaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=vYWSIfpObxuI5Bp2XnbTAST1/PUgHRB0Z65hffFhXFs=; b=xRRH6E8Ew4/e5lgPoAdo9nz+ol3IPpH7izwNxg3b2SoiITbdLeEyLVOGHRAo4H924G CSSnpKFD4+HQb46fuPk6NFAYwuwkTvDXHpB8870WBe4loQS+fznkhak0P8UE3M0trblC IuCAEGRnPLCCFKDLDhUTt5FZXODCyn15EVO3l3+C1NlPuLBRTSyC+aa3tF5oISddodDu zTHYgg74ZNBMYWUf2iuJp9vE/oMKYoRSa0ctmbOiSSqMKzCGX+drlh9JQvOB6fvB/35y sEwU2eLoytsGwtjhTcQDuyHcAL8Xmk1DH9qR42BrYFVxg+rHTZmzIA3Ai+/fWb+xzZpA nhCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ak17si13962694ejc.215.2021.02.08.14.39.13; Mon, 08 Feb 2021 14:39:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231694AbhBHKQt (ORCPT + 99 others); Mon, 8 Feb 2021 05:16:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:59606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230510AbhBHKFA (ORCPT ); Mon, 8 Feb 2021 05:05:00 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AA3C564E45; Mon, 8 Feb 2021 10:04:18 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1l93J4-00Ck14-2n; Mon, 08 Feb 2021 09:58:10 +0000 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Cc: Catalin Marinas , Will Deacon , Mark Rutland , David Brazdil , Alexandru Elisei , Ard Biesheuvel , Jing Zhang , Ajay Patil , Prasad Sodagudi , Srinivas Ramana , Hector Martin , James Morse , Julien Thierry , Suzuki K Poulose , kernel-team@android.com Subject: [PATCH v7 18/23] KVM: arm64: Document HVC_VHE_RESTART stub hypercall Date: Mon, 8 Feb 2021 09:57:27 +0000 Message-Id: <20210208095732.3267263-19-maz@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210208095732.3267263-1-maz@kernel.org> References: <20210208095732.3267263-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, dbrazdil@google.com, alexandru.elisei@arm.com, ardb@kernel.org, jingzhangos@google.com, pajay@qti.qualcomm.com, psodagud@codeaurora.org, sramana@codeaurora.org, marcan@marcan.st, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For completeness, let's document the HVC_VHE_RESTART stub. Signed-off-by: Marc Zyngier Acked-by: David Brazdil --- Documentation/virt/kvm/arm/hyp-abi.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/virt/kvm/arm/hyp-abi.rst b/Documentation/virt/kvm/arm/hyp-abi.rst index 83cadd8186fa..4d43fbc25195 100644 --- a/Documentation/virt/kvm/arm/hyp-abi.rst +++ b/Documentation/virt/kvm/arm/hyp-abi.rst @@ -58,6 +58,15 @@ these functions (see arch/arm{,64}/include/asm/virt.h): into place (arm64 only), and jump to the restart address while at HYP/EL2. This hypercall is not expected to return to its caller. +* :: + + x0 = HVC_VHE_RESTART (arm64 only) + + Attempt to upgrade the kernel's exception level from EL1 to EL2 by enabling + the VHE mode. This is conditioned by the CPU supporting VHE, the EL2 MMU + being off, and VHE not being disabled by any other means (command line + option, for example). + Any other value of r0/x0 triggers a hypervisor-specific handling, which is not documented here. -- 2.29.2