Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2292131pxb; Mon, 18 Jan 2021 13:43:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwok/oy/c8O+tEPtUqMjHfB2e4LaCm3BR3cbJJ4nJxlB+/uFX4OOwO4546TZzQfa292cF3i X-Received: by 2002:a17:906:828a:: with SMTP id h10mr1062283ejx.274.1611006183263; Mon, 18 Jan 2021 13:43:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611006183; cv=none; d=google.com; s=arc-20160816; b=IXPS5aqnA8i1DNnMHp3dUkPg7oo7pAtQSlkOAuSAkhjlwWh7aQPvCJNvvAFBIwCvla 9zHxGnzbb34rpf1m6hVN4jRwHDIvxFhlwa2hAQ4bK0xHwl15ghpd8czoVXxFpaqAFzIR BwPit2J45meF35Zw62nQow+f22i7J/ahq5s00vwGyeHq6hjfEZPBqU9ZNnWmFBNYYGhw TGNHJTbIUMshV670E3i4kfq4oF8y/2FgYKWwEbQCxL70e4ebmNAzi/NASkwgALvenCxw k+8mmxiQBj5Sm8/gOz5EyyadWHijkBGcsnwr5Ng+PbTaAdQDb8vY8/hhZJ3luMRNCsdD p2Kw== 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=n5ytlP4YmSq6meksOysNt5EsIIqZP5hYg/i2JnDwpDo=; b=yLAoFEzCSi5pHIR4GUVF8/zs9OKND7c0srV3qopdlN0walWD7R0fgvxrdUTp4EkTHF IVlw56LmOhh4+fQHuZwYBLtOInwzm6j4ZSv49bIhXL69VZiSbgiAUAQkznw9YyBpaCRK WDezq5EMI2HptAv3fKCbNGWZeip0n/ibThpj9IzPv4O4kqJSRk+CRryt97zMR+X4TC7A Fm0n85dkBXM1YJaYDNIVZXp6sB0fVh3WKBXdbi3QukDcW9OQfGAc/D9H1M+184V2k3Vj KahSMLDrAeqwCqXrq5rAXGpSEF/X3ZvziVipJ8ABva5ZIw1AynEmXaXs1phinjHE1uG5 /Irw== 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 18si7582984eju.589.2021.01.18.13.42.38; Mon, 18 Jan 2021 13:43:03 -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 S2394839AbhARVi4 (ORCPT + 99 others); Mon, 18 Jan 2021 16:38:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:38648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389117AbhARKA5 (ORCPT ); Mon, 18 Jan 2021 05:00:57 -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 2F8DF224B0; Mon, 18 Jan 2021 10:00:16 +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 1l1R6z-008RhD-5S; Mon, 18 Jan 2021 09:46:13 +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 , James Morse , Julien Thierry , Suzuki K Poulose , kernel-team@android.com Subject: [PATCH v4 17/21] KVM: arm64: Document HVC_VHE_RESTART stub hypercall Date: Mon, 18 Jan 2021 09:45:29 +0000 Message-Id: <20210118094533.2874082-18-maz@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210118094533.2874082-1-maz@kernel.org> References: <20210118094533.2874082-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, 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 --- 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..1ba628baf11b 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 mean (comment line option, + for example). + Any other value of r0/x0 triggers a hypervisor-specific handling, which is not documented here. -- 2.29.2