Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3054202pxb; Mon, 16 Nov 2020 04:45:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGqSjYj2dZIz3XPFwIHvNHFxS1h5kTIgb3y8LW1VNCM7YZC1meamir5hmQ2BOMsNw/EpaU X-Received: by 2002:a17:906:3b89:: with SMTP id u9mr14009280ejf.436.1605530704606; Mon, 16 Nov 2020 04:45:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605530704; cv=none; d=google.com; s=arc-20160816; b=kuSPn3KAcZG1bFQx0PPq/hHmxsYZQd17xpjts86dk8hAHyooSRC1lPMlfXYHSSF/N6 MlzVVvUprIYIiZIWHZdffjZWuNgAA4Ucner189pXo+ySBIYBPUL6hnaaq0m2lg1t7k6L nrJlqpAVlgjtNHo4GA/gzGSK5UDx13EzHAryhFNwC1AWS4Lds6xD0k/lsWtqCzcMBbFn r9HkIxVVacsd3XQRy15hQL6fn7YYSLuGZfy7Z3LeWlfSJQ5ZyphA3diN3mJIFEDGt2bP DfgXg4nltKJpEAqfC1QnIQkiTIwubDms/iVC/bkLamn4dQ+GhUdjftnMjwzsQKsdxDh8 OveA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=Ce+KP9j+Xxj+yZMbR2wvHISMz8zYmfzidl+8jioJibM=; b=NHqKvbdH5tZ2hN8eYObF/xwD8pZDSK/DxNfYE95aDf8PWf8y7/yZo6xz2bD0G6GHOc hR9HL0YrwD3CdqZX7byYmpuvbm8yzsutCR80rHKdd2GFxVXzskkJ4fEpum4Ku1h3txTU Oyf9aASlsIPOzB0heSA/mDAFtfNjBc2cFP53xB+wYCL0bEusLa6OLh26yFJEymhZx+pa nlCBYP0b/ZFyFAI0Qudy/3+kABNPVQH/BD7Y4BKOMPbNs3y589V73lntYDVQg24GIWXl 50Buq8vVx7dIY1wRnIihNBQ5ALzYLushR1DMo4G4EHJpJFOBg4H2uK3T7oz7mG/9+vnb oKwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=C+oCIIJG; 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 f23si9948703ejc.182.2020.11.16.04.44.41; Mon, 16 Nov 2020 04:45:04 -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=@kernel.org header.s=default header.b=C+oCIIJG; 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 S1727165AbgKPMki (ORCPT + 99 others); Mon, 16 Nov 2020 07:40:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:49322 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726236AbgKPMkh (ORCPT ); Mon, 16 Nov 2020 07:40:37 -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 D0D1020855; Mon, 16 Nov 2020 12:40:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605530437; bh=bnRBIAdk2TK++2iHRYZosXliTCu3OhJv4rdoa2NVmfc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=C+oCIIJGqLI68KPl/ac6T0nLWv4BxqB2Qz8BM1c0poeVLdfo9EQ45dutdqrK6+SEW PcGUDLNaPuo5rzZfBnu89Gj8a0GA6dDFBXUezlABZ318hrbzUg5UwJurDquQrfeagG IHXngfRu+tLaihN9baJrEjNYH+UZjNZ6J+rWOHUg= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1kedoA-00B0ja-Od; Mon, 16 Nov 2020 12:40:34 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 16 Nov 2020 12:40:34 +0000 From: Marc Zyngier To: David Brazdil 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 13/24] kvm: arm64: Add CPU entry point in nVHE hyp In-Reply-To: <20201116114952.ybj24wx44lofqs25@google.com> References: <20201109113233.9012-1-dbrazdil@google.com> <20201109113233.9012-14-dbrazdil@google.com> <7b8f9dec846f172c2919e1d3f3c65245@kernel.org> <20201116114952.ybj24wx44lofqs25@google.com> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <549d918182c28d88550d27c068b772be@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: dbrazdil@google.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, dennis@kernel.org, tj@kernel.org, cl@linux.com, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, qperret@google.com, ascull@google.com, qwandor@google.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 On 2020-11-16 11:49, David Brazdil wrote: >> > #ifdef CONFIG_CPU_PM >> > DEFINE(CPU_CTX_SP, offsetof(struct cpu_suspend_ctx, sp)); >> > diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-init.S >> > b/arch/arm64/kvm/hyp/nvhe/hyp-init.S >> > index 1697d25756e9..f999a35b2c8c 100644 >> > --- a/arch/arm64/kvm/hyp/nvhe/hyp-init.S >> > +++ b/arch/arm64/kvm/hyp/nvhe/hyp-init.S >> > @@ -6,6 +6,7 @@ >> > >> > #include >> > #include >> > +#include >> >> This should probably be included from the file that provides >> init_el2_state. > > Agreed. This is a workaround for the fact that the arm-gic* headers > don't play > nice with each other (define the same constants). Ah, that... > Including arm-gic-v3.h in > kvm_asm.h will trigger macro redefine warnings in vgic*-v2.c because > they > include arm-gic.h. Boo. > Another option is to create a header just for el2 init. Would that be > preferable? Other ideas? Having an asm/el2_setup.h file feels like a better option. After all, it is in no way KVM specific, and having the macros hanging around in asm/kvm_asm.h feels odd. M. -- Jazz is not dead. It just smells funny...