Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3271330pxb; Mon, 16 Nov 2020 10:00:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLZ8q5p3iI7cg7dEsXHp59ECMQXAMyoMyE84bYKAskKUb+kxJ+6BmdUQFYZ1kwraYEPrEA X-Received: by 2002:a50:ed14:: with SMTP id j20mr17170652eds.247.1605549641453; Mon, 16 Nov 2020 10:00:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605549641; cv=none; d=google.com; s=arc-20160816; b=lvAvd09PMWAd1PV4is4Ood7gf8q8VZ9qRtC+q4enPZlYUSrj5iki/NlVfyOLGWa0Qu 2Aug6uwH99jYryYDEQDL8SdCmkiZKbhu/RWVvBvnAXO7JTIK2axjJeDqqxlWiJNql8vu t0vVJDifx+2lOeMo2ZvlOZXOh5R1egpeDy6bCEIEBySE8mxvCxLv9XEFaUfRHYKAmkBs 944rA09HKp2349U5lSAfKFl1ncXHg/c1XuQ1Utt4rqe8hCmFZWfFpYnIE6BMO+v8vdQA JI9wvO/mk4gH9jY2+EUqcwlLgwm7k+kIJUrB11NxH8ERzzhtUJQwCL2h9XWq18/i9cCY NIvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xaNTxNoQPnXnoUb4r3iV3mkFKbHJuRiufvKdd63kC7I=; b=seR0iKWZJAy5/v028oQmi1zK8koA7W398cekOqtWCxKNtmZ+Ew8T9KuOl3OTqS6aZP 7V2qr10fxpH/s9pl2BGugUpAa5gOq+Ju8NKtDD73fumYAgGyDtzktjYxmUAzwW+/5yUn LO83KARK1txtPpZkTa4dHd+vbr8s5pcYx2Y2jnhq5byw3svmOTAVWxHFS7UGmDfuJ7CL Nb15auhpbHqGKNxIuIcSJpzkOzQeofT17FvqT5qvzrS2TV+foJHubfHFnLg9Brdd37YY t7X3Ds2Vtp8SE8EZ3BUZTHtCcaZJQ8vBKXlc51n8r2HnG1wji+hPS7c2T2ntIfxdYixo WFcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=sdIhKOXd; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si12384740edv.372.2020.11.16.10.00.18; Mon, 16 Nov 2020 10:00: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; dkim=pass header.i=@google.com header.s=20161025 header.b=sdIhKOXd; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388059AbgKPR4k (ORCPT + 99 others); Mon, 16 Nov 2020 12:56:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387513AbgKPR4j (ORCPT ); Mon, 16 Nov 2020 12:56:39 -0500 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A95E8C0613CF for ; Mon, 16 Nov 2020 09:56:39 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id d142so113098wmd.4 for ; Mon, 16 Nov 2020 09:56:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xaNTxNoQPnXnoUb4r3iV3mkFKbHJuRiufvKdd63kC7I=; b=sdIhKOXdzOYUd+0zNv8c0adHbCQpoXeesxkjDLAWcVsQPMNDpfluCLKkFw4WfVYV2U T4Lz4ZqbN1XalTec7vHfSnyzVHrGMdF7wclbYRmO3LLQfhJopfg2xSZxPgYaf+i2tjPY V2TKzLtaYd0cs8iOJ3X1mjjRUUpt+mng4ZKIpkfQ+qHCFS29msT7SFYYx4p7lHs9wOl5 fv1KQionDArngXPYQxG9i/TfiCd3A2uIbWu9nzce8vKzKcgc9mPpxL8avcoVPIZDkLL7 QC/2UIKH/WrfxI3/ZMXY/zKHjO5bVHqehzf6TdSeb0koVcSwzq+7la8pSEjEQ6PlwYUr DiKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xaNTxNoQPnXnoUb4r3iV3mkFKbHJuRiufvKdd63kC7I=; b=mjZ4vZXSyan0YBgVoZ73ZPRCyMFhkxFEUiSwUYeekEH9gaH3mzACOQeAKQSnyu36dK Mq901uE0cDrXF1fiQumvyMVSWKQn1XSwFPmqoRoWfINOip4Hd4LzZM0yI0gNvTS4vIDM fe5dmOPHPPO/bIz24rg4EQNcVSIQQg5nSFW/rhiwV4BgFSUSyp88ZXRg1QH38TF2nARa 5gXnRP+JFyYgTdY/5wJ3vshbOCzyFzKfmmE+g0M4peXAJkJdrRqeQKLI8jE6W5CTU8J0 4WfwatjSGV42pft8peQDaYK45IbWGU14vO1X6UJ8xuF69ItgLqkpluHt/6Hgxr5tAPmI BDDQ== X-Gm-Message-State: AOAM531eures9pwIhwc23dKQvUJUJJhrogwhllYrHo+a5BmVZk7c+zbb YFpC0PXtO4EUFkv7DNdVqa2r3Q== X-Received: by 2002:a05:600c:2202:: with SMTP id z2mr43648wml.115.1605549398247; Mon, 16 Nov 2020 09:56:38 -0800 (PST) Received: from google.com ([2a01:4b00:8523:2d03:58a8:7836:6672:a072]) by smtp.gmail.com with ESMTPSA id z189sm69814wme.23.2020.11.16.09.56.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:56:37 -0800 (PST) Date: Mon, 16 Nov 2020 17:56:36 +0000 From: David Brazdil To: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, James Morse , Julien Thierry , Suzuki K Poulose , Catalin Marinas , Will Deacon , Dennis Zhou , Tejun Heo , Christoph Lameter , Mark Rutland , Lorenzo Pieralisi , Quentin Perret , Andrew Scull , Andrew Walbran , kernel-team@android.com Subject: Re: [PATCH v1 10/24] kvm: arm64: Extract parts of el2_setup into a macro Message-ID: <20201116175636.qmp5iws6gq7a7syi@google.com> References: <20201109113233.9012-1-dbrazdil@google.com> <20201109113233.9012-11-dbrazdil@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, > > + * Check for VHE being present. x2 being non-zero indicates that we > > + * do have VHE, and that the kernel is intended to run at EL2. > > */ > > mrs x2, id_aa64mmfr1_el1 > > ubfx x2, x2, #ID_AA64MMFR1_VHE_SHIFT, #4 > > -#else > > - mov x2, xzr > > -#endif > > + cbz x2, el2_setup_nvhe > > What initialises x2 to zero when CONFIG_VHE is disabled? There is no need for x2 anymore, the nVHE code just falls through. Basically: el2_setup: < check CurrentEL > b.eq 1f ret 1: #ifdef CONFIG_VHE < check has VHE > cbz el2_setup_nvhe < VHE setup > ret #endif el2_setup_nvhe: < nVHE setup > eret -David